1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00

Fix failing test:unit pipeline (#13387)

* Fix failing test:unit pipeline

* Correct check of gasLimit and properGasLimit in edit-gas-display

Co-authored-by: Dan Miller <danjm.com@gmail.com>
This commit is contained in:
VSaric 2022-01-25 22:51:42 +01:00 committed by GitHub
parent 022f0efcd7
commit 7b75b9e638
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,7 +110,11 @@ export default function EditGasDisplay({
);
let warningMessage;
if (new BigNumber(gasLimit).lessThan(new BigNumber(properGasLimit))) {
if (
gasLimit !== undefined &&
properGasLimit !== undefined &&
new BigNumber(gasLimit).lessThan(new BigNumber(properGasLimit))
) {
warningMessage = t('gasLimitRecommended', [properGasLimit]);
}