appditto / pippin_nano_wallet

A high performance, lightweight alternative to the NANO Node developer wallet.
MIT License
67 stars 20 forks source link

Allow for auto_receive_on_send for unopened account #21

Closed pawapps closed 3 years ago

pawapps commented 3 years ago

This pull request will allow for auto_receive_on_send to work when a Nano Account is not yet opened. Before this pull request, when a send was attempted on an unopened account it would result in an AccountNotFound exception being raised in RPCClient.instance().account_info(self.account.address) cancelling the send before it ever checked for balance pending.

To get around this, a call to RPCClient.instance().account_balance(self.account.address) replaces account_info and is now made to check for sufficient balance. And then account_info is retrieved after known sufficient balance.