Commit Graph

368 Commits

Author SHA1 Message Date
Kukks
1c5cf29540 Greenfield: Invoices Payment Methods: Additional Data
closes #3154
2022-02-15 12:23:54 +01:00
hhanh00
f4153ade92
Zcash integration (#3400)
* zcash

* Use Channel instead of Queue
2022-02-14 17:04:34 +09:00
Nicolas Dorier
300d84c5d8
[UX/UI] Add CPFP (#3395)
* Add CPFP

* Sign PSBT should go back to the initial page
2022-02-10 12:24:28 +09:00
nicolas.dorier
a42323a527
Make sure the SubscribeAsync handlers are executed in order 2022-01-17 13:36:33 +09:00
nicolas.dorier
50d4b55f73
Warning if not using 'simple using' 2022-01-14 17:50:29 +09:00
nicolas.dorier
23a96c07ae
Rename GreenField -> Greenfield 2022-01-14 13:46:04 +09:00
Nicolas Dorier
04b8eafacb
Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
Nicolas Dorier
0dcfbe8581
Remove internal socks http proxy and use .net60 socks support (#3240) 2021-12-28 18:57:22 +09:00
Nicolas Dorier
ed5b159fb6
Use ArgumentNullException.ThrowIfNull everywhere (#3239) 2021-12-28 17:39:54 +09:00
Nicolas Dorier
bd2f35a241
Remove Ethereum support (#3182) 2021-12-11 14:31:41 +09:00
nicolas.dorier
35aad4ebf9
Remove Logs static singletons 2021-11-23 13:55:34 +09:00
Samuel Adams
cbcd59c996
Prevent creation of on-chain invoices below the dust limit (#3082)
* Prevent creation of on-chain invoices below the dust limit

Fixes #3071.

* Apply suggestions from code review

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>

* small fix

* Fix selenium test

0.000000012 BTC (whether rounded or not) is below the dust threshold, causing this test to fail.

* fix CanCreateTopupInvoices test

Don't apply dust threshold conditional for topup invoices.

* Fix test, and minor changes

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2021-11-15 13:48:07 +09:00
nicolas.dorier
c921b2ca7b
Fix: Test Connection for lightning setup was hidding cause of failure 2021-11-04 23:28:26 +09:00
Andrew Camilleri
fc8a5ff95f
Lightning address support (#2804)
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-10-29 11:01:16 +02:00
Kukks
1ecd1c1e54 LNURL: Add missing logic from lnurl merges and rebases 2021-10-26 14:08:09 +02:00
Andrew Camilleri
951bfeefb1
LNURL Payment Method Support (#2897)
* LNURL Payment Method Support

* Merge recent Lightning controller related changes

* Fix build

* Create separate payment settings section for stores

* Improve LNURL configuration

* Prevent duplicate array entries when merging Swagger JSON

* Fix CanSetPaymentMethodLimitsLightning

* Fix CanUsePayjoinViaUI

* Adapt test for new cancel bolt invoice feature

* rebase fixes

* Fixes after rebase

* Test fixes

* Do not turn LNURL on by default, Off-Chain payment criteria should affects both BOLT11 and LNURL, Payment criteria of unset payment method shouldn't be shown

* Send better error if payment method not found

* Revert "Prevent duplicate array entries when merging Swagger JSON"

This reverts commit 5783db9eda.

* Fix LNUrl doc

* Fix some warnings

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2021-10-25 15:18:02 +09:00
Nicolas Dorier
86e528e5df
Use NBitcoin's Network.UriScheme rather than our own (#3005) 2021-10-23 14:47:15 +09:00
Nicolas Dorier
3d3016fdca
Fix fallback logic for default payment method (#2986) 2021-10-18 16:56:47 +09:00
Andrew Camilleri
cf206e64a7
Add Lightning payout support (#2517)
* Add Lightning payout support

* Adjust Greenfield API to allow other payment types for Payouts

* Pull payment view: Improve payment method select

* Pull payments view: Update JS

* Pull payments view: Table improvements

* Pull payment form: Remove duplicate name field

* Cleanup Lightning branch after rebasing

* Update swagger documnetation for Lightning support

* Remove required requirement for amount in pull payments

* Adapt Refund endpoint to support multiple playment methods

* Support LNURL Pay for Pull Payments

* Revert "Remove required requirement for amount in pull payments"

This reverts commit 96cb78939d43b7be61ee2d257800ccd1cce45c4c.

* Support Lightning address payout claims

* Fix lightning claim handling and provide better error messages

* Fix tests

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-10-18 12:37:59 +09:00
Andrew Camilleri
039f88d14c
Match Lightning payment based on payment hash if BOLT11 is not the same. (#2773)
* Match Lightning payment based on payment hash if BOLT11 is not the same.

* Fixup

* Fixup

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2021-10-07 16:53:27 +09:00
nicolas.dorier
150e4b842c
Make sure the process doesn't crash if exception raised in Subscribe 2021-10-06 13:22:55 +09:00
nicolas.dorier
b970f64639
Remove build warnings 2021-10-06 12:53:41 +09:00
Andrew Camilleri
6e3d6125c2
Payment Settled Webhook event (#2944)
* Payment Settled Webhook event

resolves #2691

* Move payment methods to payment services
2021-10-05 18:10:41 +09:00
Andrew Camilleri
88c925017d Apply suggestions from code review 2021-10-04 17:06:11 +02:00
Kukks
a3c2a9ac61 Censor based on permissions 2021-10-04 17:06:11 +02:00
nicolas.dorier
ef70f4d547
Simplify code with PaymentMethodId.TryParse 2021-09-24 14:21:30 +09:00
d11n
7f49824783
Improve public LN node info (#2876)
* Add store name to LN info unavailable pae

* Display multiple node info items if available

Allows to view clearnet and Tor connection info side by side.

* Re-add preferOnion for certain cases

* HTML compatible node ids

* Display more node connection failure details

* Fix syntax error

* Update BTCPayServer/Payments/Lightning/LightningLikePaymentHandler.cs

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>

* View updates

* Revert previous variable change

* Keep logic out of the view

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2021-09-23 20:36:42 +09:00
Kukks
e93562b1db Do not publish NewTransactionEvent if GetValidOutputs did not match with the network's. 2021-09-15 07:28:17 +02:00
Umar Bolatov
d1ea4e4fa4
Fix bug with top-up invoices when used with "Only enable the payment method after user explicitly chooses it" enabled (#2780)
* Fix bug with top-up invoices when used with "Only enable the payment method after user explicitly chooses it" enabled

* Remove unused "using" directives

* Add "#nullable enable" directive

* check for top-up invoice in LightningLikePaymentHandler
2021-08-23 15:13:26 +09:00
Nicolas Dorier
4c818d0359
Implement topup invoices (#2730) 2021-08-03 17:03:00 +09:00
Nicolas Dorier
a9da79cc58
Use PaymentUrlBuilder for ensuring proper formatting of BIP21 addresses (#2723) 2021-07-30 18:47:02 +09:00
Nicolas Dorier
6ea96efe68
Update NBitcoin, fix warnings on nullable (#2718) 2021-07-29 20:29:34 +09:00
Kukks
4d538c61b1 Refactor Get Store Payment Methods
Add tests + docs + new pluggbale format for fetching payment method data + client
2021-07-26 12:03:11 +02:00
Andrew Camilleri
04726b3ee4
Payouts: Detect External OnChain Payouts (#2462)
* Refactor and decouple Payout logic

So that we can support lightning + external payout payments

Fixes & refactoring

almost there

final

Remove uneeded payment method checks

Refactor payouts to handle custom payment method specific actions

External onchain payments to approved payouts will now require "confirmation" from the merchant that it was sent by them.

add pill tabs for payout status

* Improve some UX around feature

* add test and some fixes

* Only listen to address tracked source and determine based on wallet get tx call from nbx

* Simplify isInternal for Payout detection

* fix test

* Fix Noreferrer test

* Make EnsureNewLightningInvoiceOnPartialPayment more resilient

* Make notifications section test more resilient in CanUsePullPaymentsViaUI
2021-07-16 09:57:37 +02:00
nicolas.dorier
cf7c3c2bf7
LightningSupportedPaymentMethod.CryptoCode is never null 2021-06-14 18:22:00 +09:00
Umar Bolatov
3d21d2724e
Fix bug with LN payment method API endpoint throwing 500 (#2567)
close #2566
2021-06-14 18:19:52 +09:00
Bjarne Magnussen
e4f298acac
Set lightning invoice fallback in QR code as uppercase (#2492)
* Set lightning invoice fallback in QR code as uppercase

On the lightning payment view the invoice is encoded as uppercase inside the QR code; however this is not true for the on-chain payment QR code if the invoice is set as fallback option.

This commit sets the fallback invoice as uppercase inside the QR code.

* Adds test case for uppercase fallback lightning invoice

* Apply suggestions from rockstar's review

Co-authored-by: Kukks <evilkukka@gmail.com>
2021-06-08 12:24:17 +09:00
Nicolas Dorier
e93b030bfe
Update HWI library, warn users to run newer version (#2544)
* Update HWI library, warn users to run newer version

* Update BTCPayServer/wwwroot/js/vaultbridge.ui.js

Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>

* Update BTCPayServer/wwwroot/js/vaultbridge.ui.js

Co-authored-by: Pavlenex <pavle@pavle.org>

Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
Co-authored-by: Pavlenex <pavle@pavle.org>
2021-06-06 21:02:15 +09:00
d11n
ed7031981b
Bootstrap v5 migration (#2490)
* Swap bootstrap asset files

* Update themes and color definitions

* Move general bootstrap customizations

* Theme updates

Theme updates

* Remove BuildBundlerMinifier

This lead to an error, because BuildBundlerMinifier and BundlerMinifier.Core seem to conflict here. Details: https://stackoverflow.com/a/61119586

* Rewplace btn-block class with w-100

* Update badge classes

* Remove old font family head variable

* Update margin classes

* Cleanups

* Update float classes

* Update text classes

* Update padding classes

* Update border classes

* UPdate dropdown classes

* Update select classes

* Update neutral custom props

* Update bootstrap and customizations

* Update ChromeDriver; disable smooth scroll

https://github.com/SeleniumHQ/selenium/issues/8295

* Improve alert messages

* Improve bootstrap customizations

* Disable reduced motion

See also 7358282f

* Update Bootstrap data attributes

* Update file inputs

* Update input groups

* Replace deprecated jumbotron class

* Update variables; re-add negative margin util classes

* Update cards

* Update form labels

* Debug alerts

* Fix aria-labelledby associations

* Dropdown-related test fixes

* Fix CanUseWebhooks test

* Test fixes

* Nav updates

* Fix nav usage in wallet send and payouts

* Update alert and modal close buttons

* Re-add backdrop properties

* Upgrade Bootstrap to v5 final

* Update screen reader classes

* Update font-weight classes

* Update monospace font classes

* Update accordians

* Update close icon usage

* Cleanup

* Update scripts and style integrations

* Update input group texts

* Update LN node setup page

* Update more form control classes

* Update inline forms

* Add js specific test

* Upgrade Vue.js

* Remove unused JS

* Upgrade Bootstrap to v5.0.1

* Try container related test updates

* Separate jQuery bundle

* Remove jQuery from LND seed backup page

* Remove unused code

* Refactor email autofill js

* Refactor camera scanner JS

* Re-add tests

* Re-add BuildBundlerMinifier

* Do not minify bundles containing Bootstrap

Details https://github.com/madskristensen/BundlerMinifier/issues/558

* Update bundles

* Cleanup JS test

* Cleanup tests involving dropdowns

* Cleanup tests involving collapses

* Cleanup locale additions in ConfigureCore

* Cleanup bundles

* Remove duplicate status message

* Cleanup formatting

* Fix missing validation scripts

* Remove unused unminified Bootstrap js files

* Fix classic theme

* Fix Casa theme

* Fix PoS validation
2021-05-19 11:39:27 +09:00
Andrew Camilleri
778a0f7e8d
Fix: Lightning Listener not listening on Lightning payment after activating when using lazy payments (#2524) 2021-05-14 17:17:07 +09:00
Nicolas Dorier
c551e5cd0a
Make sure to only select accounted payments where we should (#2523) 2021-05-14 16:16:19 +09:00
Andrew Camilleri
64e34d0ef5
Seaparate CoinSwitch as a plugin (#2390)
* Separate coinswitch as a system plugin

* Decouple Coinswitch from Checkout UI

* remove dummy csproj

* Remove CoinSwitchTests.cs per @NicolasDorier feedback

Co-authored-by: rockstardev <rockstardev@users.noreply.github.com>
2021-04-13 20:19:48 +09:00
Andrew Camilleri
8fd4a816a6
Allow Payjoin for wallet receive addresses (#2425)
* Allow Payjoin for wallet receive addresses

* wip

* show bip21 and additional work

* style better

* add to docs

* pr changes

* remove from state when unreserved
2021-04-13 12:26:36 +09:00
xpayserver
475809b1a0
Make Invoice Create Faster And Fix Gap Limit Issue (#1843)
* Make Invoice Create Faster And Fix Gap Limit Issue

This make address reserve only when user "activate" paymet method in ui. optional setting in store checkout ui.

* Fix swagger documentation around Lazy payment methods

* fix changed code signature

* Add missing GreenField API for activate feature

* Fix checkout experience styling for activate feature

* Fix issue with Checkout activate button

* Make lightning also work with activation

* Make sure PreparePaymentModel is still called on payment handlers even when unactivated

* Make payment  link return empty if not activated

* Add activate payment method method to client and add test

* remove debugger

* add e2e test

* Rearranging lazy payments position in UI to be near dependent Unified QR code

* fix rebase conflicts

* Make lazy payment method mode activate on UI load.

Co-authored-by: Kukks <evilkukka@gmail.com>
Co-authored-by: rockstardev <rockstardev@users.noreply.github.com>
Co-authored-by: Andrew Camilleri <kukks@btcpayserver.org>
2021-04-07 13:08:42 +09:00
nicolas.dorier
a128685b83
If an input already used in a payjoin is reused in another, we should not attempt to broadcast the original transaction. 2021-03-24 13:48:33 +09:00
nicolas.dorier
749d26fafa
Revert "Fix Payjoin test randomly crashing"
This reverts commit 485faf0141.
2021-03-23 23:59:26 +09:00
nicolas.dorier
485faf0141
Fix Payjoin test randomly crashing 2021-03-23 18:34:34 +09:00
nicolas.dorier
af9d896510
Do not use Random 2021-03-23 17:53:23 +09:00
Kukks
ce6c9c91fc Make sure payment method uppercase logic only happens for BTC 2021-03-20 06:52:18 +01:00
Andrew Camilleri
30c7cbba96
Fix issue around new bech uppercase + vault supported flag (#2337) 2021-03-09 12:45:56 +09:00