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

What is the reason of exposing only accountId, but not entire ConnectedWalletAccount? #429

Closed
karpovdmitryod opened this issue Aug 29, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@karpovdmitryod
Copy link

During the migration to WalletSelector, we faced the fact that you are not exposing ConnectedWalletAccount object.

Due to this, many functionalities available before switching to WalletSelected are no longer accessible.
e.g - you just recently added the possibility to get a user signature
another example - we cannot create a new Contract instance, and we are now rewriting everything to RPC calls.

What was the reason for not exposing this object to the end users?

@karpovdmitryod karpovdmitryod added the enhancement New feature or request label Aug 29, 2022
@austinabell
Copy link

Curious about this too. Is the intended pattern that Wallet is used along with a signer account id string?

@grachyov
Copy link

Exposing near-api-js types would make it necessary to inject near-api-js or it's parts.

@karpovdmitryod
Copy link
Author

karpovdmitryod commented Aug 31, 2022

Exposing near-api-js types would make it necessary to inject near-api-js or it's parts.

but near-api-js are already part of wallet selector dependencies.
In our case, migration caused the additional effort

  1. no way to instantiate Contract instance, we had to rewrite everything to RPC calls
  2. no way to access Keystore, and get public key and the user signature. Current verifyOwner implementation feat: Add Support for verifyOwner #391 for my near wallet requires interaction with the wallet for some reasons, and this breaks our UI experience.

@grachyov
Copy link

grachyov commented Aug 31, 2022

but near-api-js are already part of wallet selector dependencies.

Injected scripts do not have direct access to these dependencies.

@amirsaran3
Copy link
Collaborator

@karpovdmitryod Not all wallets use the ConnectedWalletAccount interface. We only expose the accountId since all wallets expose at least that.

If you have any other questions feel free to reopen this issue.

@pharaouk
Copy link

pharaouk commented Feb 20, 2023

No updates on this.....? Very bad design to not allow for full ConnectedWalletAccount object......

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
None yet
Development

No branches or pull requests

5 participants