Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indicate in the WalletError when inputs are locked instead of just throwing InvalidKeychainMask #638

Open
marekyggdrasil opened this issue Jan 9, 2022 · 0 comments

Comments

@marekyggdrasil
Copy link

Is your feature request related to a problem? Please describe.

I purposely created a scenario in which all the inputs are locked (but there is sufficient amount in the wallet to perform test tx). Then I run init_send_tx using Owner API and I observe the error I get does not indicate outputs are locked. Instead it says "InvalidKeychainMask" which I think could also be caused by not opening the wallet before calling init_send_tx making it ambiguous.

grinmw.wallet_v3.WalletError: Callng init_send_tx with params {'token': '11e495a841f3e2bba50c02797e0f4bda579be01dbb6bb7b7167f3ba763cf939b', 'args': {'src_acct_name': None, 'amount': 1000000000, 'minimum_confirmations': 10, 'max_outputs': 500, 'num_change_outputs': 1, 'selection_strategy_is_use_all': True, 'target_slate_version': None, 'payment_proof_recipient_address': 'tgrin1l6pv2gzknv8rc29n2cqdqwj8nyq06jwpg36uxeqyqm00l8vuckxqdk9c9s', 'ttl_blocks': None, 'send_args': None}} failed with error code -32099 because: InvalidKeychainMask

( this is a testnet tx )

Describe the solution you'd like

I would like there to be a specific error message that indicates inputs are locked, so that my service can distinguish scenario of not having a wallet opened from the scenario when there are just no available inputs at the moment.

Describe alternatives you've considered

Alternatively I could see it working with different error message when wallet is not opened. As long as they are distinguishable I think it is good.

Additional context

Birds are real!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant