mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-28 23:06:37 +01:00
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.
This commit is contained in:
parent
3bce9dec94
commit
acf1f704ea
@ -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 (
|
||||
<ConfirmTransactionBase
|
||||
toAddress={toAddress}
|
||||
@ -94,17 +98,14 @@ export default class ConfirmApprove extends Component {
|
||||
tokenBalance={tokenBalance}
|
||||
showCustomizeGasModal={() => 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}
|
||||
/>
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user