gnolang / gnonative

Develop for Gno using your app's native language
Apache License 2.0
9 stars 9 forks source link

UI to enter password when needed #57

Closed jefft0 closed 11 months ago

jefft0 commented 11 months ago

Scenario: The user has created one or more accounts. The user closes the app. The user opens the app and selects an account. Problem: There is no password. Some operations are possible, such as get account balance. But Call requires the password. For example in the Dev screen to post to the board will fail with "can't decrypt password".

Possible solution 1: Improve the Call API method with a gRPC error ErrDecryptionFailed. The UI checks for this and asks the user to enter the password. (Need to do this in any case if the password has changed in the Keybase, or timed out.) Possible solution 2: SelectAccount (switch account) result includes hasPassword which is false if the password is blank. The UI must check for this and ask for the password the first time. Not as ideal because the UI may ask for a password even though it's not needed, but that's OK.

In any solution: Maybe there should there be an API method to check if the password is valid?