From 299b3ba384796ebf3258a646e595084902a9d6d9 Mon Sep 17 00:00:00 2001 From: Mantas Vidutis Date: Thu, 24 Nov 2022 12:15:17 -0800 Subject: [PATCH] add more checks on grant addresses --- packages/stargate/src/modules/authz/queries.spec.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/stargate/src/modules/authz/queries.spec.ts b/packages/stargate/src/modules/authz/queries.spec.ts index 6f75ee5b..a0b8acb0 100644 --- a/packages/stargate/src/modules/authz/queries.spec.ts +++ b/packages/stargate/src/modules/authz/queries.spec.ts @@ -111,6 +111,10 @@ describe("AuthzExtension", () => { // Needs to respond with a grant assertDefined(grant.authorization); + // Needs to have the correct granter and grantee + expect(grant.granter).toEqual(granter1Address); + expect(grant.grantee).toEqual(grantee1Address); + // Needs to be GenericAuthorization to decode it below expect(grant.authorization.typeUrl).toEqual("/cosmos.authz.v1beta1.GenericAuthorization"); @@ -133,6 +137,10 @@ describe("AuthzExtension", () => { // Needs to respond with a grant assertDefined(grant.authorization); + // Needs to have the correct granter and grantee + expect(grant.granter).toEqual(granter1Address); + expect(grant.grantee).toEqual(grantee1Address); + // Needs to be GenericAuthorization to decode it below expect(grant.authorization.typeUrl).toEqual("/cosmos.authz.v1beta1.GenericAuthorization");