Skip to content

Commit

Permalink
chore: remove unnecessary check before converting int to uint8
Browse files Browse the repository at this point in the history
  • Loading branch information
jtieri committed Oct 1, 2024
1 parent 024e307 commit e3bc73d
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions chain/polkadot/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package polkadot

import (
"encoding/hex"
"fmt"
"math/big"
"strconv"

Expand Down Expand Up @@ -81,13 +80,7 @@ func SendIbcFundsTx(

raw := gstypes.NewU8(1)

s := len(amount.Address) * 4

if s < 0 {
return hash, fmt.Errorf("cannot safely convert int value %d to uint8 due to negative value", s)
}

size := gstypes.NewU8(uint8(s))
size := gstypes.NewU8(uint8(len(amount.Address) * 4))
to := gstypes.NewStorageDataRaw([]byte(amount.Address))
channel := gstypes.NewU64(0) // Parse channel number from string
timeout := gstypes.NewU8(1)
Expand Down

0 comments on commit e3bc73d

Please sign in to comment.