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

Fix account linking issues #128

Merged
merged 1 commit into from
Jun 20, 2023
Merged

Fix account linking issues #128

merged 1 commit into from
Jun 20, 2023

Conversation

bgins
Copy link
Member

@bgins bgins commented Jun 20, 2023

Description

This PR fixes account linking bugs.

Failed to fetch root DID

The account linking consumer is initialized a second time after account linking. It seems the link-device page is loaded a second time.

The fix here is guarding the initialization call when we have a session, which prevents the account linking consumer from starting unnecessarily.

if (!$sessionStore.session) {
initAccountLinkingConsumer()
}

Could not parse a valid private tree using the given key

The file system data root may not be available immediately after linking completes. This issue is documented in oddsdk/ts-odd#529. When this issue occurs, the result is a Error: Could not parse a valid private tree using the given key, but only after a reload.

The fix for this issue is waiting in the account linking consumer until the data root is available (when it is a non-empty CID).

Type of change

  • Bug fix (non-breaking change that fixes an issue)

Testing

Create a new account and link it on a second device immediately and as quickly as possible. No errors should occur and the file system should load and work as expected.

@bgins bgins requested a review from avivash June 20, 2023 18:03
@vercel
Copy link

vercel bot commented Jun 20, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
odd-app-template ✅ Ready (Inspect) Visit Preview Jun 20, 2023 6:03pm

@avivash avivash merged commit 506172e into main Jun 20, 2023
avivash added a commit that referenced this pull request Jun 20, 2023
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

Successfully merging this pull request may close these issues.

2 participants