Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ An '!' indicates a state machine breaking change.

### Bug Fixes

- ! [#163](https://github.com/bcp-innovations/hyperlane-cosmos/pull/163) Fix warp payload length check
- [#157](https://github.com/bcp-innovations/hyperlane-cosmos/pull/157) Fix Amino JSON signing for ISM `MsgSetRoutingIsmDomain`, warp `MsgEnrollRemoteRouter`, and post_dispatch `MsgSetDestinationGasConfig`.
- ! [#148](https://github.com/bcp-innovations/hyperlane-cosmos/pull/148) Fix Amino name typos in warp.
- ! [#153](https://github.com/bcp-innovations/hyperlane-cosmos/pull/153) Fix SetDomain for RoutingISM.
Expand Down
6 changes: 3 additions & 3 deletions x/warp/types/payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ func NewWarpPayload(recipient []byte, amount big.Int) (WarpPayload, error) {
}

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

amount := big.NewInt(0).SetBytes(payload[32:])
amount := big.NewInt(0).SetBytes(payload[32:64])

return WarpPayload{
recipient: payload[0:32],
Expand Down