diff --git a/pages/authz/grant.tsx b/pages/authz/grant.tsx
index cb43fd0..261d5f2 100644
--- a/pages/authz/grant.tsx
+++ b/pages/authz/grant.tsx
@@ -149,6 +149,46 @@ const Grant: NextPage = () => {
(expiration?.getTime() as number) / 1000 || 0,
)
}
+ if (genericAuthType === 'MsgBeginRedelegate') {
+ return AuthzGenericGrantMsg(
+ wallet.address || '',
+ granteeAddressState.value,
+ '/cosmos.staking.v1beta1.MsgBeginRedelegate',
+ (expiration?.getTime() as number) / 1000 || 0,
+ )
+ }
+ if (genericAuthType === 'MsgWithdrawDelegatorReward') {
+ return AuthzGenericGrantMsg(
+ wallet.address || '',
+ granteeAddressState.value,
+ '/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward',
+ (expiration?.getTime() as number) / 1000 || 0,
+ )
+ }
+ if (genericAuthType === 'MsgVote') {
+ return AuthzGenericGrantMsg(
+ wallet.address || '',
+ granteeAddressState.value,
+ '/cosmos.gov.v1beta1.MsgVote',
+ (expiration?.getTime() as number) / 1000 || 0,
+ )
+ }
+ if (genericAuthType === 'MsgExecuteContract') {
+ return AuthzGenericGrantMsg(
+ wallet.address || '',
+ granteeAddressState.value,
+ '/cosmwasm.wasm.v1.MsgExecuteContract',
+ (expiration?.getTime() as number) / 1000 || 0,
+ )
+ }
+ if (genericAuthType === 'MsgMigrateContract') {
+ return AuthzGenericGrantMsg(
+ wallet.address || '',
+ granteeAddressState.value,
+ '/cosmwasm.wasm.v1.MsgMigrateContract',
+ (expiration?.getTime() as number) / 1000 || 0,
+ )
+ }
} else if (authType === 'Send') {
return AuthzSendGrantMsg(
wallet.address || '',
@@ -227,28 +267,20 @@ const Grant: NextPage = () => {
-
-
-
-
-
+
+
+
+
+
-
-
+
+
+
+
{/* */}
diff --git a/pages/authz/revoke.tsx b/pages/authz/revoke.tsx
index 929edb4..3ed58af 100644
--- a/pages/authz/revoke.tsx
+++ b/pages/authz/revoke.tsx
@@ -51,7 +51,7 @@ const RevokeAuthorization: NextPage = () => {
gasPrice: GasPrice.fromString('0.25ustars'),
})
- const result = await stargateClient.signAndBroadcast(
+ const response = await stargateClient.signAndBroadcast(
wallet.address || '',
[
{
@@ -68,8 +68,9 @@ const RevokeAuthorization: NextPage = () => {
gas: '200000',
},
)
- setTransactionHash(result.transactionHash)
- toast.success(`Revoke authorization success.`, { style: { maxWidth: 'none' } })
+ setTransactionHash(response.transactionHash)
+ if (response.rawLog?.includes('failed')) toast.error(response.rawLog, { style: { maxWidth: 'none' } })
+ else toast.success(`Revoke authorization success.`, { style: { maxWidth: 'none' } })
setIsLoading(false)
} catch (e: any) {
console.log(e)
@@ -103,15 +104,30 @@ const RevokeAuthorization: NextPage = () => {
-
+
+
+
+
+
-
-
+
{/* */}