From a1077080193f92e3828fca18a48deb92f6cf1ca6 Mon Sep 17 00:00:00 2001 From: guanbinrui Date: Thu, 10 Feb 2022 18:06:30 +0800 Subject: [PATCH] chore: add eth_account --- .../extension/background-script/EthereumServices/send.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/mask/src/extension/background-script/EthereumServices/send.ts b/packages/mask/src/extension/background-script/EthereumServices/send.ts index c7c23a532480..1f39dbc0c942 100644 --- a/packages/mask/src/extension/background-script/EthereumServices/send.ts +++ b/packages/mask/src/extension/background-script/EthereumServices/send.ts @@ -398,6 +398,13 @@ export async function INTERNAL_send( try { switch (payload.method) { + case EthereumMethodType.ETH_ACCOUNTS: + callback(null, { + id: payload.id, + jsonrpc: payload.jsonrpc, + result: [account], + } as JsonRpcResponse) + break case EthereumMethodType.ETH_GET_TRANSACTION_RECEIPT: await getTransactionReceipt() break