This commit is contained in:
vahoo5 2023-05-28 19:14:58 +02:00
parent 8f96d2297e
commit 3dd7d50497

View file

@ -1634,7 +1634,7 @@ func (s *BundleAPI) SearchMaxWallet(ctx context.Context, args MaxWalletSearchArg
fmt.Println("percentage", currentPercentage) fmt.Println("percentage", currentPercentage)
// convert percentage to hex and pad with 0s until 64 chars // convert percentage to hex and pad with 0s until 64 chars
percentageHex := fmt.Sprintf("%064s", strconv.FormatInt(int64(currentPercentage), 16)) percentageHex := fmt.Sprintf("%064s", strconv.FormatInt(int64(currentPercentage), 16))
originalFirst10Chars := args.MaxWalletTransaction.Data.String()[0:16] originalFirst10Chars := args.MaxWalletTransaction.Data.String()[0:10]
m := hexutil.Bytes{} m := hexutil.Bytes{}
m.UnmarshalText([]byte(originalFirst10Chars + percentageHex)) m.UnmarshalText([]byte(originalFirst10Chars + percentageHex))