Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vcastellm committed Dec 18, 2023
1 parent a5ce8a0 commit 41328d1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func start(cliCtx *cli.Context) error {
c,
addr,
storage,
ethMan,
&ethMan,
etm,
)

Expand Down
2 changes: 1 addition & 1 deletion interop/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 1 addition & 3 deletions rpc/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,13 @@ 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))

return
}

result = res.Status.String()

return
}

0 comments on commit 41328d1

Please sign in to comment.