Page MenuHomePhabricator

[backup-client] refactor `SIWEBackupData` type
ClosedPublic

Authored by kamil on Thu, Oct 31, 4:44 AM.
Tags
None
Referenced Files
F3387814: D13836.id45667.diff
Fri, Nov 29, 11:17 AM
F3386929: D13836.id.diff
Fri, Nov 29, 6:50 AM
Unknown Object (File)
Wed, Nov 27, 11:09 AM
Unknown Object (File)
Tue, Nov 26, 5:55 AM
Unknown Object (File)
Fri, Nov 22, 11:55 AM
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
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #45498)

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 ↗(On Diff #45498)

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