From 57fabf90da46b328f969f675c6deb0913f8cdcf7 Mon Sep 17 00:00:00 2001 From: Serkan Reis Date: Tue, 16 Jan 2024 18:30:13 +0300 Subject: [PATCH] Include MsgStoreCode among authz grant & revoke options --- pages/authz/grant.tsx | 10 ++++++++++ pages/authz/revoke.tsx | 3 +++ 2 files changed, 13 insertions(+) diff --git a/pages/authz/grant.tsx b/pages/authz/grant.tsx index 261d5f2..548bb90 100644 --- a/pages/authz/grant.tsx +++ b/pages/authz/grant.tsx @@ -39,6 +39,7 @@ export type GenericAuthorizationType = | 'MsgSend' | 'MsgExecuteContract' | 'MsgMigrateContract' + | 'MsgStoreCode' const Grant: NextPage = () => { const wallet = useWallet() @@ -189,6 +190,14 @@ const Grant: NextPage = () => { (expiration?.getTime() as number) / 1000 || 0, ) } + if (genericAuthType === 'MsgStoreCode') { + return AuthzGenericGrantMsg( + wallet.address || '', + granteeAddressState.value, + '/cosmwasm.wasm.v1.MsgStoreCode', + (expiration?.getTime() as number) / 1000 || 0, + ) + } } else if (authType === 'Send') { return AuthzSendGrantMsg( wallet.address || '', @@ -272,6 +281,7 @@ const Grant: NextPage = () => { + diff --git a/pages/authz/revoke.tsx b/pages/authz/revoke.tsx index 3ed58af..3036db8 100644 --- a/pages/authz/revoke.tsx +++ b/pages/authz/revoke.tsx @@ -119,6 +119,9 @@ const RevokeAuthorization: NextPage = () => { +