From d81eb6f77f2da9b03eecd12dd56dcfa469a75ca0 Mon Sep 17 00:00:00 2001 From: Monte Lai Date: Mon, 8 Apr 2024 21:49:31 +0800 Subject: [PATCH] fix: undefined param for chain config --- packages/snap/snap.manifest.json | 2 +- packages/snap/src/keyring.test.ts | 2 +- packages/snap/src/keyring.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/snap/snap.manifest.json b/packages/snap/snap.manifest.json index 0663b74..22d191d 100644 --- a/packages/snap/snap.manifest.json +++ b/packages/snap/snap.manifest.json @@ -7,7 +7,7 @@ "url": "git+https://github.com/MetaMask/snap-account-abstraction-keyring.git" }, "source": { - "shasum": "I2n6C/a7RKpixg1io43LlbJemg8v3akKZZ0wSDBdlKw=", + "shasum": "Luzyj8okKjEMwhuIKOjOWr/EauxOZj2b6odSgBJuuBA=", "location": { "npm": { "filePath": "dist/bundle.js", diff --git a/packages/snap/src/keyring.test.ts b/packages/snap/src/keyring.test.ts index ee8ca39..2504f06 100644 --- a/packages/snap/src/keyring.test.ts +++ b/packages/snap/src/keyring.test.ts @@ -806,7 +806,7 @@ describe('Keyring', () => { account: mockAccountId, request: { method: InternalMethod.SetConfig, - params: [mockConfig], + params: mockConfig, }, }; diff --git a/packages/snap/src/keyring.ts b/packages/snap/src/keyring.ts index 299fdc7..d3f1bfc 100644 --- a/packages/snap/src/keyring.ts +++ b/packages/snap/src/keyring.ts @@ -330,7 +330,7 @@ export class AccountAbstractionKeyring implements Keyring { case InternalMethod.SetConfig: { return { pending: false, - result: await this.setConfig((params as [ChainConfig])[0]), + result: await this.setConfig(params as ChainConfig), }; } default: {