Commit Graph

1741 Commits

Author SHA1 Message Date
Umar Bolatov
c0c34fbb41
Add GreenField endpoint for fetching all apps (#4462)
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2023-01-30 09:42:24 +09:00
Umar Bolatov
438dcc4c6f
Add Greenfield API endpoint for pull payment LNURL items (#4472)
* Add Greenfield API endpoint for pull payment LNURL items

close #4365

* Rename GetLNURLs to GetPullPaymentLNURL

* update "ln-url-not-supported" to "lnurl-not-supported"

* remove hardcoding of "BTC"

* update "PullPayments_LNURL" to "PullPayments_GetPullPaymentLNURL"

* update description of 400 status code response

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2023-01-26 14:43:07 +09:00
d11n
de4ac2c830
Greenfield: Add payments list endpoint (#4407)
Based on btcpayserver/BTCPayServer.Lightning#109
2023-01-26 13:22:49 +09:00
Andrew Camilleri
f46443a5e3
Add additional permission for pull payments (#4539)
* Add additional permission for pull payments

* Apply suggestions from code review
2023-01-26 09:46:05 +09:00
d11n
69e90b7ff1
Point of Sale: Improve merchant view (#4560)
* Point of Sale: Improve merchant view

Closes #3843.

* Trim bottom section

* Display App Name and Display Title next to each other

* Update views
2023-01-26 09:27:31 +09:00
d11n
92b556e54f
Load debug plugins in tests (#4555)
Equivalent to the loading code in Program.cs
2023-01-24 20:12:47 +09:00
d11n
b46ae7a651
Checkout v2: Re-add LNURL for top-up invoices (#4556)
My bad, this was excluded erroneously.

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2023-01-24 18:10:38 +09:00
d11n
9f3a3c5f51
BIP21: Uppercase addresses only in QR, not in payment URL (#4553)
* BIP21: Uppercase addresses only in QR, not in payment URL

The uppercased address/BOLT11 should only be used for the QR code, the payment URI for the link should stay as it is.

References:

- #2110
- https://bitcoinqr.dev/

* Improve comments

* Add comments step by step

* Ensure correct delimiter

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2023-01-24 09:44:39 +09:00
Andrew Camilleri
1d2bebf17a
Greenfield: Lightning addresses API (#4546)
* Greenfield: Lightning addresses API

* add docs

* Apply suggestions from code review

Co-authored-by: d11n <mail@dennisreimann.de>
2023-01-23 10:11:34 +01:00
Dennis Reimann
d90d3c5a0f
Remove pnxbet as a supporter
Closes #4543.
2023-01-21 20:51:36 +01:00
d11n
068b717a75
Checkout v2: Configure countdown timer (#4471)
* Checkout v2: Configure countdown timer

This addresses feedback by @astupidmoose left [here](https://github.com/btcpayserver/btcpayserver/discussions/4308#discussioncomment-4438926): Make the countdown timer configurable with a minutes setting. This way the merchant has full control over when to display the timer. They could even set it to equal the invoice expiry, so that it is shown right from the beginning.

* Rename property and adjust wording

* Remove expiration percentage from Checkout v2
2023-01-16 20:45:19 +09:00
d11n
0bc6967dbc
Greenfield: Add payment hash and preimage to Lightning invoices (#4520)
* Greenfield: Add payment hash and preimage to Lightning invoices

Closes #4475.

* Greenfield: Add payment hash and preimage to invoice payment method details

* Refactor LN payment method details retrieval
2023-01-13 17:29:41 +09:00
d11n
2301769419
Checkout v2: Display and copy addresses (#4489)
* Checkout v2: Display and copy addresses

Closes #4442.

* Refinements
2023-01-12 10:41:33 +09:00
d11n
bb0e96a163
Apply store ids and search term to invoice export (#4516)
This makes the export work like the list in the UI. Exports what one sees.

Fixes #4514.
2023-01-11 13:36:03 +09:00
d11n
d5d0be5824
Code formatting updates (#4502)
* Editorconfig: Add space_before_self_closing setting

This was a difference between the way dotnet-format and Rider format code. See https://www.jetbrains.com/help/rider/EditorConfig_Index.html

* Editorconfig: Keep 4 spaces indentation for Swagger JSON files

They are all formatted that way, let's keep it like that.

* Apply dotnet-format, mostly white-space related changes
2023-01-06 22:18:07 +09:00
d11n
eb90fab640
LNURL updates (#4501) 2023-01-05 14:41:18 +01:00
dstrukt
eb6d01c21e
Updates preferred price source copy label (#4492)
* ui+create: updates preferred price source copy label

* Add test case

Co-authored-by: d11n <mail@dennisreimann.de>
2022-12-31 09:24:10 +01:00
nicolas.dorier
f958550061
Fix tests 2022-12-23 17:21:18 +09:00
d11n
b83eb41df3
Frontend cleanups (#4449)
* Update some buttons

* Potential flaky test fix

* Dark theme: Fix primary accent color

* Pay Button: Remove unused clipboard dependency

The pay button uses the cope-to-clipboard.js

* Remove babel-polyfill

Browser-support should be good by now.

* Remove unused jquery-easing scripts

* Remove unused CSS
2022-12-20 23:11:22 +09:00
d11n
255c52db26
Upgrade Lightning and ChromeDriver (#4440) 2022-12-15 15:26:25 +09:00
Umar Bolatov
06cedaef4b
Disabled amount/currency update for payment request with active invoices (#4390)
* Disabled amount/currency update for payment request with active invoices

close #4241

* Check amount isn't changed in backend

* Add test case

* Update BTCPayServer/Controllers/GreenField/GreenfieldPaymentRequestsController.cs

Co-authored-by: d11n <mail@dennisreimann.de>

* Update BTCPayServer/Controllers/UIPaymentRequestController.cs

Co-authored-by: d11n <mail@dennisreimann.de>

* Improve wording

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-12-14 14:01:48 +09:00
d11n
6972e8a3db
UI: Theme extensions (#4398)
* Theme extensions

Adds the ability to choose the themeing strategy: Extend one of the existing themes (light or dark) or go fully custom. The latter was the only option up to now, which isn't ideal:

- One had to provide a full-blown theme file overriding all variables
- Tedious, error prone and hard to maintain, because one has to keep track of updates

This PR makes it so that one can choose light or dark as base theme and do modifications on top.

Benefit: You can specify a limited set of variables and might get away with 5-20 lines of CSS.

* Ensure custom theme is present

* Update checkout test
2022-12-14 13:37:31 +09:00
Nicolas Dorier
18ba0148ae
Use better default than coingecko when creating a new store (#4416)
* Use better default than coingecko when creating a new store

* Improve recommended exchange UX

* Add btcturk for TRY

* Fix recommendation

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-12-14 13:33:27 +09:00
Nicolas Dorier
cdac238f6d
[Greenfield]: Add DescriptionHashOnly to include a description hash in the BOLT11 (#4411)
* [Greenfield]: Add DescriptionHashOnly to include a description hash in the BOLT11

* Add CLN test case

* Improve description in Swagger file

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-12-13 18:56:33 +09:00
Nicolas Dorier
0c3f819200
Have address wallet objects rather than script objects (#4417) 2022-12-13 09:09:25 +09:00
d11n
5b20be8cfd
Checkout fixes (#4425)
* Fix spinner partial usage in Checkout v1

* Update v2 tests
2022-12-10 19:19:13 +09:00
Nicolas Dorier
9a4dec57d1
Generate a wallet object for all scripts, save source in generatedBy rather than receive label (#4413) 2022-12-08 13:16:18 +09:00
d11n
f5c5178f95
Lock user: Improve return code and fix docs (#4377)
* Lock user: Improve return code and fix docs

The docs state that the `DELETE` method should be used, though the controller wants `POST`. The latter seems appropriate here, as the action can be used for locking and unlocking.

Also adapted the action to return a status code based on the actual outcome of the user toggle call.

Closes #4310.

* Update clients
2022-12-07 19:01:50 +01:00
d11n
80a257e85f
Fix Output Descriptor parsing for WSH multisig case (#4402)
* Fix Output Descriptor parsing for WSH multisig case

Reuse existing function for extracting from a multisig descriptor, instead of recursively parsing the inner output descriptor. The latter would run into invalid cases, because it'd be interpreted as bare multisig, which supports only up to three public keys. 

For further details see MetacoSA/NBitcoin#1151.

* Add CanParseDerivationSchemes test
2022-12-07 20:18:17 +09:00
Nicolas Dorier
c665bd2321
Bump clightning (#4406) 2022-12-06 22:15:06 +09:00
d11n
948bae9f95
Wallet import: Surface detailed error messages (#4392)
* Wallet import: Surface detailed error messages

Similar to #4205, this checks if the input is an output descriptor and display more detailed information about why an import might fail.

* Add test cases
2022-12-05 17:06:05 +09:00
Andrew Camilleri
0af3faf6ff
Wallet object scripts (#4301)
* Wallet object scripts

* Adjust comment

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-12-01 09:54:55 +09:00
d11n
9ee9653c7d
Checkout fixes (#4375)
* Round buttons on results view

* Checkout v2: Fix for BIP21 case with LN as default payment method

Fixes #4352.

* Update changelog

* Add test for fix
2022-11-29 11:19:23 +09:00
Nicolas Dorier
e55a16d917
bump bitcoin core in tests (#4374) 2022-11-28 22:18:19 +09:00
Nicolas Dorier
ddcfa735e0
Improve documentation of Refund API in Greenfield (#4372) 2022-11-28 20:58:18 +09:00
Nicolas Dorier
08b239e87a
Change some table type from TEXT to JSONB (#4371)
* Change some table type from TEXT to JSONB

* Deprecate mysql and sqlite backend
2022-11-28 20:36:18 +09:00
Umar Bolatov
425d70f261
Add Greenfield invoice refund endpoint (#4238)
* Add Greenfield invoice refund endpoint

See discussion here: https://github.com/btcpayserver/btcpayserver/discussions/4181

* add test

* add docs
2022-11-28 17:53:08 +09:00
Andrew Camilleri
022285806b
Form Builder (#4137)
* wip

* Cleanups

* UI updates

* Update UIFormsController.cs

* Make predefined forms usable statically

* Add support for pos app + forms

* pay request form rough support

* invoice form through receipt page

* Display form name in inherit from store setting

* Do not request additional forms on invoice from pay request

* fix up code

* move checkoutform id in checkout appearance outside of checkotu v2 toggle

* general fixes for form system

* fix pav bug

* UI updates

* Fix warnings in Form builder (#4331)

* Fix build warnings about string?

Enable nullable on UIFormsController.cs
Fixes CS8632 The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

* Clean up lack of space in injected services in Submit() of UIFormsController.cs

* Remove unused variables (CS0219) and assignment of nullable value to nullable type (CS8600)

* Cleanup double semicolons while we're at tit

* Fix: If reverse proxy wasn't well configured, and error message should have been displayed (#4322)

* fix monero issue

* Server Settings: Update Policies page (#4326)

Handles the multiple submit buttons on that page and closes #4319.

Contains some UI unifications with other pages and also shows the block explorers without needing to toggle the section via JS.

* Change confirmed to settled. (#4328)

* POS: Fix null pointer

Introduced in #4307, the referenced object needs to be `itemChoice` instead of `choice`.

* Add documentation link to plugins (#4329)

* Add documentation link to plugins

* Minor UI updates

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>

* Fix flaky test (#4330)

* Fix flaky test

* Update BTCPayServer/PayoutProcessors/BaseAutomatedPayoutProcessor.cs

Co-authored-by: d11n <mail@dennisreimann.de>

Co-authored-by: d11n <mail@dennisreimann.de>

* Remove invoice and store level form

* add form test

* fix migration for forms

* fix

* make pay request form submission redirect to invoice

* Refactor FormQuery to only be able to query single store and single form

* Put the Authorize at controller level on UIForms

* Fix warnings

* Fix ef request

* Fix query to forms, ensure no permission bypass

* Fix modify

* Remove storeId from step form

* Remove useless storeId parameter

* Hide custom form feature in UI

* Minor cleanups

* Remove custom form options from select for now

* More minor syntax cleanups

* Update test

* Add index - needs migration

* Refactoring: Use PostRedirect instead of TempData for data transfer

* Remove untested and unfinished code

* formResponse should be a JObject, not a string

* Fix case for Form type

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: JesterHodl <103882255+jesterhodl@users.noreply.github.com>
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
Co-authored-by: Andreas Tasch <andy.tasch@gmail.com>
2022-11-25 10:42:55 +09:00
d11n
bb60c2ac48
Checkout v2: Minor fixes (#4345)
* Do not show remaining amount for topup invoices in expiry message

As [reported by @petzsch](https://chat.btcpayserver.org/btcpayserver/pl/gg1zy8t5h3dq7nme1nom93migo).

* Fix links on result page in Checkout Classic

Closes #4344.

* Better way to exclude Lightning if BIP21 is active and we have both PMs


Unify margins
2022-11-24 23:14:56 +09:00
d11n
a4ee1e9805
Checkout v2 finetuning (#4276)
* Indent all JSON files with two spaces

* Upgrade Vue.js

* Cheat mode improvements

* Show payment details in case of expired invoice

* Add logo size recommendation

* Show clipboard copy hint cursor

* Improve info area and wording

* Update BIP21 wording

* Invoice details adjustments

* Remove form; switch payment methods via AJAX

* UI updates

* Decrease paddings to gain space

* Tighten up padding between logo mark and the store title text

* Add drop-shadow to the containers

* Wording

* Cheating improvements

* Improve footer spacing

* Cheating improvements

* Display addresses

* More improvements

* Expire invoices

* Customize invoice expiry

* Footer improvements

* Remove theme switch

* Remove non-existing sourcemap references

* Move inline JS to checkout.js file

* Plugin compatibility

See Kukks/btcpayserver#8

* Test fix

* Upgrade vue-i18next

* Extract translations into a separate file

* Round QR code borders

* Remove "Pay with Bitcoin" title in BIP21 case

* Add copy hint to payment details

* Cheating: Reduce margins

* Adjust dt color

* Hide addresses for first iteration

* Improve View Details button

* Make info section collapsible

* Revert original en locale file

* Checkout v2 tests

* Result view link fixes

* Fix BIP21 + lazy payment methods case

* More result page link improvements

* minor visual improvements

* Update clipboard code

Remove fallback for old browsers. https://caniuse.com/?search=navigator.clipboard

* Transition copy symbol

* Update info text color

* Invert dark neutral colors

Simplifies the dark theme quite a bit.

* copy adjustments

* updates QR border-radius

* Add option to remove logo

* More checkout v2 test cases

* JS improvements

* Remove leftovers

* Update test

* Fix links

* Update tests

* Update plugins integration

* Remove obsolete url code

* Minor view update

* Update JS to not use arrow functions

* Remove FormId from Checkout Appearance settings

* Add English-only hint and feedback link

* Checkout Appearance: Make options clearer, remove Custom CSS for v2

* Clipboard copy full URL instead of just address/BOLT11

* Upgrade JS libs, add content checks

* Add test for BIP21 setting with zero amount invoice

Co-authored-by: dstrukt <gfxdsign@gmail.com>
2022-11-24 08:53:32 +09:00
nicolas.dorier
d2b10ef4e6
CanUseTorClient fail no more 2022-11-22 21:58:15 +09:00
nicolas.dorier
2bd4a680ad
Fix tests 2022-11-20 14:19:48 +09:00
nicolas.dorier
4ce504a1e1
Add index to WalletObjects + allow additional queries 2022-11-19 23:39:41 +09:00
Nicolas Dorier
9b5c6ece90
Refactor walletobj API, make wallet object graph directionless (#4297) 2022-11-19 00:04:46 +09:00
Umar Bolatov
52af129c8b
Add crowdfund app create endpoint (#4068)
* Add crowdfund app create endpoint

* replace DateTimeJsonConverter with NBitcoin.JsonConverters.DateTimeToUnixTimeConverter

* Use DateTimeOffset instead of DateTime

* Use array instead of CSV

* update "startDate" and "endDate" docs definition

* update docs
2022-11-18 14:20:07 +09:00
Andrew Camilleri
2740dfea87
Greenfield: Wallet Objects (#4274)
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2022-11-16 12:11:17 +09:00
Andrew Camilleri
2d23819944
Greenfield: Allow marking payout status and payment proofs (#4244)
This allows external services to integrate with the payouts system to process payouts. This is also  a step to allow plugins to provide payout processors.

* It provides the payment proof through the greenfield payoust api.
* It allows you to set the state of a payout outside of the usual flow:
  * When state is awaiting payment, allow setting to In progess or completed
  * When state is in progress, allow setting back to awaiting payment
2022-11-15 18:40:57 +09:00
Dennis Reimann
b7af234427 Payment Request: Fix invoice creation
Fix and test for a regression introduced with #4243: As the `PayPaymentRequest` action allows anonymous access, the `CookieAuthorizationHandler` isn;t run and hence the `GetCurrentStore` returns `null`.

This leads to an exception when creating the invoice. Store needs to be fetched seperately - like [before](4bbc7d9662 (diff-bdc264670a171e862d09fdf1a1c9f3ca14b41982a3c4c8e66d4f780cdde9f21dL241)).
2022-11-10 18:23:41 +01:00
rockstardev
b281d09694
Bumping LND to 0.15.4-beta-1 (#4271)
* Bumping LND to 0.15.4-beta-1

* Bump LND in Altcoin docker-compose

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-11-05 12:15:04 +01:00
d11n
79717d1d64
Sync modal improvements (#4260) 2022-11-02 16:55:05 +01:00
Nicolas Dorier
4bbc7d9662
[Greenfield] Can create an invoice for a payment request via Greenfield (#4243)
* [Greenfield] Can create an invoice for a payment request via Greenfield

* Add allowPendingInvoiceReuse so payment request invoices can be reused

* Add PayPaymentRequest to the LocalBTCPayServerClient

* Allow amount to be specified if same as PR amount
2022-11-02 18:41:19 +09:00
d11n
3805b7f287
Checkout v2 (#4157)
* Opt-in for new checkout

* Update wording

* Create invoice view update

* Remove jQuery from checkout testing code

* Checkout v2 basics

* WIP

* WIP 2

* Updates and fixes

* Updates

* Design updates

* More design updates

* Cheating and JS fixes

* Use checkout form id whenever invoices get created

* Improve email form handling

* Cleanups

* Payment method exclusion cases for Lightning and LNURL

TODO: Cases and implementation need to be discussed

* Introduce CheckoutType in API and replace UseNewCheckout in backend

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-11-02 18:21:33 +09:00
d11n
57557748e2
Greenfield: Fix missing payment data (#4233)
* Greenfield: Fix missing payment data

Fixes #4229.

* Client: Return payment data from PayLightningInvoice

* Add test for PayLightningInvoice response
2022-10-27 08:56:24 +09:00
nicolas.dorier
8b79212a6e
[Greenfield] Fix: The route to connect to a peer lightning node was always crashing 2022-10-26 13:35:04 +09:00
Nicolas Dorier
16bfb1dbfe
Bump libraries (#4219) 2022-10-18 23:58:28 +09:00
d11n
e5421b8a9f
Add script to create a regtest multisig wallet for testing (#4204)
* Add script to create a regtest multisig wallet for testing

* Unload wallets to prevent having to specify wallet in BTCPay, NBXplorer
2022-10-17 20:57:09 +09:00
d11n
f9f1a22e3b
Store settings: Add branding options (#4131)
* Add logo upload

* Add brand color definition

* Cleanups

* Add logo to store selector

* Improve brand color handling

* Update color input

* Add logo dimensions hint

* Fixes

* Fix pattern and warning in js logs for color validation

* Fix condition, add test

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-10-17 12:16:29 +02:00
d11n
6d7c11f1b1
Greenfield: Get Lightning invoices (#4180)
* Greenfield: Get Lightning invoices

Matching the data added in btcpayserver/BTCPayServer.Lightning#98 and btcpayserver/BTCPayServer.Lightning#99.

* Small adjustments

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-10-17 09:51:15 +02:00
rockstardev
ae4af7dd13
Bumping LND to 0.15.2-beta (#4211) 2022-10-13 09:40:07 +02:00
Andrew Camilleri
434298cba6
Greenfield: Store Rates Config (#3931)
* Greenfield: Store Rates Config

* FIX SWAGGER

* rebase fix

* Apply suggestions from code review

Co-authored-by: d11n <mail@dennisreimann.de>

* Update BTCPayServer/wwwroot/swagger/v1/swagger.template.stores-rates-config.json

Co-authored-by: d11n <mail@dennisreimann.de>

* Fix: Spread isn't converted from/to percentage, rename some fields, and move some routes

* Fix error handling

Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-10-12 22:19:33 +09:00
Nicolas Dorier
a2fa688cde
Refactor labels (#4179)
* Create new tables

* wip

* wip

* Refactor LegacyLabel

* Remove LabelFactory

* Add migration

* wip

* wip

* Add pull-payment attachment to tx

* Address kukks points
2022-10-11 17:34:29 +09:00
nicolas.dorier
66c2148a63
Increase tor test timeout 2022-10-07 16:04:22 +09:00
nicolas.dorier
28850f534c
Fix test warning 2022-10-07 15:05:11 +09:00
Andrew Camilleri
c40c11a822
bump ms aspnet packages (#4166)
* bump ms aspnet packages

* Bump .NET SDK in Dockerfile

* bump more packages

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-10-07 14:53:30 +09:00
nicolas.dorier
96c86160df
Fix warning error when rebooting the server caused by some shitcoin currency pair format 2022-09-29 15:45:27 +09:00
d11n
4bee8e9bfe
Greenfield: Extend LN GetInfo data (#4167)
Matching the data added in btcpayserver/BTCPayServer.Lightning#97.
2022-09-28 09:34:34 +09:00
HamroRamro
bc195e771e
Update WalletTransactions pagination default settings (#4074)
* Update WalletTransactions pagination default settings

Remove the numeric page selection and add displaying data of last 30 days by default.

* Update WalletTransactions to show txs based on Days

* Update text formatting on WalletTransactions view

Keeps the logic changes. Just undo the formatting of the file from previous commit

* Update WalletTransactions to show all after second load

Utilize Model.Days instead of new variables
Moved javascript code to PageFootContent section

* Update WalletTransactions to use ajax for infinite scroll

* Cleanups

* Apply skip and count only when not prefiltering

* Infinite scroll mode

* Improve datetime formatting and switching

* Upgrade NBXplorer to include get_wallets_recent bugfix

* Revert "Upgrade NBXplorer to include get_wallets_recent bugfix"

This reverts commit b390d942d74d88bb1da3ab8e3407184a527175ef.

* JS fixes

* Upgrade ChromeDriver and BundleMinifier

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-09-27 21:24:53 +09:00
Dennis Reimann
db976a6408 Fix unit test and build warning 2022-09-23 16:41:51 +02:00
Umar Bolatov
7106830be9
Make sure end date is after start date in Crowdfund app (#4084)
* Make sure end date is after start date in Crowdfund app

* Add null checks

* Add test case

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-09-09 19:26:11 +09:00
Kukks
5d2b42960b fix CanExportInvoicesJson 2022-08-30 09:16:17 +02:00
Kukks
51666fbf0e fix CanUseInvoiceReceipts 2022-08-30 09:16:17 +02:00
Umar Bolatov
63e11451ba Rename PutPointOfSaleApp to UpdatePointOfSaleApp 2022-08-21 08:41:04 +02:00
Umar Bolatov
16f4ca5fbf Add support for updating POS app through Greenfield API
Part of #3458
2022-08-21 08:41:04 +02:00
Dennis Reimann
701ba59bd8 Convert public app parts 2022-08-21 08:38:25 +02:00
Dennis Reimann
8c6705bccb Make POS and Crowdfund plugins 2022-08-21 08:38:25 +02:00
Umar Bolatov
999090dbdb Add Yadio exchange rate provider
Yadio is a service which provides exchange rates for many currencies such as the Lebanese Pound which have the real exchange rate which differs from the official rate significantly (32,525 LBP for USD real rate vs 1,510 official rate).

See more details here: https://yadio.io/info.html

See discussions here:
https://github.com/btcpayserver/btcpayserver/discussions/4001
https://github.com/btcpayserver/btcpayserver/discussions/2489#discussioncomment-3102370
2022-08-18 08:08:55 +02:00
Kukks
13e3b515c9 Cleanse objects from obsolete altcoins 2022-08-17 21:23:16 +02:00
Andrew Camilleri
d0b26e9f69
Refactor Payouts (#4032)
Co-authored-by: d11n <mail@dennisreimann.de>
2022-08-17 09:45:51 +02:00
Dennis Reimann
58784ebbfc
Update ChromeDriver 2022-08-13 12:54:18 +02:00
Davide Oggioni
8c8a5a4f5e
Edit view for Pull Payments (#4016)
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-08-11 14:30:42 +02:00
Kukks
15e1169f62
Fix Kraken rate provider 2022-08-10 08:20:41 +02:00
Wouter Samaey
c71e671311
Added custodian account trade support (#3978)
* Added custodian account trade support

* UI updates

* Improved UI spacing and field sizes + Fixed input validation

* Reset error message when opening trade modal

* Better error handing + test + surface error in trade modal in UI

* Add delete confirmation modal

* Fixed duplicate ID in site nav

* Replace jQuery.ajax with fetch for onTradeSubmit

* Added support for minimumTradeQty to trading pairs

* Fixed LocalBTCPayServerClient after previous refactoring

* Handling dust amounts + minor API change

* Replaced jQuery with Fetch API + UX improvements + more TODOs

* Moved namespace because Rider was unhappy

* Major UI improvements when swapping or changing assets, fixed bugs in min trade qty, fixed initial qty after an asset change etc

* Commented out code for easier debugging

* Fixed missing default values

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-08-04 11:38:49 +09:00
Nicolas Dorier
c2a0daedeb
Bump versions of various deps (#3998) 2022-07-27 15:55:37 +09:00
rockstardev
c821208b5d
Bumping LND to 0.15.0-beta (#3999) 2022-07-26 20:09:56 +09:00
Andrew Camilleri
bec888da19
Payjoin label fixes (#3986)
* Payjoin label fixes

* When a payjoin label was applied, coin selection filter would not work
* When a payjoin happened with a receive address wallet, the payjoin label was not applied
* Coin selection shows when a utxo is currently reserved for a payjoin. Applies both to UI and to GF API

* remove reserved label

* Update BTCPayServer/Payments/PayJoin/PayJoinEndpointController.cs
2022-07-23 20:26:13 +09:00
d11n
d016f59867
Coin Selection: Fix responsive display (#3992)
Fixes #3985.
2022-07-22 20:29:53 +09:00
Kukks
5fd620556e Fix Local client
This cleans up the client factory for plugins so that it is less hectic looking. Additionally, it fixes a bug where if you reuse the factory after setting a store, the state might stick.
2022-07-20 18:20:14 +02:00
Umar Bolatov
a7b6f3fa19
Redirect to dashboard instead of apps list on app delete (#3941)
close #3898
2022-07-12 15:18:08 +09:00
Andrew Camilleri
afb989d72e
Fix lnurl withdraw modal (#3955)
* Fix lnurl withdraw modal

fixes #3949

* Fix test
2022-07-12 15:17:44 +09:00
nicolas.dorier
499352e51c
Fix the ExchangeSharpRateProvider for some pairs 2022-07-11 23:39:11 +09:00
nicolas.dorier
bd73cac1a1
Fix: For some asset pair the kraken rate was inverted (Fix #3957) 2022-07-11 23:09:35 +09:00
nicolas.dorier
19be847624
Do not use Renci.SSH in tests 2022-07-08 16:30:52 +09:00
Wouter Samaey
2abc35058b
Custodian Account UI: CRUD (#3923)
* WIP New APIs for dealing with custodians/exchanges

* Simplified things

* More API refinements + index.html file for quick viewing

* Finishing touches on spec

* Switched cryptoCode to paymentMethod as this allows us to differentiate between onchain and lightning

* Moved draft API docs to "/docs-draft"

* WIP baby steps

* Added DB migration for CustodianAccountData

* Rough but working POST /v1/api/custodian-account + GET /v1/api/custodian

* WIP + early Kraken API client

* Moved service registration to proper location

* Working create + list custodian accounts + permissions + WIP Kraken client

* Kraken API Balances call is working

* Added asset balances to response

* List Custodian Accounts call does not load assetBalances by default, because it can fail. Can be requested when needed.

* Call to get the details of 1 specific custodian account

* Added permissions to swagger

* Added "tradableAssetPairs" to Kraken custodian response + cache the tradable pairs in memory for 24 hours

* Removed unused file

* WIP + Moved files to better locations

* Updated docs

* Working API endpoint to get info on a trade (same response as creating a new trade)

* Working API endpoints for Deposit + Trade + untested Withdraw

* Delete custodian account

* Trading works, better error handling, cleanup

* Working withdrawals + New endpoint for getting bid/ask prices

* Completed withdrawals + new endpoint for getting info on a past withdrawal to simplify testing, Enums are output as strings,

* Better error handling when withdrawing to a wrong destination

* WithdrawalAddressName in config is now a string per currency (dictionary)

* Added TODOs

* Only show the custodian account "config" to users who are allowed

* Added the new permissions to the API Keys UI

* Renamed KrakenClient to KrakenExchange

* WIP Kraken Config Form

* Removed files for UI again, will make separate PR later

* Fixed docs + Refactored to use PaymentMethod more + Added "name" to custodian account + Using cancelationToken everywhere

* Updated withdrawal info docs

* First unit test

* Complete tests for /api/v1/custodians and /api/v1/custodian-accounts endpoints + Various improvements and fixes

* Mock custodian and more exceptions

* Many more tests + cleanup, moved files to better locations

* More tests

* WIP more tests

* Greenfield API tests complete

* Added missing "Name" column

* Cleanup, TODOs and beginning of Kraken Tests

* Added Kraken tests using public endpoints + handling of "SATS" currency

* Added 1st mocked Kraken API call: GetAssetBalancesAsync

* Added assert for bad config

* Mocked more Kraken API responses + added CreationDate to withdrawal response

* pr review club changes

* Make Kraken Custodian a plugin

* Re-added User-Agent header as it is required

* Fixed bug in market trade on Kraken using a percentage as qty

* A short delay so Kraken has the time to execute the market order and we don't fetch the details too quickly.

* Merged the draft swagger into the main swagger since it didn't work anymore

* Fixed API permissions test

* Removed 2 TODOs

* Fixed unit test

* After a utxo rescan, the cached balance should be invalidated

* Fixed Kraken plugin build issues

* Added Kraken plugin to build

* WIP UI + config form

* Create custodian account almost working - only need to add in the config form

* Working form, but lacks refinement

* Viewing balances + Editing custodian account works, but cannot change the withdrawal destination config because that is an object using a name with [] in it

* cleanup

* Minor cleanup, comments

* Working: Delete custodian account

* Moved the MockCustodian used in tests to a new plugin + linked it to the tests

* WIP viewing custodian account balances

* Split the Mock custodian into a Mock + Fake, various UI improvements and minor fixes

* Minor UI fixes

* Removed broken link

* Removed links to anchors as they cannot pass the tests since they use JavaScript

* Removed non-existing link. Even though it was commented out, the test still broke?

* Added TODOs

* Now throwing BadConfigException if API key is invalid

* UI improvements

* Commented out unfinished API endpoints. Can be finished later.

* Show fiat value for fiat assets

* Removed Kraken plugin so I can make a PR


Removed more Kraken files

* Add experimental route on UICustodianAccountsControllre

* Removed unneeded code

* Cleanup code

* Processed Nicolas' feedback

Co-authored-by: Kukks <evilkukka@gmail.com>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-07-07 22:42:50 +09:00
Umar Bolatov
d6f13be95f
Redirect to invoice details instead of list upon creation (#3936)
* Redirect to invoice details instead of list upon creation

close #3909

* fix tests
2022-07-07 21:47:59 +09:00
Andrew Camilleri
3576ebd14f
Public Invoice receipt (#3612)
* Public Invoice receipt

* implement payment,s qr, better ui, and fix invoice bug

* General view updates

* Update admin details link

* Update view

* add missing check

* Refactor

* make payments and qr  shown by default
* move cusotmization options to own ReceiptOptions
* Make sure to sanitize values inside PosData partial

* Refactor

* Make sure that ReceiptOptions for the StoreData is never null, and that values are always set in API

* add receipt link to checkout and add tests

* add receipt  link to lnurl

* Use ReceiptOptions.Merge

* fix lnurl

* fix chrome

* remove i18n parameterization

* Fix swagger

* Update translations

* Fix warning

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-07-06 21:14:55 +09:00
Nicolas Dorier
8873c51f2b
Merge pull request #3926 from NicolasDorier/improveperfbigwallet
Improve performance of on chain transaction listing for big wallets
2022-07-05 14:54:27 +09:00
nicolas.dorier
2ba24ba56b
Tests should use explorer.postgres 2022-07-05 14:39:50 +09:00
d11n
b422e79896
Add test cases for wallet send wizard links (#3927) 2022-07-04 21:59:46 +09:00
d11n
181d4d5ea4
Improve wallet nav (#3921)
* Fix rescan nav highlighting

* Wallet send wizard

* Wallet receive wizard

* Consistent wizard back button behaviour
2022-07-04 13:20:08 +09:00
nicolas.dorier
2e2c6aef83
Fix warning 2022-07-02 20:39:34 +09:00
Kukks
4eabe91cee remove lnurl from crowdfund as per requests 2022-06-30 14:25:52 +02:00
Dennis Reimann
ed1f249aaf Fix empty permissions case 2022-06-29 15:36:54 +02:00
Dennis Reimann
eef7539c2d Fix selective stores case 2022-06-29 15:36:54 +02:00
Dennis Reimann
1bb35bf545 Limit selection to one store 2022-06-29 15:36:54 +02:00
Dennis Reimann
2b9cb4a257 Better handling of confirm case (existing API key) 2022-06-29 15:36:54 +02:00
Dennis Reimann
9e253ac7a3 Test improvements 2022-06-29 15:36:54 +02:00
Dennis Reimann
27c5b16957 Improve views; fix tests 2022-06-29 15:36:54 +02:00
Andrew Camilleri
3d7f628014
Support Lnurl Withdraw in pull payments (#3709)
* Support Lnurl Withdraw

* cleanup and small fixes

* remove putin brace
2022-06-28 23:02:17 +09:00
d11n
6d3e1bb40a
Dashboard: Add Point Of Sale data (#3897)
* Dashboard: Add Point Of Sale data

Closes #3675.

* LNURL: Add POS redirect URL

* POS: Fix invoices link

* Fix integration tests

* Simplify data aggregation

* Improve chart display
2022-06-28 14:05:02 +09:00
Umar Bolatov
95b9e4dfd9
Add basic Greenfield API Get and Delete operations for apps (#3894)
* Add basic Greenfield API Get and Delete operations for apps

Will follow-up with PATCH and also with GET which returns more than just basic data later. This sets up the basic stuff first.

* Add methods to LocalBTCPayServerClient
2022-06-27 10:14:16 +09:00
Nicolas Dorier
c89f7aaaed
Improve email settings validation and UX (#3891) 2022-06-23 13:41:52 +09:00
Andrew Camilleri
c2d72e71aa
Store Emails (#3611)
* Store Emails

* fix test

* Update email rules layout

* Cleanups

* Test cleanups

* Add back comments

* Update view; add test

* Show email rules link even if email settings aren't completed

* Validate email addresses

* No redirect, display warning

* Fix test

* Refactoring: Change email argument types to MailAddress

* Test fix

* Refactoring: Use MailboxAddress

* Parse emails properly in controllers and backend

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-06-22 12:05:32 +09:00
nicolas.dorier
b2a5b3c3c4
Fix tests 2022-06-20 13:36:01 +09:00
dstrukt
cade6c6c38
Move View action to the Name column in Payouts & Payment Requests (#3873)
* ui+paymentrequest: moves 'view' link to name

* ui+pull: moves 'view' link to name column

* Update links, fix tests

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-06-20 11:52:12 +09:00
d11n
f0e013e1f8
Make Pay Button a plugin (#3862)
* Move files

* Fix potentially missing default payment method

Before, it got removed if any other value was changed besides the default payment method.

* Fix missing store data

* Update BTCPayServer/Plugins/PayButton/PayButtonPlugin.cs

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

* Update pay button warning

Closes #3535.

Co-authored-by: Pavlenex <pavle@pavle.org>
2022-06-15 11:32:46 +09:00
Andrew Camilleri
9a24e4ade1
Store Settings feature with own table (#3851)
* Store Settings feature with own table

* fix test

* Include the store settings to StoreRepository, remove caching stuff

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-06-13 13:36:47 +09:00
Umar Bolatov
d0e01768ab Allow excluding unconfirmed UTXOs when creating a new transaction with Greenfield API
See original request: https://github.com/btcpayserver/btcpayserver/discussions/3737
2022-06-10 08:39:01 +02:00
Kukks
3d63e12c9e
fix test 2022-06-09 12:43:28 +02:00
Andrew Camilleri
fcbe1dd8eb
Fix: Local Client Factory was not properly handling the override for auth (#3799)
* Fix: Local Client Factory was not properly handling the override for auth

* implement nonimplemented method
2022-06-06 22:57:55 +09:00
rustywave
9d75225bd5 Redirect create and edit payment request to list view upon completion
Create and edit now redirect to list view. Both actions use the same method. Also updated notification message.

Kept extraneous redirect value for xUnit tests. Update selenium test to account for redirect to list view.
2022-06-06 07:53:41 +02:00
d11n
5616b7550f
Improve Refund Flow (#3731) 2022-06-02 10:08:55 +02:00
Nicolas Dorier
fcd6159b42
Merge pull request #3511 from bolatovumar/feat/api/apps
Add support for creating POS apps through Greenfield API
2022-06-02 14:13:25 +09:00
nicolas.dorier
02e5e1bc1e
Fix CheckNoDeadLink which can enter in infinite loop 2022-06-02 13:26:14 +09:00
Nicolas Dorier
1d3c4b6f90
Merge pull request #3773 from NicolasDorier/wefiou
Remove HistoricalAddresses table
2022-05-24 19:06:08 +09:00
nicolas.dorier
67eeb4b69a
Allow resolution of any settings via DI 2022-05-24 14:10:19 +09:00
nicolas.dorier
8828251204
Remove HistoricalAddresses 2022-05-23 11:32:37 +09:00
nicolas.dorier
3285f24fe9
Add experimental mode 2022-05-23 10:46:51 +09:00
Andrew Camilleri
c7d0537bf9
Fix labels not showing multiple payouts payments (#3729)
* Fix labels not showing multiple payouts payments

* Improve label tooltip

Makes it more readable

* Cleanup code

* Fix overflowing text in order ID field in invoices table (#3765)

close #3714

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
Co-authored-by: Umar Bolatov <bolatovumar@gmail.com>
2022-05-23 10:25:46 +09:00
d11n
3e95b59be8
Wallet transactions export (#3744)
* Wallet transactions export

The exported data needs some more work.

* Fix transactions export policy

* Add test cases

* Fix Selenium warnings

* Finalize export format

* Test export download

* Remove CSV download check

* Try to fix test
2022-05-20 09:35:31 +09:00
d11n
5328303c32
Align settings in properties and docker-compose (#3761)
Maps the LND gRPC port, which is used in the launch settings and fixes the LND REST port.
2022-05-19 23:58:04 +09:00
Andrew Camilleri
76a6d94bbe
Exchange api no kraken (#3679)
* WIP New APIs for dealing with custodians/exchanges

* Simplified things

* More API refinements + index.html file for quick viewing

* Finishing touches on spec

* Switched cryptoCode to paymentMethod as this allows us to differentiate between onchain and lightning

* Moved draft API docs to "/docs-draft"

* WIP baby steps

* Added DB migration for CustodianAccountData

* Rough but working POST /v1/api/custodian-account + GET /v1/api/custodian

* WIP + early Kraken API client

* Moved service registration to proper location

* Working create + list custodian accounts + permissions + WIP Kraken client

* Kraken API Balances call is working

* Added asset balances to response

* List Custodian Accounts call does not load assetBalances by default, because it can fail. Can be requested when needed.

* Call to get the details of 1 specific custodian account

* Added permissions to swagger

* Added "tradableAssetPairs" to Kraken custodian response + cache the tradable pairs in memory for 24 hours

* Removed unused file

* WIP + Moved files to better locations

* Updated docs

* Working API endpoint to get info on a trade (same response as creating a new trade)

* Working API endpoints for Deposit + Trade + untested Withdraw

* Delete custodian account

* Trading works, better error handling, cleanup

* Working withdrawals + New endpoint for getting bid/ask prices

* Completed withdrawals + new endpoint for getting info on a past withdrawal to simplify testing, Enums are output as strings,

* Better error handling when withdrawing to a wrong destination

* WithdrawalAddressName in config is now a string per currency (dictionary)

* Added TODOs

* Only show the custodian account "config" to users who are allowed

* Added the new permissions to the API Keys UI

* Renamed KrakenClient to KrakenExchange

* WIP Kraken Config Form

* Removed files for UI again, will make separate PR later

* Fixed docs + Refactored to use PaymentMethod more + Added "name" to custodian account + Using cancelationToken everywhere

* Updated withdrawal info docs

* First unit test

* Complete tests for /api/v1/custodians and /api/v1/custodian-accounts endpoints + Various improvements and fixes

* Mock custodian and more exceptions

* Many more tests + cleanup, moved files to better locations

* More tests

* WIP more tests

* Greenfield API tests complete

* Added missing "Name" column

* Cleanup, TODOs and beginning of Kraken Tests

* Added Kraken tests using public endpoints + handling of "SATS" currency

* Added 1st mocked Kraken API call: GetAssetBalancesAsync

* Added assert for bad config

* Mocked more Kraken API responses + added CreationDate to withdrawal response

* pr review club changes

* Make Kraken Custodian a plugin

* Re-added User-Agent header as it is required

* Fixed bug in market trade on Kraken using a percentage as qty

* A short delay so Kraken has the time to execute the market order and we don't fetch the details too quickly.

* Merged the draft swagger into the main swagger since it didn't work anymore

* Fixed API permissions test

* Removed 2 TODOs

* Fixed unit test

* Remove Kraken Api as it should be separate opt-in plugin

* Flatten namespace hierarchy and use InnerExeption instead of OriginalException

* Remove useless line

* Make sure account is from a specific store

* Proper error if custodian code not found

* Remove various warnings

* Remove various warnings

* Handle CustodianApiException through an exception filter

* Store custodian-account blob directly

* Remove duplications, transform methods into property

* Improve docs tags

* Make sure the custodianCode saved is canonical

* Fix test

Co-authored-by: Wouter Samaey <wouter.samaey@storefront.be>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-05-18 14:59:56 +09:00
d11n
6d76771b16
Lightning: Allow specifying explicit amount for invoices (#3753)
* Upgrade Lightning lib

* Lightning: Allow specifying explicit amount for invoices

* Fix tests
2022-05-18 14:57:36 +09:00
Umar Bolatov
fca066fe52
Add endpoint for creating POS app 2022-05-17 21:26:33 -07:00
Dennis Reimann
f1029fceff Fix webhooks test
Re-adds two classes used by the tests, that got removed in #3716.
2022-05-12 12:04:31 +02:00
Nicolas Dorier
4acca4c6f5
Try fix selenium test error (#3728) 2022-05-09 14:13:51 +09:00
Nicolas Dorier
c106ff8290
bump selenium (#3723) 2022-05-06 12:07:53 +09:00
Nicolas Dorier
e16a718bde
Do not always provide counting in list views (#3696) 2022-05-02 16:35:28 +09:00
Andrew Camilleri
ed1a7bb887
Allow auto approval of claims for pull payments (#1851)
* Allow auto approval of claims for pull payments

closes #1780

* fix
2022-04-28 09:51:04 +09:00
Andrew Camilleri
273bc78db3
Allow Users to be disabled/enabled (#3639)
* Allow Users to be disabled/enabled

* rebrand to locked for api

* Update BTCPayServer/Views/UIAccount/Lockout.cshtml

Co-authored-by: d11n <mail@dennisreimann.de>

* fix docker compose and an uneeded check in api handler

* fix

* Add enabled user test

Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2022-04-26 21:27:35 +09:00
nicolas.dorier
5a7b275ee3
Fix CanCreateAppPos 2022-04-25 17:37:46 +09:00
Andrew Camilleri
51690b47a3
Transfer Processors (#3476)
* Automated Transfer processors

This PR introduces a few things:
* Payouts can now be directly nested under a store instead of through a pull payment.
* The Wallet Send screen now has an option to "schedule" instead of simply creating a transaction. When you click on schedule, all transaction destinations are converted into approved payouts. Any options relating to fees or coin selection are discarded.
* There is a new concept introduced, called "Transfer Processors".  Transfer Processors are services for stores that process payouts that are awaiting payment. Each processor specifies which payment methods it can handle.  BTCPay Server will have some forms of transfer processors baked in but it has been designed to allow the Plugin System to provide additional processors.
* The initial transfer processors provided are "automated processors", for on chain and lightning payment methods. They can be configured to process payouts every X amount of minutes. For  on-chain, this means payments are batched into one transaction, resulting in more efficient and cheaper fees for processing.
*

* fix build

* extract

* remove magic string stuff

* fix error message when scheduling

* Paginate migration

* add payout count to payment method tab

* remove unused var

* add protip

* optimzie payout migration dramatically

* Remove useless double condition

* Fix bunch of warnings

* Remove warning

* Remove warnigns

* Rename to Payout processors

* fix typo

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2022-04-24 12:19:34 +09:00
Andrew Camilleri
7652d2c7e3
LN Address - db schema fix method (#3638)
* LN Address - db schema fix method

* pr changes

* shorten
2022-04-19 16:58:31 +09:00
Umar Bolatov
7e6a2d08e2
Add label filter for onchain tx API endpoint (#3588)
* Add label filter for onchain tx API endpoint

close #3587

* Add Swagger docs

* Add test for filtering by transaction label
2022-04-18 11:20:15 +09:00
Umar Bolatov
eb2ccf06a5
Fix typos in README file (#3644)
* Fix typos in README file

* Update BTCPayServer.Tests/README.md

Co-authored-by: d11n <mail@dennisreimann.de>

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
Co-authored-by: d11n <mail@dennisreimann.de>
2022-04-18 10:24:17 +09:00
Umar Bolatov
64534efe71
Fix broken "CanCreateRefunds" test (#3635) 2022-04-14 14:07:10 +09:00
Umar Bolatov
23d383be67
Add transaction info PATCH endpoint (#3561)
* Add transaction info patch endpoint

* Add "#nullable enable" to LabelFactory

* Add Swagger docs

* Update OnChain to onchain

* update feeRate to feerate

* Add test

* replace "Onchain" with "onchain"
2022-04-14 13:17:22 +09:00
d11n
8981414705
API: Add Lightning Payment info endpoint (#3557)
* Upgrade Lightning lib

* API: Add Lightning Payment info endpoint
2022-04-12 18:01:58 +09:00
d11n
7ec978fcdb
Dashboard (#3530)
* Add dashboard and chart basics

* More widgets

* Make widgets responsive

* Layout dashboard

* Prepare ExplorerClient

* Switch to Chartist

* Dynamic data for store numbers and recent transactions tiles

* Dynamic data for recent invoices tile

* Improvements

* Plug NBXPlorer DB

* Properly filter by code

* Reorder cheat mode button

* AJAX update for graph data

* Fix create invoice button

* Retry connection on transient issues

* App Top Items stats

* Design updates

* App Sales stats

* Add points for weekly histogram, set last point to current balance

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-04-12 16:55:10 +09:00
d11n
cd9a52706c
Use the store's default currency when creating entities (#3585)
* Use default currency for new pull payments

Closes #3582.

* Pull payment: Improve create form

* Use default currency for new invoices

Closes  #3581.

* Clean up old invoice form code

* Use default currency for new payment requests

* Test fixes
2022-04-11 17:50:30 +09:00
d11n
e5174b4a29
Lightning: Link to services directly (#3593)
* Allow to access fake LN services in dev mode

* Link directly to Lightning services

Closes #3552.

* Fix typo
2022-04-11 17:49:28 +09:00
d11n
6bd7fb64ab
CI test fixes (#3609)
* Test fix


Logs

* Add test logs

* Test change

* Use async overloads in CanPayWithTwoCurrencies test

* Bump NBXplorer

* More test updates

* More logs

* More waiting

* More waiting

* Update GoToUrl calls

* Log request status

* More logs

* More logs, more waits, idk

* Click checkboxes using JS

* Go to url directly

* Double timeout
2022-04-08 18:58:01 +09:00
nicolas.dorier
b9602243d3
Fix tests for litecoin 2022-04-08 13:03:51 +09:00
Pavlenex
28ce095fb4
Merge pull request #3602 from phershbe/master
Link to local development environment instructions corrected
2022-04-05 09:01:00 +02:00
Nicolas Dorier
13952a4b79
Bump NBX (#3607) 2022-04-05 14:46:42 +09:00
Philip
dea2dd52be
Link to local development environment instructions corrected
As noted here: https://github.com/btcpayserver/btcpayserver/issues/3590

The link to the local development environment instructions was broken and now is correct.
2022-04-01 22:18:43 -04:00
Kukks
77da261fea
Allow plugins to extend swagger docs and fix pull payment test 2022-03-29 20:29:27 +02:00
Kukks
e23c9ee608
Add missing policies in api key UI 2022-03-29 20:12:02 +02:00
Kukks
dca986eb2e Add Greenfield Store Email API 2022-03-26 21:46:40 +00:00
Wouter Samaey
3b4d06a1e5 Bugfix: Could not find an order by OrderId after it's OrderId was changed through the API 2022-03-25 13:21:43 +00:00
Umar Bolatov
ce6cd40b92
Adjust wallet receive page layout (#3553)
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-03-11 10:43:31 +01:00
Wouter Samaey
c36b0c16b0
New API endpoint: Send email using store SMTP (#3181)
Co-authored-by: Kukks <evilkukka@gmail.com>
2022-03-11 10:17:40 +01:00
Dennis Reimann
722c39a6ff Exclude ChainCoin in rate provider test 2022-03-08 12:12:01 +01:00
Dennis Reimann
e344749d2f Remove Polis
As per [this comment](https://github.com/btcpayserver/btcpayserver/pull/3514#issuecomment-1059583143)
2022-03-08 12:12:01 +01:00
Dennis Reimann
1240e7914d Fixes 2022-03-08 08:17:39 +00:00
Dennis Reimann
e4683b1ea1 Refactoring: Extract ITempDataDictionary extensions 2022-03-08 08:17:39 +00:00
Dennis Reimann
4dfbb08db3 Try test fix 2022-03-04 10:49:36 +00:00
Dennis Reimann
a89491e343 Skip Polis and OKEx in rate fetching tests 2022-03-03 10:57:55 +01:00
Dennis Reimann
b1b00ae886 Scroll to checkbox before click 2022-03-03 10:57:55 +01:00
Dennis Reimann
4a05f16050 Refactoring: Move WellKnownTempData into Abstractions.Constants
This allows plugins to reuse the status message mechanism.
2022-02-21 16:39:08 +01:00
nicolas.dorier
19ec8c36e2
Remove debug line in selenium tests 2022-02-21 16:17:36 +09:00
Nicolas Dorier
19eea3a615
Refactor how we get storeids list in invoice filter (#3483) 2022-02-21 14:53:48 +09:00
nicolas.dorier
557594e34d
Test LNUrl Pay payment method information, add doc 2022-02-21 13:22:17 +09:00
d11n
9b9540b857
PSBT test fix (#3472) 2022-02-18 10:55:54 +09:00
Umar Bolatov
a3b748ffe3
Remove payment methods not currently configured when creating invoice (#3394)
* Add error message when wallet is not configured

* Adjust payment methods based on available ones

* Disable "Create invoice" page if there is an error

* Add test

* update HasErrorMessage

* Add method for checking if payment methods are available

* small pr fixes

Co-authored-by: Kukks <evilkukka@gmail.com>
2022-02-17 18:22:09 +09:00
d11n
5c8ca15ee2
Redesign Wallet UI (#3441)
* Update wallet navigation

* Find matching text color for label bg color

* Cleanup

* Extract WalletNav component

* Move PSBT link to Send and Rescan link to Settings

* Update transactions view

* Test fixes

* Adapt invoices list actions

* Show invoice actions only if there are any invoices

* Link wallet name and balance to tranactions list

* Move wallet related actions from list to settings

* Fix main menu z-index

Needs a value between fixed and the offcanvas backdrop, see https://getbootstrap.com/docs/5.1/layout/z-index/

* Update receive and send views
2022-02-17 18:07:41 +09:00
Nicolas Dorier
6efeb60c41
Fix the PSBT signing flow (#3465) 2022-02-17 17:58:56 +09:00
Wouter Samaey
288fbda54f
New API endpoint: Find 1 user by ID or by email, or list all users. (#3176)
Co-authored-by: Kukks <evilkukka@gmail.com>
2022-02-15 16:19:52 +01:00
hhanh00
f4153ade92
Zcash integration (#3400)
* zcash

* Use Channel instead of Queue
2022-02-14 17:04:34 +09:00
Umar Bolatov
f06199230c
Add ability to add description to pull payment (#3363)
* Add ability to add description to pull payment

close #2625

* Add API support

* Remove 'Model.Description != "<br>"'
2022-02-10 14:54:00 +09:00
Andrew Camilleri
da9a6b835a
Greenfield: Store Users (#3425)
* Greenfield: Store Users

* fixups

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-02-10 14:51:10 +09:00
d11n
3fa694c65f
Improve Lightning test scripts (#3435) 2022-02-10 12:25:14 +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
d11n
99c4ebe046
Setup guide: Link wallet setup always to BTC (#3442) 2022-02-10 12:17:15 +09:00
d11n
699231fd92
Fix payment request archival actions (#3443) 2022-02-09 23:37:15 +09:00
Nicolas Dorier
c8b9906ef3
After login, redirect user to the main page even if root app configured (#3429) 2022-02-07 21:18:22 +09:00
nicolas.dorier
cd94a9fac1
Make CheckNoDeadLink more reliable 2022-02-07 21:15:39 +09:00
d11n
20a9472ee2
Sticky headers (#3416)
* Make headers sticky

Closes #3344.

* Decrease headline margin bottom on mobile

* increases gap

* adds bottom padding

* Update BTCPayServer/Views/UIApps/UpdatePointOfSale.cshtml

* add "_blank" to view action

* Fix markup and tests

* Spacing updates

* Try test fix

* Re-add sticky account header and add test logs for timeout check

* Fix timeout issues

* Apply scroll padding on pages with sticky header

Co-authored-by: dstrukt <gfxdsign@gmail.com>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-02-07 18:37:45 +09:00
rockstardev
c652a2f122
Bumping LND to 0.14.2-beta (#3424) 2022-02-07 16:30:17 +09:00
Umar Bolatov
aab1eb0d36
Ensure Swagger docs are semantically and structurally correct (#3390)
* Remove "delete" method from "/api/v1/stores/{storeId}/invoices/{invoiceId}/payment-methods" docs

* Remove "requestBody" from "delete" method of "/api/v1/stores/{storeId}/webhooks/{webhookId}"

* Rename "API Key" to "API_Key"

* Remove "scheme" from API_Key security scheme

* Remove "name" and "in" properties from "Basic"security scheme
2022-02-02 20:12:48 +09:00
nicolas.dorier
254e8d48f2
Fix test 2022-01-28 22:51:12 +09:00
dstrukt
cc1233e8d5
Adjust Pay Button (#3354)
* updates padding

* padding adjustments

* updates

* Redirect to paybutton enable page when disabling

* Fix test

* Fix test

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-01-26 14:55:48 +09:00
Dennis Reimann
723a38da68
Store: Combine General and Payment settings 2022-01-25 06:57:55 +01:00
nicolas.dorier
74037fd605
Make CanUseTorClient more reliable 2022-01-25 12:27:44 +09:00
Andrew Camilleri
e917796fce
Set new LN defaults (#3325)
fixes #3324
2022-01-25 12:17:39 +09:00
Nicolas Dorier
090da6cfb6
Add configurable BOLT11Expiration for refunds (Fix #3281) (#3341)
* Add configurable BOLT11Expiration for refunds (Fix #3281)

* Add BOLT11Expiration configuration in Payment
2022-01-24 20:17:09 +09:00
Nicolas Dorier
e23ddf118e
Add warning about the tradeoff the paybutton (#3340)
* Add warning about the security tradeoff of the paybutton

* Update BTCPayServer/Views/UIStores/PayButtonEnable.cshtml

Co-authored-by: d11n <mail@dennisreimann.de>

* Move message in column

Co-authored-by: d11n <mail@dennisreimann.de>
2022-01-24 20:00:42 +09:00
d11n
c419ad68bb
Remove redundant payment methods from store settings (#3323)
* Add enabled toggle to wallet settings view

* Add enabled toggle to Lightning settings view

* Remove redundant payment methods from store settings

* Rename Payment Methods to Payments

* Adapt tests

* Fix invoice state toggle on details page

* Add spacing on Lightning sett8ings page
2022-01-19 20:58:02 +09:00
d11n
51c486c15a
Add Lightning page with services (#3308)
* Add Lightning page with services

* Adapt other services pages

* Display Lightning services only for internal node
2022-01-19 11:52:05 +09:00
nicolas.dorier
d667b8ae8b Add LNURL support to Crowdfund 2022-01-18 12:26:15 +01:00
d11n
1d3f74c8bb
Home sweet home (#3313)
* Link to store home, show home only if there is no store

* Handle store guest case

* Apply correct policies to nav items
2022-01-18 10:20:59 +09:00
dstrukt
c3f73c0de3
Content Consistency Updates (1.4.0) (#3316)
* updates

* updates

* updates

* updates

* updates

* moves api key CTA to top right

* updates

* more updates

* more updates

* Fix active state when "Account" is selected

* Update wording in subnav: Profile becomes Account

* Fix email test

* Update Emails wording

* Try to fix email test

* Make General first tab in store settings

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-01-18 10:19:27 +09:00
nicolas.dorier
21e69251e3
CanSendIPN can't ensure received payment is sent first 2022-01-17 16:59:37 +09:00
Nicolas Dorier
14da3023d8
Merge pull request #3310 from NicolasDorier/niceurl
Use nicer urls, part2 (Fix #921)
2022-01-17 11:41:20 +09:00
nicolas.dorier
961769ebd0
Fix AssertNoError to detect page exception 2022-01-16 12:39:08 +09:00
nicolas.dorier
d1f567eade
Add Include Error Details to postgres connection string 2022-01-15 14:54:06 +09:00
nicolas.dorier
b9fdd54538
Use nicer urls, part2 (Fix #921) 2022-01-15 14:54:06 +09:00
Kukks
7243aec213 Support LNURL Auth 2022-01-14 13:26:30 +01:00
nicolas.dorier
1fb582c35d
Rename the Fido2Controller 2022-01-14 18:34:30 +09:00
nicolas.dorier
50d4b55f73
Warning if not using 'simple using' 2022-01-14 17:50:29 +09:00
nicolas.dorier
c6a7e90c1a
Warning if not using 'is not null' 2022-01-14 17:48:15 +09:00
nicolas.dorier
23a96c07ae
Rename GreenField -> Greenfield 2022-01-14 13:46:04 +09:00
nicolas.dorier
7a787fc945
Rename UI controllers 2022-01-14 13:46:03 +09:00
nicolas.dorier
eaf47d3739
Rename controllers Bitpay controllers 2022-01-14 12:21:06 +09:00
Nicolas Dorier
5eebdb6774
Use nicer urls (Fix #921) (#3304) 2022-01-14 12:20:50 +09:00
nicolas.dorier
223c71ce8b
Fix tests 2022-01-13 23:50:33 +09:00
d11n
69d1acc797
Empty states: Setup guide for store and wallet (#3255)
* Store Selector: Create first store button

* Add setup guide to homepage

* Policy update for stores list

* Fix test

* Initial create store button as primary

* Add notifications list to homepage

* Remove back to list from store create view

* Adapt content padding on desktop

* Add store home view with setup guide

* Fix active page nav highlighting

* Test fix

* Remove What's Next section

* Rename Store Home to Dashboard

* Fix Lightning setup link

* Add tests for store setup guide

* Update BTCPayServer/Views/Home/Home.cshtml

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

* Update BTCPayServer/Views/Stores/Dashboard.cshtml

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

* Remove setup guide on global homepage

* Remove Shopify setup link from nav

* Fix content container max-width on desktop

Co-authored-by: Pavlenex <pavle@pavle.org>
2022-01-13 17:08:15 +09:00
nicolas.dorier
77be2fa9d5
Make CanUseWebhooks less flaky 2022-01-13 13:27:02 +09:00
nicolas.dorier
2327b97fa3
Make CanUseWebhooks less flaky 2022-01-13 13:21:54 +09:00
nicolas.dorier
5a2a933b64
Add more logs to the canusetor test 2022-01-12 18:26:45 +09:00
nicolas.dorier
a02ad104ee
Bump Clipboard.js 2022-01-12 16:06:28 +09:00
Nicolas Dorier
708f8b49df
[Greenfield] Let non-admin update LN payment method with internal node if it is unchanged (Fix #2860) (#3288) 2022-01-11 23:38:05 +09:00
Nicolas Dorier
5bbaa48b49
Fix change state broken in the UI and update invoice's status in payment request to new convention (Fix #3265) (#3286) 2022-01-11 21:49:56 +09:00
Nicolas Dorier
7444bd06e4
[Greenfield] Fix create/update payment requests expiry field and allow null currency field (Fix #3222) (#3284) 2022-01-11 18:42:44 +09:00
Nicolas Dorier
0017e687db
A store's guest should be able to manage lightning invoices (Fix #3212) (#3283) 2022-01-11 17:22:10 +09:00
dstrukt
5865fd5022
Improve Payout View (#3260)
* updates payouts

* update spacing

* improvements

* View updates

* updates spacing

* Fix spacing

* Fix markup

* Fix test

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-01-11 17:15:23 +09:00
dstrukt
4b941a5145
Update Invoice Views (#3264)
* updates create invoice

* updates invoice list

* formats

* updates row

* updates

* Improve invoice list markup and fix mass action form

* Responsive invoice table

* Improve spacing on invoice detail view

* Improve archive message

* Responsive status change partial

* Add test case for mass archiving

* Add mass unarchiving

Closes #3270.

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-01-11 17:14:34 +09:00
nicolas.dorier
c6df43363f
Extract MultiProcessingQueue from WebhookNotificationManager 2022-01-11 13:21:38 +09:00
nicolas.dorier
8bea3dd21e
[Greenfield] if some json property are invalid, throw nice error instead of an exception (fix #2795) 2022-01-10 22:11:04 +09:00
Dennis Reimann
0dcf240faf
Account menu improvement 2022-01-07 17:25:28 +01:00
nicolas.dorier
88bc1c64d2
Fix tests 2022-01-07 21:47:19 +09:00
nicolas.dorier
84bd8a6e98
fix tests 2022-01-07 21:16:26 +09:00
nicolas.dorier
0d657fc646
Fix tests 2022-01-07 20:54:26 +09:00
nicolas.dorier
64b85ac1f9
Fix AssertNoError 2022-01-07 19:49:33 +09:00
nicolas.dorier
b71a04943b
CookieAuthHandler shouldn't set store context if appId/payReqId/invoiceId is not found 2022-01-07 18:10:31 +09:00
nicolas.dorier
fa84e34def
Fix test 2022-01-07 13:02:07 +09:00
Kukks
8c3f377fc0 fix elements 2022-01-06 18:09:06 +01:00
Nicolas Dorier
fd2e55e444
Simplify tests to take advantage of context (#3246) 2021-12-31 22:02:53 +09:00
Nicolas Dorier
04b8eafacb
Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
d11n
e2d0b7c5f7
Store centric UI: Part 3 (#3224)
* Set store context in cookie

* Fix page id usages in view

* Move Pay Button to nav

* Move integrations to plugins nav

* Store switch links to wallet if present

* Test fixes

* Nav fixes

* Fix altcoin view

* Main nav updates

* Wallet setttings nav update

* Move storeId cookie fallback to cookie auth handler

* View fixes

* Test fixes

* Fix profile check

* Rename integrations nav extension point to store-integrations-nav-list

* Allow strings for Active page/category for plugins

* Make invoice list filter based on store context

* Do not set context if we are running authorizer through tag helper

* Fix test and unfiltered invoices

* Add permission helper for wallet links

* Add sanity checks for payment requests and invoices

* Store context in home controller

* Fix PayjoinViaUI test

* Store context for notifications

* Minor UI improvements

* Store context for userstores and vault controller

* Bring back integrations page

* Rename notifications nav pages file

* Fix user stores controller policies

* Controller policy fixes from code review

* CookieAuthHandler: Simplify CanViewInvoices case

* Revert "Controller policy fixes from code review"

This reverts commit 97e8b8379c.

* Simplify LayoutSimple

* Fix CanViewInvoices condition

Co-authored-by: Kukks <evilkukka@gmail.com>
2021-12-31 16:36:38 +09:00
nicolas.dorier
db1a124ffb
Do not check certificates for SMTP settings if local server 2021-12-29 18:24:24 +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
e2b18cf9db
Make sure dotnet test show test progress 2021-12-27 14:26:03 +09:00
nicolas.dorier
c0e9f91bdc
Fix warnings 2021-12-27 13:58:18 +09:00
Nicolas Dorier
02419dcdd1
Migrate to .net6.0 (#3198) 2021-12-27 13:15:43 +09:00
Andrew Camilleri
48ac996d77
Sign in with other device (quick mobile login) (#2504)
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2021-12-24 09:27:00 +01:00
Wouter Samaey
f63a9ed1a0 Added field "StoreId" to a Payment Request in Greenfield 2021-12-22 16:17:35 +01:00
Dennis Reimann
3a59e2a5c4 Cache resolved store items in HTTP context 2021-12-21 09:24:09 +01:00
d11n
bb751793c8
Various minor UI fixes and cleanups (#3208)
* Copy to clipboard fix

* Improve invoice status change wording and JS

* Re-add ability to delete apps

Now that the list view is gone, we need to move this option to the edit view

* Clean up app and payment request bundles

* Fix for invoice status change when dismissed
2021-12-19 13:05:10 +09:00
Nicolas Dorier
c68141119c
[Greenfield] Send forbid 403 rather than empty results on /api/v1/stores (#3215) 2021-12-19 01:01:54 +09:00
Nicolas Dorier
163d1a195d
Fix: DateTime passed to bitpay API weren't assumed UTC, remove DateTime.Now references (#3206) 2021-12-17 15:31:06 +09:00