Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion orange-sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ impl Wallet {
(
self.inner.tunables.enable_amountless_receive_on_chain,
self.inner.trusted.get_bolt11_invoice(amount).await?,
false,
true,
)
};
if enable_onchain {
Expand Down
3 changes: 3 additions & 0 deletions orange-sdk/tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ async fn test_receive_to_trusted() {
assert!(recv_amt < limit.trusted_balance_limit);

let uri = wallet.get_single_use_receive_uri(Some(recv_amt)).await.unwrap();
assert!(uri.from_trusted);
let payment_id = third_party.bolt11_payment().send(&uri.invoice, None).unwrap();

// wait for payment success from payer side
Expand Down Expand Up @@ -189,6 +190,7 @@ async fn test_sweep_to_ln() {
Amount::from_milli_sats(limit.trusted_balance_limit.milli_sats() / 2).unwrap();

let uri = wallet.get_single_use_receive_uri(Some(recv_amt)).await.unwrap();
assert!(uri.from_trusted);
third_party.bolt11_payment().send(&uri.invoice, None).unwrap();

// wait for balance update on wallet side
Expand Down Expand Up @@ -1451,6 +1453,7 @@ async fn test_threshold_boundary_onchain_receive_threshold() {
uri.invoice.amount_milli_satoshis().is_none(),
"Amountless invoice should have no fixed amount"
);
assert!(uri.from_trusted, "Amountless receive should use a trusted-wallet invoice");
}
})
.await;
Expand Down
1 change: 1 addition & 0 deletions orange-sdk/tests/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,7 @@ pub async fn open_channel_from_lsp(wallet: &orange_sdk::Wallet, payer: Arc<Node>
let recv_amt = limit.trusted_balance_limit.saturating_add(limit.trusted_balance_limit);

let uri = wallet.get_single_use_receive_uri(Some(recv_amt)).await.unwrap();
assert!(!uri.from_trusted);
let payment_id = payer.bolt11_payment().send(&uri.invoice, None).unwrap();

// wait for payment success from payer side
Expand Down