wallet.incoming(tx_id=tx_id) doesn't return any IncomingPayment(s) when the tx is unconfirmed
Closed this issue · 1 comments
t-900-a commented
I'm not sure if this was intentional or not, if it is then feel free to close this issue.
The issue:
Scenario: A tx is currently unconfirmed / in the mem pool / not on the blockchain. The tx_id is 'abcdefg'
Code:
wallet = Wallet(JSONRPCWallet())
incoming_txs = w.incoming(tx_id='abcdefg')
Problem:
incoming_txs is an empty list : []
Work around:
Code:
incoming_txs = w.incoming(unconfirmed=True, confirmed=False)
for tx in incoming_txs:
if tx.transaction.hash == 'abcdefg':
# do something
# found tx
break
emesik commented
It seems you missed unconfirmed=True
kwarg in the first call. I've just run a test and cannot reproduce the error.