anoma / namada

Rust implementation of Namada, a Proof-of-Stake L1 for interchain asset-agnostic privacy
https://namada.net
GNU General Public License v3.0
2.4k stars 956 forks source link

Show key aliases when prompted for Multisignature Accounts passwords #2513

Closed Rigorously closed 2 months ago

Rigorously commented 9 months ago

When interacting with Multisignature Accounts, the prompts for the decryption password are unlabeled. That could be confusing and unintuitive when some but not all signing keys are imported from another wallet. Consider the following examples:

$ namadac init-account \
--alias my-multisig-alias \
--public-keys my-key1,imported1,imported2 \
--signing-keys my-key1,imported1,imported2 \
--threshold 2
Enter your decryption password:
Enter your decryption password:

The account is initialized with 3 keys, but namadac will prompt for the 2 imported keys. The passwords have to be entered in the order in which they are present in the command.

The current behavior gives pause, because is the prompt repeated due to an incorrectly entered password? Which one has to be entered next?

$ namadac sign-tx \
--tx-path "<path-to-file>" \
--signing-keys my-key1,imported1,imported2 \
--owner my-multisig-alias
Enter your decryption password:
Enter your decryption password:
Enter your decryption password:

Namadac will prompt for all keys. The passwords have to be entered in the order in which they are present in the command.

My suggestion is to add the key aliases (or keys in the absence of aliases):

Enter decryption password for `my-key1`:
Enter decryption password for `imported1`:
Enter decryption password for `imported2`:
cwgoes commented 2 months ago

Fixed by https://github.com/anoma/namada/pull/3681