Skip to content
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
5 changes: 4 additions & 1 deletion src/SwapsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import type { Hex } from '@metamask/utils';
import { Mutex } from 'async-mutex';
import { BigNumber } from 'bignumber.js';
import abiERC20 from 'human-standard-token-abi';
import { Web3 } from 'web3';
import * as web3 from 'web3';
import type { Web3 as Web3Type } from 'web3';

import type {
Expand Down Expand Up @@ -59,6 +59,9 @@ import {
shouldEnableDirectWrapping,
} from './swapsUtil';

// Hack to fix the issue with the web3 import that works different in app vs tests
const Web3 = web3.Web3 === undefined ? web3.default : web3.Web3;

// Functions to determine type of the return value from GasFeeController

/**
Expand Down