Skip to content

Commit 746c5dc

Browse files
committed
Add a constructor for ImportDescriptorsRequest
1 parent 4f534f3 commit 746c5dc

File tree

1 file changed

+7
-0
lines changed
  • client/src/client_sync/v21

1 file changed

+7
-0
lines changed

client/src/client_sync/v21/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,3 +192,10 @@ pub struct ImportDescriptorsRequest {
192192
/// Time from which to start rescanning the blockchain for this descriptor, in UNIX epoch time or "now".
193193
pub timestamp: serde_json::Value,
194194
}
195+
196+
impl ImportDescriptorsRequest {
197+
/// Constructs a new ImportDescriptorsRequest.
198+
pub fn new(descriptor: impl Into<String>, timestamp: impl Into<serde_json::Value>) -> Self {
199+
ImportDescriptorsRequest { descriptor: descriptor.into(), timestamp: timestamp.into() }
200+
}
201+
}

0 commit comments

Comments
 (0)