From 6415acd9b2b00fe36026abd7812096d131fc0719 Mon Sep 17 00:00:00 2001 From: trajan0x <83933037+trajan0x@users.noreply.github.com> Date: Thu, 17 Oct 2024 14:36:47 -0400 Subject: [PATCH] fix withdrawal api [SLT-365] (#3306) Co-authored-by: Trajan0x --- services/rfq/relayer/relapi/handler.go | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/services/rfq/relayer/relapi/handler.go b/services/rfq/relayer/relapi/handler.go index ca68a87a48..1ae5b211ae 100644 --- a/services/rfq/relayer/relapi/handler.go +++ b/services/rfq/relayer/relapi/handler.go @@ -3,6 +3,7 @@ package relapi import ( "encoding/json" "fmt" + "github.com/synapsecns/sanguine/core" "math/big" "net/http" @@ -196,17 +197,8 @@ func (h *Handler) Withdraw(c *gin.Context) { if util.IsGasToken(req.TokenAddress) { nonce, err = h.submitter.SubmitTransaction(ctx, big.NewInt(int64(req.ChainID)), func(transactor *bind.TransactOpts) (tx *types.Transaction, err error) { bc := bind.NewBoundContract(req.To, abi.ABI{}, h.chains[req.ChainID].Client, h.chains[req.ChainID].Client, h.chains[req.ChainID].Client) - if transactor.GasPrice != nil { - transactor.Value = value - // nolint: wrapcheck - return bc.Transfer(transactor) - } - var signer *types.Transaction - signer, err = transactor.Signer(h.submitter.Address(), tx) - if err != nil { - return nil, fmt.Errorf("could not get signer: %w", err) - } - return signer, nil + transactor.Value = core.CopyBigInt(value) + return bc.Transfer(transactor) }) if err != nil { c.JSON(http.StatusInternalServerError, gin.H{"error": fmt.Sprintf("could not submit transaction: %s", err.Error())})