From 769b380ce535a7a719d0bdb04e4a127af8feabf5 Mon Sep 17 00:00:00 2001 From: Daniel Rocha <68558152+danroc@users.noreply.github.com> Date: Tue, 11 Jul 2023 13:42:05 +0200 Subject: [PATCH] refactor: rename `supportedMethods` to `methods` BREAKING CHANGE: This commit renames a field of the KeyringAccount class, making it incompatible with previous version. --- src/KeyringClient.test.ts | 8 ++++---- src/KeyringSnapControllerClient.test.ts | 2 +- src/KeyringSnapRpcClient.test.ts | 2 +- src/api.ts | 2 +- src/rpc-handler.test.ts | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/KeyringClient.test.ts b/src/KeyringClient.test.ts index d350f1c10..a362dcc84 100644 --- a/src/KeyringClient.test.ts +++ b/src/KeyringClient.test.ts @@ -24,7 +24,7 @@ describe('KeyringClient', () => { name: 'Account 1', address: '0xE9A74AACd7df8112911ca93260fC5a046f8a64Ae', options: {}, - supportedMethods: [], + methods: [], type: 'eip155:eoa', }, ]; @@ -48,7 +48,7 @@ describe('KeyringClient', () => { name: 'Account 1', address: '0xE9A74AACd7df8112911ca93260fC5a046f8a64Ae', options: {}, - supportedMethods: [], + methods: [], type: 'eip155:eoa', }; @@ -71,7 +71,7 @@ describe('KeyringClient', () => { name: 'Account 1', address: '0xE9A74AACd7df8112911ca93260fC5a046f8a64Ae', options: {}, - supportedMethods: [], + methods: [], type: 'eip155:eoa', }; @@ -114,7 +114,7 @@ describe('KeyringClient', () => { name: 'Account 1', address: '0xE9A74AACd7df8112911ca93260fC5a046f8a64Ae', options: {}, - supportedMethods: [], + methods: [], type: 'eip155:eoa', }; diff --git a/src/KeyringSnapControllerClient.test.ts b/src/KeyringSnapControllerClient.test.ts index 34d82a5d0..7d2d99894 100644 --- a/src/KeyringSnapControllerClient.test.ts +++ b/src/KeyringSnapControllerClient.test.ts @@ -12,7 +12,7 @@ describe('KeyringSnapControllerClient', () => { name: 'Account 1', address: '0xE9A74AACd7df8112911ca93260fC5a046f8a64Ae', options: {}, - supportedMethods: [], + methods: [], type: 'eip155:eoa', }, ]; diff --git a/src/KeyringSnapRpcClient.test.ts b/src/KeyringSnapRpcClient.test.ts index c38fc0560..cfa3f9433 100644 --- a/src/KeyringSnapRpcClient.test.ts +++ b/src/KeyringSnapRpcClient.test.ts @@ -12,7 +12,7 @@ describe('KeyringSnapRpcClient', () => { name: 'Account 1', address: '0xE9A74AACd7df8112911ca93260fC5a046f8a64Ae', options: {}, - supportedMethods: [], + methods: [], type: 'eip155:eoa', }, ]; diff --git a/src/api.ts b/src/api.ts index 3be71b142..b89933010 100644 --- a/src/api.ts +++ b/src/api.ts @@ -38,7 +38,7 @@ export const KeyringAccountStruct = object({ /** * Account supported methods. */ - supportedMethods: array( + methods: array( enums([ 'personal_sign', 'eth_sendTransaction', diff --git a/src/rpc-handler.test.ts b/src/rpc-handler.test.ts index 6afca64f5..83c1bd8dc 100644 --- a/src/rpc-handler.test.ts +++ b/src/rpc-handler.test.ts @@ -238,7 +238,7 @@ describe('keyringRpcDispatcher', () => { name: 'test', address: '0x0', options: {}, - supportedMethods: [], + methods: [], type: 'eip155:eoa', }, }, @@ -252,7 +252,7 @@ describe('keyringRpcDispatcher', () => { name: 'test', address: '0x0', options: {}, - supportedMethods: [], + methods: [], type: 'eip155:eoa', }); expect(result).toBe('UpdateAccount result');