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

fix: metamask version handling for key-tree #195

Merged
merged 2 commits into from
Jun 14, 2022
Merged
Show file tree
Hide file tree
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
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