diff --git a/ui/component/walletFiatBalance/view.jsx b/ui/component/walletFiatBalance/view.jsx index 986f6b239..c91ad98b7 100644 --- a/ui/component/walletFiatBalance/view.jsx +++ b/ui/component/walletFiatBalance/view.jsx @@ -28,7 +28,7 @@ const WalletBalance = (props: Props) => { return ( <>{1 == 1 && {accountDetails && accountDetails.total_received_unpaid/100} || 0 USD} + title={<>{accountDetails && accountDetails.total_received_unpaid/100 || 0} USD} subtitle={ This is your remaining balance that can still be withdrawn to your bank account @@ -92,7 +92,7 @@ const WalletBalance = (props: Props) => {
} diff --git a/ui/component/walletFiatPaymentHistory/view.jsx b/ui/component/walletFiatPaymentHistory/view.jsx index 575330223..a848eedfb 100644 --- a/ui/component/walletFiatPaymentHistory/view.jsx +++ b/ui/component/walletFiatPaymentHistory/view.jsx @@ -153,7 +153,7 @@ const WalletBalance = (props: Props) => { ))} - {(!paymentHistoryTransactions || paymentHistoryTransactions.length === 0) &&

No Transactions

} + {(!accountTransactions || accountTransactions.length === 0) &&

No Transactions

} } diff --git a/ui/page/wallet/view.jsx b/ui/page/wallet/view.jsx index 97b95cbdf..c66a27b89 100644 --- a/ui/page/wallet/view.jsx +++ b/ui/page/wallet/view.jsx @@ -75,11 +75,30 @@ const WalletPage = (props: Props) => { ); } + + // calculate account transactions section React.useEffect(() => { (async function(){ try { const response = await getAccountStatus(); + setAccountStatusResponse(response); + + // TODO: some weird naming clash hence getAccountTransactionsa + const getAccountTransactions = await getAccountTransactionsa(); + + setAccountTransactionResponse(getAccountTransactions) + + } catch (err){ + console.log(err); + } + })(); + }, []); + + // populate customer payment data + React.useEffect(() => { + (async function(){ + try { // get card payments customer has made const customerTransactionResponse = await getPaymentHistory(); @@ -91,25 +110,8 @@ const WalletPage = (props: Props) => { setTotalTippedAmount(totalTippedAmount / 100); - console.log(customerTransactionResponse); - setCustomerTransactions(customerTransactionResponse) - console.log('account status'); - - console.log(response); - - setAccountStatusResponse(response); - - // TODO: some weird naming clash hence getAccountTransactionsa - const getAccountTransactions = await getAccountTransactionsa(); - - console.log('transactions'); - - setAccountTransactionResponse(getAccountTransactions) - - console.log(getAccountTransactions); - } catch (err){ console.log(err); }