Page MenuHomePhabricator

[backup-client] refactor `SIWEBackupData` type
ClosedPublic

Authored by kamil on Thu, Oct 31, 4:44 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 20, 4:00 AM
Unknown Object (File)
Tue, Nov 12, 4:39 PM
Unknown Object (File)
Mon, Nov 11, 12:11 PM
Unknown Object (File)
Mon, Nov 11, 11:26 AM
Unknown Object (File)
Mon, Nov 11, 10:42 AM
Unknown Object (File)
Mon, Nov 11, 10:35 AM
Unknown Object (File)
Sat, Nov 9, 1:58 PM
Unknown Object (File)
Sat, Nov 9, 11:54 AM
Subscribers

Details

Summary

ENG-6145.

  1. Move retrieving SIWEBackupData to a util funtion - it will be needed later in the stack
  2. Move types to proper places on JS side
  3. Add comment keep types in sync
  4. Add validation on JS side
  5. Remove siwe_backup_msg - it's not needed
Test Plan

Test backup restore for Wallet user

Diff Detail

Repository
rCOMM Comm
Branch
backup-work-4
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Thu, Oct 31, 8:46 AM
kamil added inline comments.
lib/types/backup-types.js
24

This is not needed, it's removed in D13850 to make CI pass

bartek added inline comments.
native/native_rust_library/src/backup.rs
253–272

Nit: to avoid nested match you could use let-else to unwrap Some(siwe_backup_msg_value) and then the inner match get_siwe_backup_data_from_msg() would not be nested

This revision is now accepted and ready to land.Mon, Nov 4, 11:20 PM