Fix tradeValue assignment and reference in view-quote.js (#9837)

feature/default_network_editable
Dan J Miller 4 years ago committed by GitHub
parent 80834b775d
commit 909795571b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      ui/app/pages/swaps/view-quote/view-quote.js

@ -115,7 +115,7 @@ export default function ViewQuote() {
const selectedQuote = useSelector(getSelectedQuote)
const topQuote = useSelector(getTopQuote)
const usedQuote = selectedQuote || topQuote
const { value: tradeValue = '0x0' } = usedQuote?.trade?.value || {}
const tradeValue = usedQuote?.trade?.value ?? '0x0'
const fetchParamsSourceToken = fetchParams?.sourceToken
@ -455,7 +455,7 @@ export default function ViewQuote() {
dispatch(
showModal({
name: 'CUSTOMIZE_METASWAP_GAS',
value: usedQuote.value,
value: tradeValue,
customGasLimitMessage: approveGas
? t('extraApprovalGas', [hexToDecimal(approveGas)])
: '',

Loading…
Cancel
Save