-
Notifications
You must be signed in to change notification settings - Fork 579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
E2E: Fee middleware counterparty payee not set #1746
E2E: Fee middleware counterparty payee not set #1746
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, @chatton!
packetId := channeltypes.NewPacketId(channelA.PortID, channelA.ChannelID, 1) | ||
packetFee := feetypes.NewPacketFee(testFee, chainAWallet.Bech32Address(chainA.Config().Bech32Prefix), nil) | ||
|
||
t.Run("should succeed", func(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe something extra in the description to make it more explicit? Like pay packet fee should succeed
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
based on the nesting, the resulting message will look like TestPayPacketFeeAsync_SingleSender_NoCounterPartyAddress/pay_packet_fee/should_succeed
Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Looks super clean :)
e2e/fee_middleware_test.go
Outdated
s.Require().Empty(packets) | ||
}) | ||
|
||
packetId := channeltypes.NewPacketId(channelA.PortID, channelA.ChannelID, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packetId := channeltypes.NewPacketId(channelA.PortID, channelA.ChannelID, 1) | |
packetId := channeltypes.NewPacketId(chainATx.Packet.GetSourcePort(), chainATx.Packet.GetSourceChannel(), chainATx.Packet.GetSequence()) |
I think at least modifying the sequence to use the returned chainATx.Packet.GetSequence makes sense, I have no preference on the other arguments, I just figure this code will be copied a lot so might make more sense to derive the values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah definitely, good catch.
var err error | ||
payPacketFeeTxResp, err = s.PayPacketFeeAsync(ctx, chainA, chainAWallet, packetId, packetFee) | ||
s.Require().NoError(err) | ||
s.AssertValidTxResponse(payPacketFeeTxResp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love this helper function ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<3
Description
closes: #1686
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes