Skip to content

Commit 91548bb

Browse files
committed
Merge branch 'main' into yjamin/fix-payforgas
# Conflicts: # CHANGELOG.md
2 parents 102e5c3 + b6ef399 commit 91548bb

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ An '!' indicates a state machine breaking change.
2323

2424
### Bug Fixes
2525

26-
- ! [#164](https://github.com/bcp-innovations/hyperlane-cosmos/pull/164) Fix MsgPayForGas to account for the IGP quote
27-
- [#157](https://github.com/bcp-innovations/hyperlane-cosmos/pull/157) Fix Amino JSON signing for ISM `MsgSetRoutingIsmDomain`, warp `MsgEnrollRemoteRouter`, and post_dispatch `MsgSetDestinationGasConfig`.
26+
- ! [#164](https://github.com/bcp-innovations/hyperlane-cosmos/pull/164) Fix MsgPayForGas to account for the IGP quote.
27+
- ! [#163](https://github.com/bcp-innovations/hyperlane-cosmos/pull/163) Fix warp payload length check.
28+
- ! [#157](https://github.com/bcp-innovations/hyperlane-cosmos/pull/157) Fix Amino JSON signing for ISM `MsgSetRoutingIsmDomain`, warp `MsgEnrollRemoteRouter`, and post_dispatch `MsgSetDestinationGasConfig`.
2829
- ! [#148](https://github.com/bcp-innovations/hyperlane-cosmos/pull/148) Fix Amino name typos in warp.
2930
- ! [#153](https://github.com/bcp-innovations/hyperlane-cosmos/pull/153) Fix SetDomain for RoutingISM.
3031
- ! [#123](https://github.com/bcp-innovations/hyperlane-cosmos/pull/123) Fix Amino name typos in core.

x/warp/types/payload.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ func NewWarpPayload(recipient []byte, amount big.Int) (WarpPayload, error) {
2626
}
2727

2828
func ParseWarpPayload(payload []byte) (WarpPayload, error) {
29-
if len(payload) != 64 {
30-
return WarpPayload{}, errors.New("payload is invalid")
29+
if len(payload) < 64 {
30+
return WarpPayload{}, errors.New("payload is invalid. Expected at least 64 bytes")
3131
}
3232

33-
amount := big.NewInt(0).SetBytes(payload[32:])
33+
amount := big.NewInt(0).SetBytes(payload[32:64])
3434

3535
return WarpPayload{
3636
recipient: payload[0:32],

0 commit comments

Comments
 (0)