Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support revokePermissions #221

Merged
merged 1 commit into from
Aug 15, 2024
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
6 changes: 3 additions & 3 deletions packages/example/components/chains/ethereum/example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -325,12 +325,12 @@ export default function Example() {
/>
<ApiPayload
title="wallet_revokePermissions"
description="(暂不支持)删除权限"
description="删除权限"
presupposeParams={params.revokePermissions}
onExecute={async () => {
onExecute={async (param) => {
const res = await provider?.request({
'method': 'wallet_revokePermissions',
'params': [],
'params': [JSON.parse(param)],
});
return JSON.stringify(res);
}}
Expand Down
2 changes: 1 addition & 1 deletion packages/example/components/chains/ethereum/params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default {
{
'id': 'revokePermissions',
'name': 'revokePermissions',
'description': '删除权限',
'description': '断开 App 的授权连接',
'value': JSON.stringify({
'eth_accounts': {},
}),
Expand Down
Loading