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

fix(transaction): add a missing return, implement a mock function (#2145)

parent 19922038
...@@ -194,6 +194,7 @@ func (t *transactionService) waitForPendingTx(txHash common.Hash) { ...@@ -194,6 +194,7 @@ func (t *transactionService) waitForPendingTx(txHash common.Hash) {
if err != nil { if err != nil {
if !errors.Is(err, ErrTransactionCancelled) { if !errors.Is(err, ErrTransactionCancelled) {
t.logger.Errorf("error while waiting for pending transaction %x: %v", txHash, err) t.logger.Errorf("error while waiting for pending transaction %x: %v", txHash, err)
return
} }
t.logger.Warningf("pending transaction %x cancelled", txHash) t.logger.Warningf("pending transaction %x cancelled", txHash)
} else { } else {
......
...@@ -119,7 +119,11 @@ func TestTransactionSend(t *testing.T) { ...@@ -119,7 +119,11 @@ func TestTransactionSend(t *testing.T) {
signerMockForTransaction(signedTx, sender, chainID, t), signerMockForTransaction(signedTx, sender, chainID, t),
store, store,
chainID, chainID,
monitormock.New(), monitormock.New(
monitormock.WithWatchTransactionFunc(func(txHash common.Hash, nonce uint64) (<-chan types.Receipt, <-chan error, error) {
return nil, nil, nil
}),
),
) )
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
......
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