This differentila modifies the C++ and Rust backup code so that it is possible to restore without querying the backup service for backup id if it is already provided. For SIWE users we will know backup id before we want to restore since we need backup message (that comes with backup id) to prepare backup secret.
Details
Details
For now check that restoration for non-password users work. Next diff in the stack will test SIWE case.
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
native/native_rust_library/src/backup.rs | ||
---|---|---|
84 ↗ | (On Diff #40170) | It'd look like this if you applied the suggestion below about using Option |
122 ↗ | (On Diff #40170) | Note that you
So you can't pass an empty string here because this function won't be able to get the ID itself. This is one of the reasons I prefer Option to distinguish if something is required. It saves us from making such mistakes |
266–275 ↗ | (On Diff #40170) | For C++ ↔ Rust communication, relying on empty/non-empty strings is okay. But for internal Rust functions, we should use Option where possible |
400–402 ↗ | (On Diff #40170) | Thanks for adding this! |
Comment Actions
- Address comment about Optional
- Add additional siwe message parsing to avoid having to do it in JS (where we have no tools for that)