From 78acb8d570dc3c991532129bc2f14f9febb79728 Mon Sep 17 00:00:00 2001 From: Anthony Date: Thu, 19 Aug 2021 15:34:13 +0200 Subject: [PATCH] adding in payment history --- ui/component/txoList/view.jsx | 40 ++++++++++++++--------------------- 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/ui/component/txoList/view.jsx b/ui/component/txoList/view.jsx index fca23f6d1..a8cc732d1 100644 --- a/ui/component/txoList/view.jsx +++ b/ui/component/txoList/view.jsx @@ -12,6 +12,7 @@ import { toCapitalCase } from 'util/string'; import classnames from 'classnames'; import HelpLink from 'component/common/help-link'; import FileExporter from 'component/common/file-exporter'; +import WalletFiatPaymentHistory from 'component/walletFiatPaymentHistory'; type Props = { search: string, @@ -126,6 +127,11 @@ function TxoList(props: Props) { function updateUrl(delta: Delta) { const newUrlParams = new URLSearchParams(); + const existingCurrency = newUrlParams.get('currency') || 'credits'; + console.log(existingCurrency); + + console.log(newUrlParams); + // set tab name to account for wallet page tab newUrlParams.set('tab', delta.tab); @@ -331,7 +337,7 @@ function TxoList(props: Props) { )} -
+
{!isFetchingTransactions && transactionsFile === null && ( )} @@ -352,8 +358,9 @@ function TxoList(props: Props) { {/* listing of the transactions */} -
: -
+
+ // fiat section + :
@@ -367,7 +374,7 @@ function TxoList(props: Props) { } value={type || 'all'} - onChange={(e) => handleChange({ dkey: TXO.TYPE, value: e.target.value, tab })} + onChange={(e) => handleChange({ dkey: TXO.TYPE, value: e.target.value, tab, currency: 'fiat' })} > {Object.values(TXO.DROPDOWN_TYPES).map((v) => { const stringV = String(v); @@ -386,7 +393,7 @@ function TxoList(props: Props) { name="subtype" label={__('Payment Type')} value={subtype || 'all'} - onChange={(e) => handleChange({ dkey: TXO.SUB_TYPE, value: e.target.value, tab })} + onChange={(e) => handleChange({ dkey: TXO.SUB_TYPE, value: e.target.value, tab, currency: 'fiat' })} > {Object.values(TXO.DROPDOWN_SUBTYPES).map((v) => { const stringV = String(v); @@ -406,7 +413,7 @@ function TxoList(props: Props) {
)} -
- {!isFetchingTransactions && transactionsFile === null && ( - - )} -
- fetchTransactions()} - progressMsg={isFetchingTransactions ? __('Fetching data') : ''} - /> -
-
{/* listing of the transactions */} +
}