From 217eca15800b9c6d67238d78509371c2d2fedd05 Mon Sep 17 00:00:00 2001 From: ByteZhang Date: Thu, 15 Aug 2024 21:28:01 +0800 Subject: [PATCH] feat: support revokePermissions --- packages/example/components/chains/ethereum/example.tsx | 6 +++--- packages/example/components/chains/ethereum/params.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/example/components/chains/ethereum/example.tsx b/packages/example/components/chains/ethereum/example.tsx index e7e3d8b7..966d14be 100644 --- a/packages/example/components/chains/ethereum/example.tsx +++ b/packages/example/components/chains/ethereum/example.tsx @@ -325,12 +325,12 @@ export default function Example() { /> { + onExecute={async (param) => { const res = await provider?.request({ 'method': 'wallet_revokePermissions', - 'params': [], + 'params': [JSON.parse(param)], }); return JSON.stringify(res); }} diff --git a/packages/example/components/chains/ethereum/params.ts b/packages/example/components/chains/ethereum/params.ts index ff75b261..0a71e0e5 100644 --- a/packages/example/components/chains/ethereum/params.ts +++ b/packages/example/components/chains/ethereum/params.ts @@ -39,7 +39,7 @@ export default { { 'id': 'revokePermissions', 'name': 'revokePermissions', - 'description': '删除权限', + 'description': '断开 App 的授权连接', 'value': JSON.stringify({ 'eth_accounts': {}, }),