File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,11 @@ function _handleMsgGrant(msg: CosmosMessage<MsgGrant>): AuthzProps {
5454 const { grant, grantee, granter} = msg . msg . decodedMsg ;
5555
5656 const expiration = grant . expiration ? new Date ( Number ( grant . expiration . seconds ) * 1000 + Math . floor ( grant . expiration . nanos / 1_000_000 ) ) : undefined
57- const event = msg . block . events . find ( e => e . event . type === '' && isEventOfMessageKind ( e ) && e . tx . hash === msg . tx . hash ) !
57+ const event = msg . block . events . find ( e => e . event . type === 'cosmos.authz.v1beta1.EventGrant' && isEventOfMessageKind ( e ) && e . tx . hash === msg . tx . hash ) !
58+
59+ if ( ! event ) {
60+ throw new Error ( `[handleMsgGrant] event for MsgGrant not found at ${ msg . block . header . height } height` ) ;
61+ }
5862
5963 let msgType : string | null = null
6064
You can’t perform that action at this time.
0 commit comments