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

JS wallet creation is missing accountId #195

Open
ebaizel opened this issue Nov 30, 2021 · 2 comments
Open

JS wallet creation is missing accountId #195

ebaizel opened this issue Nov 30, 2021 · 2 comments

Comments

@ebaizel
Copy link
Contributor

ebaizel commented Nov 30, 2021

Expected Behaviour

Following the steps to create a Wallet here, I would expect to be able to complete all the steps successfully.

I continue getting an Error("Unknown account") that is thrown from the code sample here

🙋‍️ Possible Solution [optional]

I added await syncWallet.resolveAccountId(); and that created the accountId, and I was able to complete the rest of the steps successfully.

Note: I got the idea for the solution by looking at the Rust SDK docs which have a similar method wallet.update_account_id().await?;. I think the JS docs should be updated to include this step as well.

@lsbyerley
Copy link

I am running into this same issue, but using await syncWallet.resolveAccountId(); does not create an account id for me. When I run that function i get Error: Can't resolve account id from the zkSync node

Not sure what else to do

@lsbyerley
Copy link

You need to deposit some eth into the zksync account and that will indeed give you an accountId

https://github.com/matter-labs/zksync-docs/blob/master/docs/api/sdk/js/tutorial.md#depositing-assets-from-ethereum-into-zksync

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants