@@ -15,7 +15,11 @@ import {
15
15
BasicAllowance ,
16
16
} from 'cosmjs-types/cosmos/feegrant/v1beta1/feegrant' ;
17
17
import EnvConfig from 'config/EnvConfig' ;
18
- import { MsgRevoke } from 'cosmjs-types/cosmos/authz/v1beta1/tx' ;
18
+ import { MsgGrant , MsgRevoke } from 'cosmjs-types/cosmos/authz/v1beta1/tx' ;
19
+ import {
20
+ MsgGrantAllowance ,
21
+ MsgRevokeAllowance ,
22
+ } from 'cosmjs-types/cosmos/feegrant/v1beta1/tx' ;
19
23
20
24
/**
21
25
* Build a MsgRevokeAllowanceEncode object.
@@ -33,11 +37,10 @@ export const buildRevokeAllowanceEncode = ({
33
37
granter : string ;
34
38
} ) : MsgRevokeAllowanceEncodeObject => ( {
35
39
typeUrl : '/cosmos.feegrant.v1beta1.MsgRevokeAllowance' ,
36
- // replace with MsgRevokeAllowanceEncode.fromPartial
37
- value : {
40
+ value : MsgRevokeAllowance . fromPartial ( {
38
41
grantee,
39
42
granter,
40
- } ,
43
+ } ) ,
41
44
} ) ;
42
45
43
46
/**
@@ -73,15 +76,14 @@ export const buildGrantAllowanceEncode = ({
73
76
74
77
return {
75
78
typeUrl : '/cosmos.feegrant.v1beta1.MsgGrantAllowance' ,
76
- // replace with MsgGrantAllowance.fromPartial
77
- value : {
79
+ value : MsgGrantAllowance . fromPartial ( {
78
80
grantee,
79
81
granter,
80
82
allowance : Any . fromPartial ( {
81
83
typeUrl : '/cosmos.feegrant.v1beta1.AllowedMsgAllowance' ,
82
84
value : AllowedMsgAllowance . encode ( allowance ) . finish ( ) ,
83
85
} ) ,
84
- } ,
86
+ } ) ,
85
87
} ;
86
88
} ;
87
89
@@ -123,12 +125,11 @@ export const buildGrantMsgEncodes = ({
123
125
124
126
return {
125
127
typeUrl : '/cosmos.authz.v1beta1.MsgGrant' ,
126
- // replace with MsgGrant.fromPartial
127
- value : {
128
+ value : MsgGrant . fromPartial ( {
128
129
grantee,
129
130
granter,
130
131
grant : _grant ,
131
- } ,
132
+ } ) ,
132
133
} ;
133
134
} ) ;
134
135
} ;
0 commit comments