Prevent an undefined gas price from breaking the transaction list (#11015)

feature/default_network_editable
David Walsh 4 years ago committed by GitHub
parent bf76d4e754
commit cc9c096e61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      ui/hooks/useCancelTransaction.js

@ -26,7 +26,10 @@ import { multiplyCurrencies } from '../helpers/utils/conversion-util';
*/
export function useCancelTransaction(transactionGroup) {
const { primaryTransaction } = transactionGroup;
const gasPrice = primaryTransaction.txParams?.gasPrice?.startsWith('-')
const transactionGasPrice = primaryTransaction.txParams?.gasPrice;
const gasPrice =
transactionGasPrice === undefined || transactionGasPrice?.startsWith('-')
? '0x0'
: primaryTransaction.txParams?.gasPrice;
const transaction = primaryTransaction;

Loading…
Cancel
Save