Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[PM-11764] Implement account switching and sdk initialization #1116
[PM-11764] Implement account switching and sdk initialization #1116
Changes from 14 commits
6fb114b
0857aa6
8670757
8860dfd
bbaccba
94e9510
30dac65
1d1644f
02ec621
a1201f1
e23e30b
79505d4
0105672
8452d66
5c6bcda
5ee793a
3c24ae7
5ea7645
fe72f34
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Huh, I just discovered now thanks to this that you can use a top level
{}
block in ause
statement, neat!Check warning on line 21 in crates/bitwarden-core/src/mobile/crypto.rs
Codecov / codecov/patch
crates/bitwarden-core/src/mobile/crypto.rs#L21
Check warning on line 36 in crates/bitwarden-core/src/mobile/crypto.rs
Codecov / codecov/patch
crates/bitwarden-core/src/mobile/crypto.rs#L36
Check warning on line 80 in crates/bitwarden-core/src/mobile/crypto.rs
Codecov / codecov/patch
crates/bitwarden-core/src/mobile/crypto.rs#L80
Check warning on line 193 in crates/bitwarden-core/src/mobile/crypto.rs
Codecov / codecov/patch
crates/bitwarden-core/src/mobile/crypto.rs#L193
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.
We have a
uniffi_support.rs
file, would it make sense to add something similar for these custom logics? Or should we encourage lifting in the uniffi logic to where it's needed.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.
I added
custom_types.rs
which is inspired by that uniffi file, but I think adding the types where they are defined is a preferred approach. It's just that we sometimes use external type and so I needed both approachesCheck warning on line 21 in crates/bitwarden-crypto/src/keys/master_key.rs
Codecov / codecov/patch
crates/bitwarden-crypto/src/keys/master_key.rs#L21
Check warning on line 18 in crates/bitwarden-vault/src/folder.rs
Codecov / codecov/patch
crates/bitwarden-vault/src/folder.rs#L18
Check warning on line 28 in crates/bitwarden-vault/src/folder.rs
Codecov / codecov/patch
crates/bitwarden-vault/src/folder.rs#L28
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.
Nit: This inner value is only used on it's own impl as far as I know, so we don't need it to be
pub(crate)
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.
It's used when creating it, but I can just create a
new
function insteadCheck warning on line 62 in crates/bitwarden-wasm-internal/src/client.rs
Codecov / codecov/patch
crates/bitwarden-wasm-internal/src/client.rs#L60-L62
Check warning on line 66 in crates/bitwarden-wasm-internal/src/client.rs
Codecov / codecov/patch
crates/bitwarden-wasm-internal/src/client.rs#L64-L66
Check warning on line 14 in crates/bitwarden-wasm-internal/src/crypto.rs
Codecov / codecov/patch
crates/bitwarden-wasm-internal/src/crypto.rs#L14
Check warning on line 25 in crates/bitwarden-wasm-internal/src/crypto.rs
Codecov / codecov/patch
crates/bitwarden-wasm-internal/src/crypto.rs#L18-L25
Check warning on line 36 in crates/bitwarden-wasm-internal/src/crypto.rs
Codecov / codecov/patch
crates/bitwarden-wasm-internal/src/crypto.rs#L29-L36
Check warning on line 20 in crates/bitwarden-wasm-internal/src/error.rs
Codecov / codecov/patch
crates/bitwarden-wasm-internal/src/error.rs#L18-L20
Check warning on line 26 in crates/bitwarden-wasm-internal/src/error.rs
Codecov / codecov/patch
crates/bitwarden-wasm-internal/src/error.rs#L24-L26
Check warning on line 32 in crates/bitwarden-wasm-internal/src/error.rs
Codecov / codecov/patch
crates/bitwarden-wasm-internal/src/error.rs#L30-L32