From 1d23afc531e45a91220ab982ce5bce7c32a47c25 Mon Sep 17 00:00:00 2001 From: Anthony Date: Fri, 13 Aug 2021 20:22:33 +0200 Subject: [PATCH] various small bug fixes --- ui/component/walletFiatPaymentHistory/view.jsx | 8 +------- ui/page/settingsStripeAccount/view.jsx | 4 ++-- ui/page/settingsStripeCard/view.jsx | 2 +- ui/page/wallet/view.jsx | 4 +++- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/ui/component/walletFiatPaymentHistory/view.jsx b/ui/component/walletFiatPaymentHistory/view.jsx index da2e3dc96..42d0341f3 100644 --- a/ui/component/walletFiatPaymentHistory/view.jsx +++ b/ui/component/walletFiatPaymentHistory/view.jsx @@ -20,14 +20,8 @@ type Props = { const WalletBalance = (props: Props) => { // receive transactions from parent component - const { transactions } = props; + const { transactions: accountTransactions } = props; - let accountTransactions; - - // reverse so most recent payments come first - if (transactions && transactions.length) { - accountTransactions = transactions.reverse(); - } // const [accountStatusResponse, setAccountStatusResponse] = React.useState(); // const [subscriptions, setSubscriptions] = React.useState(); diff --git a/ui/page/settingsStripeAccount/view.jsx b/ui/page/settingsStripeAccount/view.jsx index 8c089c71c..63371ca86 100644 --- a/ui/page/settingsStripeAccount/view.jsx +++ b/ui/page/settingsStripeAccount/view.jsx @@ -62,7 +62,7 @@ class StripeAccountConnection extends React.Component { unpaidBalance: 0, stripeConnectionUrl: '', pageTitle: 'Add Payout Method', - stillRequiringVerification: true, + stillRequiringVerification: false, accountTransactions: [], }; } @@ -282,7 +282,7 @@ class StripeAccountConnection extends React.Component { button="secondary" label={__('View Transactions')} icon={ICONS.SETTINGS} - navigate={`/$/${PAGES.WALLET}?tab=account-history`} + navigate={`/$/${PAGES.WALLET}?tab=fiat-payment-history`} /> } /> diff --git a/ui/page/settingsStripeCard/view.jsx b/ui/page/settingsStripeCard/view.jsx index 62e222874..d3bef38ef 100644 --- a/ui/page/settingsStripeCard/view.jsx +++ b/ui/page/settingsStripeCard/view.jsx @@ -423,7 +423,7 @@ class SettingsStripeCard extends React.Component { button="primary" label={__('View Transactions')} icon={ICONS.SETTINGS} - navigate={`/$/${PAGES.WALLET}?tab=payment-history`} + navigate={`/$/${PAGES.WALLET}?tab=fiat-account-history`} /> } /> diff --git a/ui/page/wallet/view.jsx b/ui/page/wallet/view.jsx index 8f34fc20b..38332f361 100644 --- a/ui/page/wallet/view.jsx +++ b/ui/page/wallet/view.jsx @@ -138,7 +138,9 @@ const WalletPage = (props: Props) => { (async function() { try { // get card payments customer has made - const customerTransactionResponse = await getPaymentHistory(); + let customerTransactionResponse = await getPaymentHistory(); + + customerTransactionResponse.reverse(); setCustomerTransactions(customerTransactionResponse); } catch (err) {