Skip to content

Commit

Permalink
Merge branch 'main' into okwme/packet-forward-v3
Browse files Browse the repository at this point in the history
  • Loading branch information
okwme authored Dec 6, 2022
2 parents b3cbad5 + 6452e1b commit 6296e85
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion tests/e2e/e2e_exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const (
flagChainID = "chain-id"
flagSpendLimit = "spend-limit"
flagGasAdjustment = "gas-adjustment"
flagFeeGranter = "fee-granter"
flagFeeAccount = "fee-account"
flagBroadcastMode = "broadcast-mode"
flagKeyringBackend = "keyring-backend"
flagAllowedMessages = "allowed-messages"
Expand Down
28 changes: 14 additions & 14 deletions tests/e2e/e2e_feegrant_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ func (s *IntegrationTestSuite) testFeeGrant() {
s.Run("test fee grant module", func() {
var (
valIdx = 0
chain = s.chainA
api = fmt.Sprintf("http://%s", s.valResources[chain.id][valIdx].GetHostPort("1317/tcp"))
c = s.chainA
api = fmt.Sprintf("http://%s", s.valResources[c.id][valIdx].GetHostPort("1317/tcp"))
)

alice := chain.genesisAccounts[1].keyInfo.GetAddress()
bob := chain.genesisAccounts[2].keyInfo.GetAddress()
charlie := chain.genesisAccounts[3].keyInfo.GetAddress()
alice := c.genesisAccounts[1].keyInfo.GetAddress()
bob := c.genesisAccounts[2].keyInfo.GetAddress()
charlie := c.genesisAccounts[3].keyInfo.GetAddress()

// add fee grant from alice to bob
s.execFeeGrant(
chain,
c,
valIdx,
alice.String(),
bob.String(),
Expand All @@ -43,14 +43,14 @@ func (s *IntegrationTestSuite) testFeeGrant() {

// withdrawal all balance + fee + fee granter flag should succeed
s.execBankSend(
chain,
c,
valIdx,
bob.String(),
Address(),
tokenAmount.String(),
standardFees.String(),
false,
withKeyValue(flagFeeGranter, alice.String()),
withKeyValue(flagFeeAccount, alice.String()),
)

// check if the bob balance was subtracted without the fees
Expand All @@ -61,19 +61,19 @@ func (s *IntegrationTestSuite) testFeeGrant() {

// tx should fail after spend limit reach
s.execBankSend(
chain,
c,
valIdx,
bob.String(),
Address(),
tokenAmount.String(),
standardFees.String(),
true,
withKeyValue(flagFeeGranter, alice.String()),
withKeyValue(flagFeeAccount, alice.String()),
)

// add fee grant from alice to charlie
s.execFeeGrant(
chain,
c,
valIdx,
alice.String(),
charlie.String(),
Expand All @@ -83,22 +83,22 @@ func (s *IntegrationTestSuite) testFeeGrant() {

// revoke fee grant from alice to charlie
s.execFeeGrantRevoke(
chain,
c,
valIdx,
alice.String(),
charlie.String(),
)

// tx should fail because the grant was revoked
s.execBankSend(
chain,
c,
valIdx,
charlie.String(),
Address(),
tokenAmount.String(),
standardFees.String(),
true,
withKeyValue(flagFeeGranter, alice.String()),
withKeyValue(flagFeeAccount, alice.String()),
)
})
}
2 changes: 1 addition & 1 deletion tests/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var (
runBypassMinFeeTest = true
runEncodeTest = true
runEvidenceTest = true
runFeeGrantTest = false // not sure why this isn't working
runFeeGrantTest = true
runGlobalFeesTest = true
runGovTest = false // legacy gov system needs to be added back
runIBCTest = true
Expand Down

0 comments on commit 6296e85

Please sign in to comment.