Skip to content

Commit

Permalink
replace ethers with submodules (#907)
Browse files Browse the repository at this point in the history
  • Loading branch information
adonesky1 authored and MajorLift committed Oct 11, 2023
1 parent e711877 commit 63d005b
Show file tree
Hide file tree
Showing 4 changed files with 220 additions and 355 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
"dependencies": {
"@ethereumjs/common": "^2.3.1",
"@ethereumjs/tx": "^3.2.1",
"@ethersproject/abi": "^5.7.0",
"@ethersproject/contracts": "^5.7.0",
"@ethersproject/providers": "^5.7.0",
"@keystonehq/metamask-airgapped-keyring": "^0.3.0",
"@metamask/contract-metadata": "^1.35.0",
"@metamask/metamask-eth-abis": "3.0.0",
Expand All @@ -57,7 +60,6 @@
"eth-sig-util": "^3.0.0",
"ethereumjs-util": "^7.0.10",
"ethereumjs-wallet": "^1.0.1",
"ethers": "^5.4.1",
"ethjs-unit": "^0.1.6",
"fast-deep-equal": "^3.1.3",
"immer": "^9.0.6",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/Standards/ERC20Standard.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { abiERC20 } from '@metamask/metamask-eth-abis';
import { BN, toUtf8 } from 'ethereumjs-util';
import { AbiCoder } from 'ethers/lib/utils';
import { AbiCoder } from '@ethersproject/abi';
import { ERC20 } from '../../constants';
import { Web3 } from './standards-types';

Expand Down
5 changes: 3 additions & 2 deletions src/assets/TokensController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import contractsMap from '@metamask/contract-metadata';
import { abiERC721 } from '@metamask/metamask-eth-abis';
import { v1 as random } from 'uuid';
import { Mutex } from 'async-mutex';
import { ethers, Contract } from 'ethers';
import { Contract } from '@ethersproject/contracts';
import { Web3Provider } from '@ethersproject/providers';
import { AbortController } from 'abort-controller';
import { BaseController, BaseConfig, BaseState } from '../BaseController';
import type { PreferencesState } from '../user/PreferencesController';
Expand Down Expand Up @@ -242,7 +243,7 @@ export class TokensController extends BaseController<
}

_instantiateNewEthersProvider(): any {
return new ethers.providers.Web3Provider(this.config?.provider);
return new Web3Provider(this.config?.provider);
}

/**
Expand Down
Loading

0 comments on commit 63d005b

Please sign in to comment.