mirror of
https://github.com/aljazceru/cdk.git
synced 2026-01-04 13:35:20 +01:00
feat: implement nut-06 time
This commit is contained in:
committed by
thesimplekid
parent
69be0838c4
commit
e67dc15ce6
@@ -79,6 +79,7 @@ impl JsMintInfo {
|
||||
nuts: JsValue,
|
||||
mint_icon_url: Option<String>,
|
||||
motd: Option<String>,
|
||||
time: Option<u64>,
|
||||
) -> Result<JsMintInfo> {
|
||||
Ok(JsMintInfo {
|
||||
inner: MintInfo {
|
||||
@@ -92,6 +93,7 @@ impl JsMintInfo {
|
||||
nuts: serde_wasm_bindgen::from_value(nuts).map_err(into_err)?,
|
||||
mint_icon_url,
|
||||
motd,
|
||||
time,
|
||||
},
|
||||
})
|
||||
}
|
||||
@@ -152,6 +154,12 @@ impl JsMintInfo {
|
||||
pub fn motd(&self) -> Option<String> {
|
||||
self.inner.motd.clone()
|
||||
}
|
||||
|
||||
/// Get time
|
||||
#[wasm_bindgen(getter)]
|
||||
pub fn time(&self) -> Option<u64> {
|
||||
self.inner.time
|
||||
}
|
||||
}
|
||||
|
||||
#[wasm_bindgen(js_name = ContactInfo)]
|
||||
|
||||
Reference in New Issue
Block a user