From acf1f704eacde5a439d12a890211403a4761c674 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Tue, 28 Jan 2020 09:42:07 -0400 Subject: [PATCH] Update data on Approve screen after updating custom spend limit (#7918) After updating the custom spend limit on the approve screen, the data for the transaction was not being updated. Instead it showed the original transaction data. The transaction data was being updated correctly in the final transaction though. The approve screen has been updated to ensure changes to the custom spend limit are reflected correctly in the data shown. --- .../confirm-approve/confirm-approve.component.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ui/app/pages/confirm-approve/confirm-approve.component.js b/ui/app/pages/confirm-approve/confirm-approve.component.js index e8c44cd4f..3408a6ab8 100644 --- a/ui/app/pages/confirm-approve/confirm-approve.component.js +++ b/ui/app/pages/confirm-approve/confirm-approve.component.js @@ -75,6 +75,10 @@ export default class ConfirmApprove extends Component { ? Number(calcTokenAmount(tokenTrackerBalance, decimals)).toPrecision(9) : '' + const customData = customPermissionAmount + ? getCustomTxParamsData(data, { customPermissionAmount, tokenAmount, decimals }) + : null + return ( showCustomizeGasModal(txData)} showEditApprovalPermissionModal={showEditApprovalPermissionModal} - data={data} + data={customData || data} toAddress={toAddress} currentCurrency={currentCurrency} ethTransactionTotal={ethTransactionTotal} fiatTransactionTotal={fiatTransactionTotal} />} hideSenderToRecipient - customTxParamsData={customPermissionAmount - ? getCustomTxParamsData(data, { customPermissionAmount, tokenAmount, decimals }) - : null - } + customTxParamsData={customData} {...restProps} /> )