Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update data on Approve screen after updating custom spend limit #7918

Merged
merged 1 commit into from
Jan 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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