Skip to content

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

Open
@marekyggdrasil

Description

@marekyggdrasil

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions