Skip to content

Commit 2fed242

Browse files
committed
wasm: add derivation details
1 parent 77168ed commit 2fed242

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lwk_wasm/src/pset_details.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ fn convert(data: &[(elements::bitcoin::PublicKey, KeySource)]) -> JsValue {
109109
serde_wasm_bindgen::to_value(
110110
&data
111111
.iter()
112-
.map(|(a, b)| (a.to_string(), b.0.to_string())) // TODO include derivation path
112+
.map(|(a, b)| (a.to_string(), b.0.to_string(), b.1.to_string())) // TODO include derivation path
113113
.collect::<Vec<_>>(),
114114
)
115115
.expect("should map")
@@ -230,8 +230,8 @@ mod tests {
230230
let signatures = details.signatures();
231231
assert_eq!(signatures.len(), 1);
232232

233-
assert_eq!(format!("{:?}", signatures[0].has_signature()), "JsValue([[\"02ab89406d9cf32ff1819838136eecb65c07add8e8ef1cd2d6c64bab1d85606453\", \"6e055509\"]])");
234-
assert_eq!(format!("{:?}", signatures[0].missing_signature()), "JsValue([[\"03c1d0c7ddab5bd5bffbe0bf04a8a570eeabd9b6356358ecaacc242f658c7d5aad\", \"281e2239\"]])");
233+
assert_eq!(format!("{:?}", signatures[0].has_signature()), "JsValue([[\"02ab89406d9cf32ff1819838136eecb65c07add8e8ef1cd2d6c64bab1d85606453\", \"6e055509\", \"m/87'/1'/0'/0/0\"]])");
234+
assert_eq!(format!("{:?}", signatures[0].missing_signature()), "JsValue([[\"03c1d0c7ddab5bd5bffbe0bf04a8a570eeabd9b6356358ecaacc242f658c7d5aad\", \"281e2239\", \"m/87'/1'/0'/0/0\"]])");
235235

236236
let issuances = details.inputs_issuances();
237237
assert_eq!(issuances.len(), 1);

0 commit comments

Comments
 (0)