Commit 09c5507b authored by oysheng's avatar oysheng Committed by Paladz

fix query transactions error (#1703)

* fix query transactions error

* optimise
parent de01d917
......@@ -144,9 +144,10 @@ func (a *API) listTransactions(ctx context.Context, filter struct {
transaction, err = a.wallet.GetTransactionByTxID(filter.ID)
if err != nil && filter.Unconfirmed {
transaction, err = a.wallet.GetUnconfirmedTxByTxID(filter.ID)
if err != nil {
return NewErrorResponse(err)
}
}
if err != nil {
return NewErrorResponse(err)
}
transactions = []*query.AnnotatedTx{transaction}
} else {
......
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