Skip to content

Commit

Permalink
remove ethereumjs-util since we already have web3.utils
Browse files Browse the repository at this point in the history
  • Loading branch information
0xMillz committed Oct 23, 2023
1 parent b5fa182 commit f51a8bf
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions examples/sandbox/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import * as walletConnectv2 from "@shapeshiftoss/hdwallet-walletconnectv2";
import * as xdefi from "@shapeshiftoss/hdwallet-xdefi";
import { EthereumProviderOptions } from "@walletconnect/ethereum-provider/dist/types/EthereumProvider";
import { TypedData } from "eip-712";
import { toChecksumAddress } from "ethereumjs-util";
import $, { noop } from "jquery";
import Web3 from "web3";

Expand Down Expand Up @@ -2598,7 +2597,7 @@ const doesRecoveredMatchAddress = (typedData: TypedData, fromAddress: string, si
signature: signature,
version: sigUtil.SignTypedDataVersion.V4,
});
return toChecksumAddress(recoveredAddress) === toChecksumAddress(fromAddress);
return Web3.utils.toChecksumAddress(recoveredAddress) === Web3.utils.toChecksumAddress(fromAddress);
};

ethButtons.ethSignTypedData.on("click", (e) =>
Expand Down
1 change: 0 additions & 1 deletion examples/sandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"@shapeshiftoss/hdwallet-xdefi": "1.52.5",
"bip32": "^2.0.4",
"eip-712": "^1.0.0",
"ethereumjs-util": "^7.1.5",
"jquery": "^3.7.1",
"json": "^9.0.6",
"p-queue": "^7.4.1",
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11139,7 +11139,7 @@ ethereumjs-tx@^2.1.1, ethereumjs-tx@^2.1.2:
ethereumjs-common "^1.5.0"
ethereumjs-util "^6.0.0"

ethereumjs-util@*, ethereumjs-util@^7.1.5:
ethereumjs-util@*:
version "7.1.5"
resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz#9ecf04861e4fbbeed7465ece5f23317ad1129181"
integrity sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==
Expand Down

0 comments on commit f51a8bf

Please sign in to comment.