-
Notifications
You must be signed in to change notification settings - Fork 80
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(cab): Use new verifiers with custom domains, update torus libs #4942
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4942 +/- ##
==========================================
+ Coverage 85.36% 85.43% +0.07%
==========================================
Files 716 716
Lines 29232 29232
Branches 5086 5084 -2
==========================================
+ Hits 24954 24975 +21
+ Misses 4039 4018 -21
Partials 239 239
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
"@toruslabs/torus.js": "^6.4.1", | ||
"@toruslabs/constants": "^13.1.0", | ||
"@toruslabs/fetch-node-details": "^13.1.1", | ||
"@toruslabs/torus.js": "^12.1.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6 major versions! 🤯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! @jophish can you add test coverage for src/keylessBackup/web3auth.ts
? Then we could close out this TODO https://github.com/valora-inc/wallet/pull/4942/files#diff-85d748cd60f247c80e4683d73906b699e600482591a17a57dc39a382055ee038R9-R10
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as outdated.
This comment was marked as outdated.
### Description This fixes the following [error happening during the iOS build](https://github.com/valora-inc/release-automation/actions/runs/8045843098/job/21971906062): ``` [08:38:58]: ▸ + /opt/homebrew/bin/jq -r '.mainnet|to_entries|map("\(.key)=\(.value|tostring)")|.[]' /Users/runner/work/release-automation/release-automation/wallet/ios/../secrets.json [08:38:58]: ▸ jq: parse error: Expected another key-value pair at line 18, column 3 ``` The problem was introduced in #4942 ### Test plan iOS build works again. ### Related issues N/A ### Backwards compatibility Yes ### Network scalability If a new NetworkId and/or Network are added in the future, the changes in this PR will: - [x] Continue to work without code changes, OR trigger a compilation error (guaranteeing we find it when a new network is added)
…alora-inc#4942) ### Description Kind of a two-birds-one-stone PR, both for [ACT-875](https://linear.app/valora/issue/ACT-875/use-a-custom-domain-with-auth0) and [ACT-876](https://linear.app/valora/issue/ACT-876/refactor-gettorusprivatekey-to-use-updated-torusweb3auth-dependencies). Basically the work that led to this PR progressed as follows: * Updated Auth0 to use custom domains for prod/dev * Tried to update our custom verifiers in web3auth dashboard to use new Auth0 domains * Our existing verifiers were nowhere to be found in the dashboard * Created new verifiers using the newest Sapphire main/devnets (as opposed to deprecated Cyan network, which our previous verifiers were on) * Had trouble adapting our existing wallet code to integrate with the new verifiers * Updated `@torus/*` libraries and referred to their docs for how to migrate, was able to connect to new verifiers * Was able to go through backup + restore using custom Auth0 domains _and_ new verifiers on Alfajores. This fulfills the requirements for both ACT-875 and ACT-876 AFAICT. I haven't yet tried to directly use the web3auth libs _instead_ of the torus libs; I'll give it a shot, but if it doesn't seem to work, the changes in this ticket should also suffice. ### Test plan Manual tested. ### Related issues - Fixes [ACT-875](https://linear.app/valora/issue/ACT-875/use-a-custom-domain-with-auth0) and [ACT-876](https://linear.app/valora/issue/ACT-876/refactor-gettorusprivatekey-to-use-updated-torusweb3auth-dependencies). ### Backwards compatibility This is not backwards compatible, in the sense that someone who's backed up will not be able to restore, but this shouldn't matter since we haven't gone live with CAB yet. ### Network scalability If a new NetworkId and/or Network are added in the future, the changes in this PR will: - [x] Continue to work without code changes, OR trigger a compilation error (guaranteeing we find it when a new network is added) --------- Co-authored-by: Tom McGuire <Mcgtom10@gmail.com> Co-authored-by: Jacob Waterman <jacobrwaterman@gmail.com>
### Description This fixes the following [error happening during the iOS build](https://github.com/valora-inc/release-automation/actions/runs/8045843098/job/21971906062): ``` [08:38:58]: ▸ + /opt/homebrew/bin/jq -r '.mainnet|to_entries|map("\(.key)=\(.value|tostring)")|.[]' /Users/runner/work/release-automation/release-automation/wallet/ios/../secrets.json [08:38:58]: ▸ jq: parse error: Expected another key-value pair at line 18, column 3 ``` The problem was introduced in valora-inc#4942 ### Test plan iOS build works again. ### Related issues N/A ### Backwards compatibility Yes ### Network scalability If a new NetworkId and/or Network are added in the future, the changes in this PR will: - [x] Continue to work without code changes, OR trigger a compilation error (guaranteeing we find it when a new network is added)
Description
Kind of a two-birds-one-stone PR, both for ACT-875 and ACT-876. Basically the work that led to this PR progressed as follows:
@torus/*
libraries and referred to their docs for how to migrate, was able to connect to new verifiersThis fulfills the requirements for both ACT-875 and ACT-876 AFAICT. I haven't yet tried to directly use the web3auth libs instead of the torus libs; I'll give it a shot, but if it doesn't seem to work, the changes in this ticket should also suffice.
Test plan
Manual tested.
Related issues
Backwards compatibility
This is not backwards compatible, in the sense that someone who's backed up will not be able to restore, but this shouldn't matter since we haven't gone live with CAB yet.
Network scalability
If a new NetworkId and/or Network are added in the future, the changes in this PR will: