Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Commit

Permalink
Remove creditCards, urls and postalAddresses from PersonaData and tes…
Browse files Browse the repository at this point in the history
…t vector.
  • Loading branch information
Sajjon committed Jan 31, 2024
1 parent 224851c commit 6071554
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 49 deletions.
37 changes: 0 additions & 37 deletions profile/src/v100/entity/persona/persona_data/persona_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,40 +53,6 @@ pub struct PersonaData {
/// `(Uuid, PersonaDataIdentifiedEmailAddress)`, each element is identifiable by its ID. Can be empty, can
/// contain elements with the same value, but under different IDs.
pub email_addresses: CollectionOfEmailAddresses,

/// Includes "postalAddresses: []" JSON when `PersonaData` is serialized, which is required to be
/// compatible with wallets, but the clients to not yet use Postal Addresses, so we defer creation
/// of it.
#[serde(default)]
postal_addresses: NothingList,

/// Includes "creditCards: []" JSON when `PersonaData` is serialized, which is required to be
/// compatible with wallets, but the clients to not yet use Credit Cards, so we defer creation
/// of it.
#[serde(default)]
credit_cards: NothingList,

/// Includes "urls: []" JSON when `PersonaData` is serialized, which is required to be
/// compatible with wallets, but the clients to not yet use URLs, so we defer creation
/// of it.
#[serde(default)]
urls: NothingList,
}

#[derive(
Serialize,
Deserialize,
Debug,
Clone,
Default,
PartialEq,
Hash,
Eq,
uniffi::Record,
)]
#[serde(transparent)]
pub struct NothingList {
empty: Vec<bool>,
}

impl PersonaData {
Expand All @@ -99,9 +65,6 @@ impl PersonaData {
name,
phone_numbers,
email_addresses,
postal_addresses: NothingList::default(),
credit_cards: NothingList::default(),
urls: NothingList::default(),
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@
"flags": [],
"displayName": "Sajjon",
"personaData": {
"postalAddresses": [],
"creditCards": [],
"emailAddresses": [
{
"id": "8d8ab282-ab20-4d07-8461-06a31553af1c",
Expand All @@ -109,8 +107,7 @@
"id": "f30a2a14-e25f-4597-8a49-e74fedb10f44",
"value": "0700838198"
}
],
"urls": []
]
},
"address": "identity_tdx_e_122k9saakdjazzwm98rlpjlwewy0wvx0csmtvstdut528r0t0z8cy30"
}
Expand Down Expand Up @@ -849,11 +846,8 @@
],
"displayName": "Stokeman",
"personaData": {
"postalAddresses": [],
"creditCards": [],
"phoneNumbers": [],
"emailAddresses": [],
"urls": []
"emailAddresses": []
},
"address": "identity_tdx_2_1224clayjwq45swgd0xj2uc4s3gq4l6g7q77f9d290su4flufq2lt9j"
},
Expand Down Expand Up @@ -894,8 +888,6 @@
],
"displayName": "Dan",
"personaData": {
"postalAddresses": [],
"creditCards": [],
"emailAddresses": [
{
"id": "f6cfe950-100c-4696-9aa2-68766d10b6be",
Expand All @@ -916,8 +908,7 @@
"id": "fb3e1ac2-fcc7-474c-82a2-600e1a2d69e9",
"value": "1337"
}
],
"urls": []
]
},
"address": "identity_tdx_2_122tvh7nq6jd2mp7l8ar5kayc3wr5u5z5pew9r86vtvlwnsydx80pne"
}
Expand Down

0 comments on commit 6071554

Please sign in to comment.