Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

Commit

Permalink
fix: metamask version handling for key-tree (#195)
Browse files Browse the repository at this point in the history
* fix: metamask version handling for key-tree

* chore: fix keyPair tests
  • Loading branch information
BeroBurny authored Jun 14, 2022
1 parent 205b273 commit e618c7f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/snap/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/Chainsafe/filsnap.git"
},
"source": {
"shasum": "HPfrpT3USxqWMAGpBBISGvx+Ieq7DZmPFISV1WPEc1g=",
"shasum": "tPXcD1E0JJcBSLtXcDpAs3UCW6kf1R2+wMI8+dBQSPU=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/snap/src/filecoin/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export async function getKeyPair(wallet: Wallet): Promise<KeyPair> {
let privateKey: Buffer;

const currentVersion = await getMetamaskVersion(wallet);
if(isNewerVersion('MetaMask/v10.14.99-flask.0', currentVersion)) {
if(isNewerVersion('MetaMask/v10.15.99-flask.0', currentVersion)) {
const addressKeyDeriver = await getBIP44AddressKeyDeriver(bip44Node as JsonBIP44CoinTypeNode, {
account: parseInt(account),
change: parseInt(change),
Expand Down
2 changes: 1 addition & 1 deletion packages/snap/test/unit/rpc/keyPairTestConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const testPrivateKey = "888a4764f36384aef299c99f81a64e2d5d69e024979c8cb14
export const testPrivateKeyBase64 = "iIpHZPNjhK7ymcmfgaZOLV1p4CSXnIyxSL2oRijTEDU=";

export const testOldMetamaskVersion = "MetaMask/v10.14.6-flask.0";
export const testNewMetamaskVersion = "MetaMask/v10.15.0-flask.1";
export const testNewMetamaskVersion = "MetaMask/v10.16.0-flask.1";

export const testOldBip44Entropy = {
coin_type: 461,
Expand Down

0 comments on commit e618c7f

Please sign in to comment.