From f1715660f82214517d24d56db667476e35082a71 Mon Sep 17 00:00:00 2001 From: Anthony Date: Wed, 18 Aug 2021 20:06:12 +0200 Subject: [PATCH] refactoring the wallet iteration --- ui/component/common/credit-amount.jsx | 5 ++ ui/component/txoList/view.jsx | 77 +++++++++++++++++++++------ 2 files changed, 65 insertions(+), 17 deletions(-) diff --git a/ui/component/common/credit-amount.jsx b/ui/component/common/credit-amount.jsx index b22e63cab..92adbba4c 100644 --- a/ui/component/common/credit-amount.jsx +++ b/ui/component/common/credit-amount.jsx @@ -49,6 +49,11 @@ class CreditAmount extends React.PureComponent { isFiat, } = this.props; const minimumRenderableAmount = 10 ** (-1 * precision); + + // return null, otherwise it will try and convert undefined to a string + if (amount === undefined) { + return null; + } const fullPrice = formatFullPrice(amount, 2); const isFree = parseFloat(amount) === 0; diff --git a/ui/component/txoList/view.jsx b/ui/component/txoList/view.jsx index e07b3e6b1..22fd570b0 100644 --- a/ui/component/txoList/view.jsx +++ b/ui/component/txoList/view.jsx @@ -188,24 +188,50 @@ function TxoList(props: Props) { return ( {__(`Transactions`)}} - titleActions={ -
- {!isFetchingTransactions && transactionsFile === null && ( - - )} -
- fetchTransactions()} - progressMsg={isFetchingTransactions ? __('Fetching data') : ''} - /> + title={ + <>
{__(`Transactions`)}
+
+ +
+
+
-
+ + + } + titleActions={ <> + //
+ // {!isFetchingTransactions && transactionsFile === null && ( + // + // )} + //
+ // fetchTransactions()} + // progressMsg={isFetchingTransactions ? __('Fetching data') : ''} + // /> + //
+ //
} isBodyList body={ @@ -288,8 +314,25 @@ function TxoList(props: Props) {
)} +
+ {!isFetchingTransactions && transactionsFile === null && ( + + )} +
+ fetchTransactions()} + progressMsg={isFetchingTransactions ? __('Fetching data') : ''} + /> +
+
+ {/* listing of the transactions */}