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

feat(wasm): Import/export account #893

Merged
merged 50 commits into from
Dec 20, 2024
Merged

feat(wasm): Import/export account #893

merged 50 commits into from
Dec 20, 2024

Conversation

Flemmli97
Copy link
Contributor

What this PR does 📖

  • Adds ability to import/export accounts
  • Importing:
    • At login screen: Clicking on import brings up pin page to type in a new pin.
    • Continuing brings up a passphrase page where the user can either type the passphrase in or upload from a file. Words in the file can be separated by either a newline or whitespace
    • Importing can be done either via remote (dont think its enabled yet) or from a file
  • Exporting:
    • Adds ability to export in the profile settings page. Either to remote or to a file. If remote is enabled at some point that should also be done automatically. The button is there if someone wants to manually do it too

Which issue(s) this PR fixes 🔨

Special notes for reviewers 🗒️

A lot of errors are due to wasm update which is handled in #868. I just didnt include the stuff in that pr here too. So ideally merge #868 first

@github-actions github-actions bot added the Missing dev review Two dev reviews are required on PR label Nov 27, 2024
Copy link

github-actions bot commented Nov 27, 2024

Automated tests execution is complete! You can find the Playwright test report here and the Allure Test Report here

Copy link

github-actions bot commented Nov 27, 2024

Download the app installers for this pull request:

@github-actions github-actions bot added the Failed Automated Test Failed Automated Tests CI label Nov 27, 2024
@stavares843 stavares843 removed the Failed Automated Test Failed Automated Tests CI label Nov 27, 2024
Copy link
Member

@stavares843 stavares843 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go to import > dont import > back > sign up > add name > error

Gravacao.do.ecra.2024-11-27.as.18.25.45.mov

chrome, macOS

Copy link
Member

@stavares843 stavares843 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Captura de ecrã 2024-11-27, às 18 27 12

i made a new account
settings
export to both file and remote
deleted account
import
add seed
use file

says identity does not exist - does that mean it was really removed?

@stavares843 stavares843 added the QA Requested Changes Changes need to be addressed, something is not working as expected. label Nov 27, 2024
stavares843

This comment was marked as outdated.

@github-actions github-actions bot added the Failed Automated Test Failed Automated Tests CI label Nov 27, 2024
@stavares843 stavares843 removed the Failed Automated Test Failed Automated Tests CI label Nov 27, 2024
@github-actions github-actions bot added the Failed Automated Test Failed Automated Tests CI label Nov 27, 2024
@Flemmli97
Copy link
Contributor Author

Flemmli97 commented Nov 28, 2024

Captura de ecrã 2024-11-27, às 18 27 12 i made a new account settings export to both file and remote deleted account import add seed use file

says identity does not exist - does that mean it was really removed?

does import still work? it might be because warp instances are still dangling around with some polling stuff. the way i tested it just open a new incognito tab and import there. that way all dangling data is gone

@stavares843
Copy link
Member

does import still work?

when i delete account no

@stavares843 stavares843 removed the Failed Automated Test Failed Automated Tests CI label Nov 28, 2024
@Flemmli97 Flemmli97 removed the QA Requested Changes Changes need to be addressed, something is not working as expected. label Dec 13, 2024
@stavares843 stavares843 removed the Failed Automated Test Failed Automated Tests CI label Dec 13, 2024
@github-actions github-actions bot added the Failed Automated Test Failed Automated Tests CI label Dec 13, 2024
@github-actions github-actions bot removed the Failed Automated Test Failed Automated Tests CI label Dec 13, 2024
Copy link
Contributor

@dariusc93 dariusc93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. left a small comment and a suggestion

Though testing has been done by QA to confirm that importing and exporting does work, it is still a WIP to finish up other aspects of it as well as clearing up some additional bugs, hence why shuttle will be disabled by default for now while changes are being made. We could block this PR until it is done or we could merge it in with it disabled until. a dev flag is in place to enable or disable it.

Thoughts @phillsatellite @stavares843 @Flemmli97 ?

@@ -620,6 +620,30 @@ class MultipassStore {
}
}

async importAccount(passphrase: string, settings?: { to?: Uint8Array; multipassBox?: wasm.MultiPassBox }): Promise<Result<WarpError, wasm.Identity | undefined>> {
let multipass = settings?.multipassBox ? settings.multipassBox : get(this.multipassWritable)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldnt it be best to use get(this.multipassWritable) altogether?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is because atm during import a temp warp instance is created
i guess we could just remove using the stored instance though since that atm is never used? thoughts?

src/lib/wasm/WarpStore.ts Outdated Show resolved Hide resolved
@stavares843
Copy link
Member

shuttle will be disabled by default

But that means no messages are available on the import

@stavares843
Copy link
Member

if you use any other file instead of the seed one, you will get these mambojambo on the screen

image

flow

  • use backup file to import as a seed
  • appears like that

@phillsatellite phillsatellite added the QA Requested Changes Changes need to be addressed, something is not working as expected. label Dec 17, 2024
@Flemmli97 Flemmli97 removed the QA Requested Changes Changes need to be addressed, something is not working as expected. label Dec 19, 2024
@phillsatellite
Copy link
Contributor

The bug @stavares843 commented is now fixed. I put the blocked label until we get the remote import account working

@phillsatellite phillsatellite added Missing dev review Two dev reviews are required on PR and removed Missing dev review Two dev reviews are required on PR labels Dec 19, 2024
@stavares843 stavares843 merged commit 623ba64 into dev Dec 20, 2024
11 checks passed
@stavares843 stavares843 deleted the import/export_account branch December 20, 2024 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔒 blocked Missing dev review Two dev reviews are required on PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(import): wire in Import account in UplinkWeb
5 participants