Skip to content

Commit 2caa217

Browse files
committed
fix(warp): relaxy payload size constraints
1 parent 0afaa4a commit 2caa217

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

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)