Page MenuHomePhabricator

D13850.id45517.diff
No OneTemporary

D13850.id45517.diff

diff --git a/lib/types/backup-types.js b/lib/types/backup-types.js
--- a/lib/types/backup-types.js
+++ b/lib/types/backup-types.js
@@ -21,14 +21,12 @@
// This type should match `SIWEBackupData` in
// `native/native_rust_library/src/backup.rs`
export type SIWEBackupData = {
- +backupID: string,
+siweBackupMsgNonce: string,
+siweBackupMsgStatement: string,
+siweBackupMsgIssuedAt: string,
};
export const siweBackupDataValidator: TInterface<SIWEBackupData> =
tShape<SIWEBackupData>({
- backupID: t.String,
siweBackupMsgNonce: t.String,
siweBackupMsgStatement: t.String,
siweBackupMsgIssuedAt: t.String,
diff --git a/native/native_rust_library/src/backup.rs b/native/native_rust_library/src/backup.rs
--- a/native/native_rust_library/src/backup.rs
+++ b/native/native_rust_library/src/backup.rs
@@ -194,7 +194,6 @@
}
fn get_siwe_backup_data_from_msg(
- backup_id: String,
siwe_backup_msg: String,
) -> Result<SIWEBackupData, String> {
let siwe_backup_msg_obj: Message = match siwe_backup_msg.parse() {
@@ -215,7 +214,6 @@
let siwe_backup_msg_issued_at = siwe_backup_msg_obj.issued_at.to_string();
Ok(SIWEBackupData {
- backup_id,
siwe_backup_msg_nonce,
siwe_backup_msg_statement,
siwe_backup_msg_issued_at,
@@ -245,10 +243,7 @@
let siwe_backup_data = match siwe_backup_msg {
Some(siwe_backup_msg_value) => {
- match get_siwe_backup_data_from_msg(
- backup_id.clone(),
- siwe_backup_msg_value,
- ) {
+ match get_siwe_backup_data_from_msg(siwe_backup_msg_value) {
Ok(data) => Some(data),
Err(err) => {
string_callback(err, promise_id, "".to_string());
@@ -451,8 +446,6 @@
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
struct SIWEBackupData {
- #[serde(rename = "backupID")]
- backup_id: String,
siwe_backup_msg_statement: String,
siwe_backup_msg_nonce: String,
siwe_backup_msg_issued_at: String,

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 2, 12:29 AM (22 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2398743
Default Alt Text
D13850.id45517.diff (2 KB)

Event Timeline