From 30550e66db0c8ef4d077ef76b7347920a0929c37 Mon Sep 17 00:00:00 2001 From: stanleyyuen <102275989+stanleyyconsensys@users.noreply.github.com> Date: Fri, 6 Dec 2024 18:46:09 +0800 Subject: [PATCH] chore: fix permission --- packages/starknet-snap/src/utils/permission.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/starknet-snap/src/utils/permission.ts b/packages/starknet-snap/src/utils/permission.ts index 0a264b1c..0052fc25 100644 --- a/packages/starknet-snap/src/utils/permission.ts +++ b/packages/starknet-snap/src/utils/permission.ts @@ -29,6 +29,7 @@ export enum RpcMethod { GetAddressByStarkName = 'starkNet_getAddrFromStarkName', ReadContract = 'starkNet_getValue', GetStoredErc20Tokens = 'starkNet_getStoredErc20Tokens', + Ping='ping' } // RpcMethod that are allowed to be called by any origin const publicPermissions = [ @@ -51,6 +52,7 @@ const publicPermissions = [ RpcMethod.GetTransactionStatus, RpcMethod.EstimateFee, RpcMethod.VerifySignedMessage, + RpcMethod.Ping ]; // RpcMethod that are restricted to be called by wallet UI origins const walletUIDappPermissions = publicPermissions.concat([ @@ -59,6 +61,7 @@ const walletUIDappPermissions = publicPermissions.concat([ RpcMethod.GetTransactions, RpcMethod.UpgradeAccContract, RpcMethod.GetStarkName, + RpcMethod.GetAddressByStarkName, RpcMethod.ReadContract, RpcMethod.GetStoredErc20Tokens, ]);