Skip to content

Commit

Permalink
Update data on Approve screen after updating custom spend limit
Browse files Browse the repository at this point in the history
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.

Fixes #7915
  • Loading branch information
Gudahtt committed Jan 28, 2020
1 parent b75f812 commit d02dc49
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions ui/app/pages/confirm-approve/confirm-approve.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -94,18 +98,15 @@ 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}
/>
)
Expand Down

0 comments on commit d02dc49

Please sign in to comment.