Skip to content

Commit

Permalink
Merge pull request #604 from eco-stake/fix-variable-assignment
Browse files Browse the repository at this point in the history
Fix variable assignment for generic grants
  • Loading branch information
tombeynon committed Sep 21, 2022
2 parents 79a20c5 + 1e18f43 commit 2ef9ed9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/converters/Authz.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function createAuthzAminoConverters() {
"/cosmos.authz.v1beta1.MsgGrant": {
aminoType: "cosmos-sdk/MsgGrant",
toAmino: ({ granter, grantee, grant }) => {
converter = grantConverter[grant.authorization.typeUrl]
const converter = grantConverter[grant.authorization.typeUrl]
return {
granter,
grantee,
Expand All @@ -67,8 +67,8 @@ export function createAuthzAminoConverters() {
}
},
fromAmino: ({ granter, grantee, grant }) => {
protoType = Object.keys(grantConverter).find(type => grantConverter[type].aminoType === grant.authorization.type)
converter = grantConverter[protoType]
const protoType = Object.keys(grantConverter).find(type => grantConverter[type].aminoType === grant.authorization.type)
const converter = grantConverter[protoType]
return {
granter,
grantee,
Expand Down

0 comments on commit 2ef9ed9

Please sign in to comment.