fix(NUT10): secret tag is optional

This commit is contained in:
thesimplekid
2024-06-21 11:44:38 +02:00
parent b066b92a8d
commit a97f64fa56
8 changed files with 122 additions and 87 deletions

View File

@@ -100,7 +100,10 @@ pub async fn send(wallet: Wallet, sub_command_args: &SendSubCommand) -> Result<(
)
.unwrap();
Some(SpendingConditions::new_htlc(preimage.clone(), conditions)?)
Some(SpendingConditions::new_htlc(
preimage.clone(),
Some(conditions),
)?)
}
None => match sub_command_args.pubkey.is_empty() {
true => None,
@@ -136,7 +139,7 @@ pub async fn send(wallet: Wallet, sub_command_args: &SendSubCommand) -> Result<(
Some(SpendingConditions::P2PKConditions {
data: data_pubkey,
conditions,
conditions: Some(conditions),
})
}
},