Skip to content

Commit 18295ed

Browse files
authored
Fix URL ts types (#696)
1 parent 8dc250a commit 18295ed

File tree

5 files changed

+7
-2
lines changed

5 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
* Added `actions` to `BitcreditBillResult`, with `bill_actions`, that are calculated based on which bill actions the caller is currently allowed to do (breaking DB and API change)
44
* Fix an edge case for request to recourse if the payer == holder - they should not have past endorsees and if the payer is a contingent holder, they should not show up in past endorsees
5+
* Fix TS types for urls
56

67
# 0.4.11
78

crates/bcr-ebill-core/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ pub enum GeneralSearchFilterItemType {
170170
#[derive(BorshSerialize, BorshDeserialize, Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
171171
pub struct File {
172172
pub name: String,
173-
pub hash: String,
174-
pub nostr_hash: String,
173+
pub hash: String, // the hash over the unencrypted file
174+
pub nostr_hash: String, // the identification hash on Nostr for the encrypted file
175175
}
176176

177177
#[derive(Debug)]

crates/bcr-ebill-wasm/src/data/bill.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -915,6 +915,7 @@ pub struct BillAnonParticipantWeb {
915915
pub node_id: NodeId,
916916
#[tsify(type = "string | undefined")]
917917
pub email: Option<Email>,
918+
#[tsify(type = "string[]")]
918919
pub nostr_relays: Vec<url::Url>,
919920
}
920921

@@ -939,6 +940,7 @@ pub struct BillIdentParticipantWeb {
939940
pub postal_address: PostalAddressWeb,
940941
#[tsify(type = "string | undefined")]
941942
pub email: Option<Email>,
943+
#[tsify(type = "string[]")]
942944
pub nostr_relays: Vec<url::Url>,
943945
}
944946

crates/bcr-ebill-wasm/src/data/contact.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ pub struct ContactWeb {
128128
pub identification_number: Option<Identification>,
129129
pub avatar_file: Option<FileWeb>,
130130
pub proof_document_file: Option<FileWeb>,
131+
#[tsify(type = "string[]")]
131132
pub nostr_relays: Vec<url::Url>,
132133
pub is_logical: bool,
133134
}

crates/bcr-ebill-wasm/src/data/identity.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ pub struct IdentityWeb {
139139
pub identification_number: Option<Identification>,
140140
pub profile_picture_file: Option<FileWeb>,
141141
pub identity_document_file: Option<FileWeb>,
142+
#[tsify(type = "string[]")]
142143
pub nostr_relays: Vec<url::Url>,
143144
}
144145

0 commit comments

Comments
 (0)