From 485d6a370d7f81f06a04ce93cf0572791dafb7a4 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Fri, 4 Feb 2022 15:06:50 -0500 Subject: [PATCH] fix(@wallet): [re-add] tx history view Fixes #4684 Correctly display the date and if the node is an archival node --- .../Wallet/controls/TransactionDelegate.qml | 2 +- ui/app/AppLayouts/Wallet/stores/RootStore.qml | 16 +++++----------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/ui/app/AppLayouts/Wallet/controls/TransactionDelegate.qml b/ui/app/AppLayouts/Wallet/controls/TransactionDelegate.qml index 59a200c767..6e9a2bd8a5 100644 --- a/ui/app/AppLayouts/Wallet/controls/TransactionDelegate.qml +++ b/ui/app/AppLayouts/Wallet/controls/TransactionDelegate.qml @@ -142,7 +142,7 @@ Rectangle { } StyledText { id: timeValue - text: new Date(parseInt(timestamp)).toLocaleString(locale) + text: new Date(parseInt(timestamp) * 1000).toLocaleString(locale) font.pixelSize: Style.current.primaryTextFontSize anchors.rightMargin: Style.current.smallPadding } diff --git a/ui/app/AppLayouts/Wallet/stores/RootStore.qml b/ui/app/AppLayouts/Wallet/stores/RootStore.qml index fffb244e45..78db898ff2 100644 --- a/ui/app/AppLayouts/Wallet/stores/RootStore.qml +++ b/ui/app/AppLayouts/Wallet/stores/RootStore.qml @@ -28,6 +28,7 @@ QtObject { property var history: walletSectionTransactions property var historyTransactions: walletSectionTransactions.model + property bool isNonArchivalNode: history.isNonArchivalNode property var savedAddresses: walletSectionSavedAddresses.model @@ -83,11 +84,6 @@ QtObject { // return walletModel.getLatestBlockNumber() } - function isNonArchivalNode() { - // Not Refactored Yet -// return walletModel.isNonArchivalNode - } - function setInitialRange() { // Not Refactored Yet // walletModel.setInitialRange() @@ -154,15 +150,13 @@ QtObject { } function isFetchingHistory() { - // Not Refactored Yet -// return history.isFetchingHistory(walletModel.accountsView.currentAccount.address) + return history.isFetchingHistory(currentAccount.address) } function loadTransactionsForAccount(pageSize) { - // Not Refactored Yet -// history.loadTransactionsForAccount(walletModel.accountsView.currentAccount.address, -// historyTransactions.getLastTxBlockNumber(), -// pageSize, true) + history.loadTransactionsForAccount(currentAccount.address, + historyTransactions.getLastTxBlockNumber(), + pageSize, true) } function fetchCollectionCollectiblesList(slug) {