Include Send among available auth types

This commit is contained in:
Serkan Reis
2024-01-15 18:02:45 +03:00
parent 7526cc91d1
commit ab801768b9
2 changed files with 67 additions and 34 deletions
+5 -1
View File
@@ -49,6 +49,7 @@ export function AuthzSendGrantMsg(
denom: string,
spendLimit: number,
expiration: number,
allowList?: string[],
): Msg {
const sendAuthValue = SendAuthorization.encode(
SendAuthorization.fromPartial({
@@ -58,15 +59,18 @@ export function AuthzSendGrantMsg(
denom,
}),
],
//allowList,
}),
).finish()
const grantValue = MsgGrant.fromPartial({
grant: {
authorization: {
typeUrl: '/cosmos.bank.v1beta1.SendAuthorization',
value: sendAuthValue,
},
//expiration: { seconds: BigInt(expiration).valueOf() },
// TODO: fix expiration issue
expiration: expiration ? { seconds: BigInt(expiration) } : undefined,
},
grantee,
granter,