Commit b4811d8c authored by Ralph Pichler's avatar Ralph Pichler Committed by GitHub

swap: treat not found cashout transactions as pending (#1484)

parent 1f31cf10
...@@ -10,6 +10,7 @@ import ( ...@@ -10,6 +10,7 @@ import (
"fmt" "fmt"
"math/big" "math/big"
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/types"
"github.com/ethersphere/bee/pkg/sctx" "github.com/ethersphere/bee/pkg/sctx"
...@@ -143,8 +144,12 @@ func (s *cashoutService) CashoutStatus(ctx context.Context, chequebookAddress co ...@@ -143,8 +144,12 @@ func (s *cashoutService) CashoutStatus(ctx context.Context, chequebookAddress co
_, pending, err := s.backend.TransactionByHash(ctx, action.TxHash) _, pending, err := s.backend.TransactionByHash(ctx, action.TxHash)
if err != nil { if err != nil {
// treat not found as pending
if !errors.Is(err, ethereum.NotFound) {
return nil, err return nil, err
} }
pending = true
}
if pending { if pending {
return &CashoutStatus{ return &CashoutStatus{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment