Closed ghost closed 2 years ago
Yes, this is intentional. Send
was never pulling the UTXOs. You need to do:
key.get_balance() # or get_unspents()
key.send(...)
I was calling key.get_unspents()
first, but I wasn't passing it as an argument to send()
.
You don't need to pass it as an argument.
I just tested it and can confirm you do not need to pass the unspents as an argument. Here is the code:
from bitcash import Key
print(key.to_wif()) # in case you close the Python shell
print(key.address) # add some funds here
key.get_balance()
key.send([], leftover="bitcoincash:xxxxx") # replace with your BCH address
Ah, I think you're right. I was doing something stupid and not reusing the same key object.
Thank you!
It looks like send() no longer gets unspents. I can get_unspents() and I'll get them, and if I don't pass the unspents to send(), it'll say there are none. If I pass the unspents as an argument to send(), it works fine.
Is this intentional? Seems like different behavior than I remember.
Thank you!