mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 18:00:18 +01:00
Prevent an undefined gas price from breaking the transaction list (#11015)
This commit is contained in:
parent
55e400df51
commit
3dc3d4d651
@ -26,9 +26,12 @@ import { multiplyCurrencies } from '../helpers/utils/conversion-util';
|
||||
*/
|
||||
export function useCancelTransaction(transactionGroup) {
|
||||
const { primaryTransaction } = transactionGroup;
|
||||
const gasPrice = primaryTransaction.txParams?.gasPrice?.startsWith('-')
|
||||
? '0x0'
|
||||
: primaryTransaction.txParams?.gasPrice;
|
||||
|
||||
const transactionGasPrice = primaryTransaction.txParams?.gasPrice;
|
||||
const gasPrice =
|
||||
transactionGasPrice === undefined || transactionGasPrice?.startsWith('-')
|
||||
? '0x0'
|
||||
: primaryTransaction.txParams?.gasPrice;
|
||||
const transaction = primaryTransaction;
|
||||
const dispatch = useDispatch();
|
||||
const selectedAccount = useSelector(getSelectedAccount);
|
||||
|
Loading…
Reference in New Issue
Block a user