From e3bc73ddadd73d3e2d8d5d86ea6df930c4db1c8b Mon Sep 17 00:00:00 2001 From: Justin Tieri <37750742+jtieri@users.noreply.github.com> Date: Tue, 1 Oct 2024 17:58:26 -0500 Subject: [PATCH] chore: remove unnecessary check before converting int to uint8 --- chain/polkadot/tx.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/chain/polkadot/tx.go b/chain/polkadot/tx.go index 9e50119dd..245e3811e 100644 --- a/chain/polkadot/tx.go +++ b/chain/polkadot/tx.go @@ -2,7 +2,6 @@ package polkadot import ( "encoding/hex" - "fmt" "math/big" "strconv" @@ -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)