From 07882d9259e03e60e2066169d9ece340f919657d Mon Sep 17 00:00:00 2001 From: Sale Djenic Date: Thu, 13 Jun 2024 15:38:08 +0200 Subject: [PATCH] fix_: router crash when packid is nil --- services/wallet/router/router_v2.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/services/wallet/router/router_v2.go b/services/wallet/router/router_v2.go index cbee03a22..db327b690 100644 --- a/services/wallet/router/router_v2.go +++ b/services/wallet/router/router_v2.go @@ -13,7 +13,6 @@ import ( "github.com/status-im/status-go/params" "github.com/status-im/status-go/services/ens" "github.com/status-im/status-go/services/wallet/async" - "github.com/status-im/status-go/services/wallet/bigint" walletCommon "github.com/status-im/status-go/services/wallet/common" "github.com/status-im/status-go/services/wallet/router/pathprocessor" walletToken "github.com/status-im/status-go/services/wallet/token" @@ -49,9 +48,9 @@ type RouteInputParams struct { TestnetMode bool `json:"testnetMode"` // For send types like EnsRegister, EnsRelease, EnsSetPubKey, StickersBuy - Username string `json:"username"` - PublicKey string `json:"publicKey"` - PackID *bigint.BigInt `json:"packID"` + Username string `json:"username"` + PublicKey string `json:"publicKey"` + PackID *hexutil.Big `json:"packID"` } type PathV2 struct { @@ -492,7 +491,7 @@ func (r *Router) SuggestedRoutesV2(ctx context.Context, input *RouteInputParams) Username: input.Username, PublicKey: input.PublicKey, - PackID: input.PackID.Int, + PackID: input.PackID.ToInt(), } can, err := pProcessor.AvailableFor(processorInputParams)