Merge pull request 'fix(wallet): conjunctive receipt verify' (#4) from wt/t_70fc1f81 into main
All checks were successful
ci / test (push) Successful in 2m56s

Reviewed-on: #4
This commit is contained in:
sirius 2026-09-10 19:28:14 -04:00
commit bdea9578e4
3 changed files with 91 additions and 8 deletions

View file

@ -140,12 +140,11 @@ impl Wallet {
}
pub fn transfers_match(rows: &[TransferRow], txid: &str, amount: &str, address: &str) -> bool {
rows.iter().any(|r| {
r.txid == txid
|| (!address.is_empty()
&& r.address == address
&& (amount.is_empty() || r.amount == amount))
})
if txid.is_empty() || amount.is_empty() || address.is_empty() {
return false;
}
rows.iter()
.any(|r| r.txid == txid && r.amount == amount && r.address == address)
}
fn parse_http_url(url: &str) -> Result<Endpoint> {