From 41328d168f8eb40acf2e581649a2047fe1b8ab1c Mon Sep 17 00:00:00 2001 From: Victor Castell Date: Mon, 18 Dec 2023 11:58:46 +0100 Subject: [PATCH] Fixes --- cmd/main.go | 2 +- interop/query.go | 2 +- rpc/rpc.go | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index c2415c2..303ef33 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -133,7 +133,7 @@ func start(cliCtx *cli.Context) error { c, addr, storage, - ethMan, + ðMan, etm, ) diff --git a/interop/query.go b/interop/query.go index 9f230cc..9fd4eb4 100644 --- a/interop/query.go +++ b/interop/query.go @@ -9,7 +9,7 @@ import ( "github.com/jackc/pgx/v4" ) -func (e *Executor) GetTxStatus(ctx context.Context, hash common.Hash, dbTx pgx.Tx) (result interface{}, err types.Error) { +func (e *Executor) GetTxStatus(ctx context.Context, hash common.Hash, dbTx pgx.Tx) (result string, err types.Error) { res, innerErr := e.ethTxMan.Result(ctx, ethTxManOwner, hash.Hex(), dbTx) if innerErr != nil { result = "0x0" diff --git a/rpc/rpc.go b/rpc/rpc.go index 2f23e86..cf1a6cd 100644 --- a/rpc/rpc.go +++ b/rpc/rpc.go @@ -99,7 +99,7 @@ func (i *InteropEndpoints) GetTxStatus(hash common.Hash) (result interface{}, er } }() - res, innerErr := i.executor.GetTxStatus(i.ctx, hash, dbTx) + result, innerErr = i.executor.GetTxStatus(i.ctx, hash, dbTx) if innerErr != nil { result = "0x0" err = types.NewRPCError(types.DefaultErrorCode, fmt.Sprintf("failed to get tx, error: %s", innerErr)) @@ -107,7 +107,5 @@ func (i *InteropEndpoints) GetTxStatus(hash common.Hash) (result interface{}, er return } - result = res.Status.String() - return }