Skip to content

Commit

Permalink
downgrade ethereumjs-util 7.0.1 to resolve BN.js issues
Browse files Browse the repository at this point in the history
  • Loading branch information
owencraston committed Mar 7, 2024
1 parent f5a7717 commit 56b6b96
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 2 additions & 0 deletions app/components/Nav/App/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,12 @@ const App = ({ userLoggedIn }) => {

// TODO remove this useEffect before merging
useEffect(() => {
// eslint-disable-next-line no-console
console.log(
'Accounts/ AccountController',
JSON.stringify(Engine.context.AccountsController.state, null, 2),
);
// eslint-disable-next-line no-console
console.log(
'Accounts/ PreferencesController',
JSON.stringify(Engine.context.PreferencesController, null, 2),
Expand Down
2 changes: 1 addition & 1 deletion app/util/number/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ describe('Number utils :: toWei', () => {
expect(() => toWei(new BN(1.337e18))).toThrow(Error);
expect(() => toWei(new BN(1337000000000000000))).toThrow(Error);
// For some reason this returns 8338418000000000000000000 wei
expect(() => toWei(new BN('1.337e18'))).not.toEqual(
expect(toWei(new BN('1.337e18'))).not.toEqual(
'1337000000000000000000000000000000000',
);
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
"eth-rpc-errors": "^4.0.3",
"eth-url-parser": "1.0.4",
"ethereumjs-abi": "0.6.6",
"ethereumjs-util": "7.0.10",
"ethereumjs-util": "7.0.1",
"ethers": "^5.0.14",
"ethjs-contract": "0.2.3",
"ethjs-ens": "2.0.1",
Expand Down
15 changes: 8 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15759,17 +15759,18 @@ ethereumjs-tx@^2.1.1:
ethereumjs-common "^1.5.0"
ethereumjs-util "^6.0.0"

ethereumjs-util@7.0.10:
version "7.0.10"
resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.0.10.tgz#5fb7b69fa1fda0acc59634cf39d6b0291180fc1f"
integrity sha512-c/xThw6A+EAnej5Xk5kOzFzyoSnw0WX0tSlZ6pAsfGVvQj3TItaDg9b1+Fz1RJXA+y2YksKwQnuzgt1eY6LKzw==
ethereumjs-util@7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.0.1.tgz#6545ec23924eb1e3bd476bfa1f90de5f87bdfbad"
integrity sha512-qp5ZwQEUC+ZV9ESeQT3gBHivGjygYVrNc2xR170HabUFQiOSb9t+Kby0FinOAPq+/pxKkiib8HfoIAy+BEi91Q==
dependencies:
"@types/bn.js" "^5.1.0"
bn.js "^5.1.2"
"@types/bn.js" "^4.11.3"
bn.js "^4.11.8"
create-hash "^1.1.2"
ethereum-cryptography "^0.1.3"
ethjs-util "0.1.6"
keccak "^3.0.0"
rlp "^2.2.4"
secp256k1 "^4.0.1"

ethereumjs-util@^5.0.0, ethereumjs-util@^5.1.1, ethereumjs-util@^5.1.2, ethereumjs-util@^5.1.5:
version "5.2.1"
Expand Down

0 comments on commit 56b6b96

Please sign in to comment.