Add wait_for_payment function in the wallet #963
No reviewers
Labels
No labels
DB & Storage
Deployment
Error Handling & Logging
Maintenance
Payment Backend
backport
backport v0.13.x
backport v0.14.x
backport v0.15.x
bindings
blocked
bug
cdk-sql
ci
cli
deps
documentation
duplicate
enhancement
good first issue
help wanted
invalid
keep-open
ldk-node-ui
migrations
mint
mutation-testing
needs rebase
needs review
new nut
nut change
question
ready
rust-version
rustfmt
stacked hold
stale
testing
wallet
weekly-report
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cashubtc/cdk!963
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/wait-for-invoice"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Fixes #941
Notes to the reviewers
Suggested CHANGELOG Updates
CHANGED
ADDED
REMOVED
FIXED
Checklist
just final-checkbefore committing@ -29,7 +28,8 @@ async fn test_swap() {let invoice = Bolt11Invoice::from_str(&mint_quote.request).unwrap();Don't change this now but I don't mind unwrap in tests whatever you prefer
@ -0,0 +40,4 @@}}}I think we should have another fn
mint_once_paidto allow this flow:With
wait_paymentit does not mint once it is paid so another fn call is needed.@ -0,0 +108,4 @@let subs = self.subscribe::<WalletSubscription>(event.into().into());Box::pin(async move {timeout(timeout_duration, async {This will fall back to polling right if the mint does not support ws?
Can we update the examples to use this as well
@ -0,0 +108,4 @@let subs = self.subscribe::<WalletSubscription>(event.into().into());Box::pin(async move {timeout(timeout_duration, async {Yes, the subscription function already does that. There is a ws.rs client and an http.rs client
@ -0,0 +108,4 @@let subs = self.subscribe::<WalletSubscription>(event.into().into());Box::pin(async move {timeout(timeout_duration, async {Yeah that's what I thought just wanted to make sure. Thanks