-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Change UpdatePassword to take multiple addresses, roll back on e…
…rror (#175) BREAKING CHANGE: Change `UpdatePassword` to take an array of addresses, roll back on error. Explanation: Currently, `UpdatePassword` takes a single address of the account to update the password. If a native application wants to change multiple accounts to the new password, it does a loop to call `UpdatePassword` multiple times. But if one of the calls has an error, the application breaks out of the loop and leaves the Keybase in an inconsistent state where some passwords are changed but not all. The application could write some logic to roll back these changes, but it is better for the Gno Native Kit service to handle this. This PR has two commits: 1. Change the `UpdatePassword` request to take a required array of account addresses. (If the application only wants to update the password of one account, it is easy to make an array of one address.) In api.go, we also change `UpdatePassword` to roll back to the old password in case of error. 2. In types.ts and GnoNativeApi.ts, change `updatePassword` to take a required array of Uint8Array for the addresses. --------- Signed-off-by: Jeff Thompson <[email protected]>
- Loading branch information
Showing
14 changed files
with
770 additions
and
464 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.