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

store multiple local keys for one account #838

Open
think-in-universe opened this issue Apr 9, 2022 · 1 comment
Open

store multiple local keys for one account #838

think-in-universe opened this issue Apr 9, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@think-in-universe
Copy link
Member

think-in-universe commented Apr 9, 2022

Is your feature request related to a problem? Please describe.
Now when requestSignIn by one account, one local private function call key for one contract X will be saved in the local storage. If signIn again with another contract Y, the saved local private function call key for contract X will be overwritten.

This works for 95% of the scenarios, but it's not convenient when the DApp needs to interact with more than 2 or 3 contracts.

Describe the solution you'd like
Make it possible to requestSignIn for multiple contracts, and save the local private function call keys for multiple contracts in the local storage. When signAndSendTransaction, search all the local keys to find the appropriate local private key to use.

Describe alternatives you've considered
This pattern actually is related to NEAR web wallet which requires the DApp to save private function call key to local storage to reduce unnecessary redirect.

In the case of browser extension (injected) wallet, we may just requestSignIn multiple times, and would let the extension to decide which keys to use. So maybe we can move the logic out of the core package, but make an optional feature for web wallet.

Additional context
This is met by some developers who're building their DApps which need to interact with 3 contracts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: NEW❗
Development

No branches or pull requests

2 participants