Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pay now #12067

Merged
merged 23 commits into from Dec 13, 2023
Merged

pay now #12067

merged 23 commits into from Dec 13, 2023

Conversation

ichthus1604
Copy link
Collaborator

No description provided.

@adamPetho
Copy link
Collaborator

Cannot build the TX.

System.ArgumentOutOfRangeException: Cannot be less than 1 sat/vByte. (Parameter 'feeRate')
Actual value was 0 Sat/B.

Fix coming soon.

@adamPetho
Copy link
Collaborator

Note for the future:
WW cannot rebuild the invoice, if we close the app beforehand.
image

@adamPetho
Copy link
Collaborator

When the payment is done and confirmed, the invoice disappers from the chat after some time.
image

@soosr
Copy link
Collaborator

soosr commented Dec 12, 2023

This is ready from a UI point of view, @adamPetho will fix the remaining business part.

As of now, this solution cannot handle if an invoice is received for the second time, will fix it in a separate PR.

@adamPetho
Copy link
Collaborator

I think the business part is more or less finished, too.

  • If we don't have enough balance to pay for the order, we show an error dialog. (not sure what else we can do)
  • If we have enough balance, the transaction is built with fee target: 2 block and broadcasted right away.

Edge case:

  • If the fee is bigger than the amount we want to send an exception is thrown from TxBuilder.
    There is a safety check for this. Not sure what to do in this scenario.
    The minimum amount will be 1000$ for a concierge request, so this edge case shouldn't happen in real scenarios.

    Should we let as it is?

@soosr do you know scenarios that I missed or scenarios that the business logic can't handle right now?
Or what is the "remaining business part" I should fix in this PR?

@soosr soosr merged commit ee74c93 into zkSNACKs:BuyAnythingButton-v2.0.4.1 Dec 13, 2023
1 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants