Commit Graph

5708 Commits

Author SHA1 Message Date
d11n
98d8ef8e1a
Checkout Appearance: Move language settings into the general section (#4833)
The language settings work for both versions of the checkout, so let's make them available for both. Request by @petzsch.
2023-03-30 08:18:13 +02:00
Nicolas Dorier
0e43042217
Remove FakeCustodian as a separate project (#4839) 2023-03-30 12:38:30 +09:00
Andrew Camilleri
c8e6714207
Merge pull request #4784 from dennisreimann/unify-plugins-apps
Apps become plugins
2023-03-29 20:03:18 +02:00
Andrew Camilleri
824e779eb2
Hooks for Zaps (#4826) 2023-03-29 12:27:04 +02:00
d11n
83ea898780
Checkout: Update wording (#4829)
We make it "Payment Received" instead of "Payment Sent", because in other places we are also talking from the merchant perspective.
2023-03-29 17:24:49 +09:00
nicolas.dorier
5af3233fd6
Add link to forms doc 2023-03-28 22:02:58 +09:00
d11n
08ff2f3173
Checkout: Fix language select width in modal (#4823) 2023-03-28 13:12:47 +02:00
d11n
22657b66d7
NFC finetuning (#4822) 2023-03-28 12:36:32 +02:00
d11n
8b6c7a6061
Pull Payments: FIx column order in list (#4818)
Date and name were swapped. Fixes #4814.
2023-03-28 19:10:50 +09:00
Dennis Reimann
1055e61bb4
NFC improvements
Two changes which fix #4807:

- Once permissions are granted we start scanning immediately, no need to ask for permissions or have the user click the button again
- We don't abort the scan, which gets rid of the cases in which the OS took over after the scan, because the user left the card on the device

Also adds feedback for the NFC states scanning and submitting.
2023-03-27 18:28:53 +02:00
Dennis Reimann
7ad0aa82fc Apps become plugins
Unified navigation for apps that are now plugins. Part of #4744.
2023-03-27 16:43:44 +02:00
Andrew Camilleri
d3f5576570
Remove store integrations list page (#4816)
Co-authored-by: d11n <mail@dennisreimann.de>
2023-03-27 16:40:50 +02:00
d11n
45141d1391
Checkout v2: Payment processing state (#4778) 2023-03-27 12:12:11 +02:00
d11n
de9ac9fd43
Receipt: Add payment proof (#4782)
* Receipt: Add payment proof

Closes #4685.

* shice

* Add truncate-center component

* Improve view

* Hide button and link when printed

* Describe component

* Remove transaction ID from UI

* Remove modification to interface

---------

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2023-03-27 14:07:12 +09:00
d11n
c53d5272d6
Wallet Transactions Export: Add BIP-329 support (#4799)
* Wallet Transactions Export: Add BIP-329 support

* Adjust wording

* Export one line per label

* Join labels, fix type

* Rewrite the ProcessBip329 function to be more performant

* Add nullable on all TransactionsExport

---------

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2023-03-27 13:59:33 +09:00
nicolas.dorier
632d67eef4
Fix casing in template example for forms 2023-03-27 12:54:12 +09:00
d11n
c23aa48688
Optimize invoice print view (#4783)
Closes #4729.
2023-03-26 20:44:05 +09:00
d11n
95f3e429b4
Wallet transactions: Add label manager (#4796)
* Wallet transactions: Add label manager

* Update BTCPayServer/Views/UIWallets/WalletTransactions.cshtml

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Add rich label info

* Fixes

* support labels in wallet send

* add labels to tx info page

* Remove noscript parts

* Allow click on transaction label info

* update psbt info labelstyling

* revert red pixel fix as it broke all

---------

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2023-03-26 20:42:38 +09:00
Chukwuleta Tobechi
8635fcfe84
UI: Redesign Recovery Seed view (#4793)
* Improve recovery seed backup page

* Fix errors from Selenium tests (Sequence contains no elements)

* Revert previous commit

* Improve recovery seed backup page

* Recovery phrase UI update

* recovery seed UI format

* Improve word order

* One column version

---------

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2023-03-24 16:09:53 +01:00
Dennis Reimann
631ee99f60
Greenfield: Fix Lightning transaction list return types
The LocalBTCPayServerClient deserializes the results as arrays (`LightningPaymentData[]` and `LightningInvoiceData[]`) — if they are `IEnumerable` the `GetFromActionResult` does not return the data but null.
2023-03-23 17:42:10 +01:00
nicolas.dorier
ffa1441ccd
Delete code detecting whether the running version of nbx fixed a bug
The reason to delete this is that any version of NBX with this bug
wouldn't be able to run nowadays because of another bug which would
prevent NBXplorer from synching (Array size too big)
2023-03-23 13:45:40 +09:00
Andrew Camilleri
2f3e947027
Merge pull request #4795 from Kukks/lnurl-disable-if-no-node 2023-03-22 09:02:52 +01:00
Andrew Camilleri
a62aecfdfe
Merge pull request #4798 from dennisreimann/fix-4794 2023-03-22 09:02:35 +01:00
Dennis Reimann
0290d74aeb
POS: Fix escaped HTML entities in item title
Properly escapes and the sanitized values. Fixes #4794.
2023-03-21 15:31:54 +01:00
Dennis Reimann
f6bc16007d
Label tooltips: Use plain text instead of HTML
Fixes #4790.
2023-03-21 15:21:24 +01:00
Dennis Reimann
ad5752f09b
Reuse LightningTimeout constant 2023-03-21 14:22:10 +01:00
Kukks
55565f1718
Do not provide lnurl method if ln node is dead
fixes #3541
2023-03-21 13:48:25 +01:00
nicolas.dorier
5f96d17b8c
Update lang 2023-03-20 19:30:56 +09:00
nicolas.dorier
64fe542c1e
Update lang 2023-03-20 19:20:46 +09:00
Andrew Camilleri
fae1dc8dbb
Adapt cookie auth to work with same API permission system (#4595)
* Adapt cookie auth to work with same API permission system

* Handle unscoped store permission case

* Do not consider Unscoped as a valid policy

* Add tests

* Refactor permissions scopes

---------

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2023-03-20 10:46:46 +09:00
Wouter Samaey
6f2b673021
Custodian withdrawal support + Some refactoring and cleanup (#4085)
* Renamed "WithdrawAsync" to "WithdrawToStoreWalletAsync"

* WIP

* WIP withdrawal + Refactored Form saving to JObject

* WIP

* Form to fix bad values during withdrawing appears correctly

* WIP

* Lots of cleanup and refactoring + Password field and toggle password view

* Cleanup + Finishing touches on withdrawals

* Added "Destination" dummy text as this is always the destination.

* Fixed broken test

* Added support for withdrawing using qty as a percentage if it ends with "%". Needs more testing.

* Fixed broken build

* Fixed broken build (2)

* Update BTCPayServer/wwwroot/swagger/v1/swagger.template.custodians.json

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

* Update BTCPayServer/wwwroot/swagger/v1/swagger.template.custodians.json

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

* Improved unit tests

* Fixed swagger bug

* Test improvements

Make string conversion of quantity explicitely.

* Fix build warnings

* Swagger: Add missing operationId

* Made change Dennis requested

* Removed unused file

* Removed incorrect comment

* Extra contructor

* Renamed client methods

* Cleanup config before saving

* Fixed broken controller

* Refactor custodian

* Fix build

* Make decimal fields strings to match the rest of Greenfield

* Improve parsing of % quantities

---------

Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2023-03-20 10:45:32 +09:00
Nicolas Dorier
b26679ca14
Prevent people from starting with --sqlitefile or --mysql (#4772) 2023-03-20 10:40:48 +09:00
Nicolas Dorier
04ba1430ca
Refactor plugin apps (#4780)
* Refactor plugins

* Add missing names to view models

* Cleanups

* Replace SalesAppBaseType by two interfaces

---------

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2023-03-20 10:39:26 +09:00
d11n
53f3758abc
Replace text in copy buttons with icon (#4764)
Closes #4699.
2023-03-19 21:43:38 +01:00
d11n
c6742f5533
Language selector: Ensure correct font-size (#4761)
* Language selector: Ensure correct font-size

Fixes the cut-off text on iOS, because somehow iOS uses a larger font-size by default.

* Fix select background color

Webkit-based browsers displayed transparent in a weird way.
2023-03-19 08:44:23 +01:00
d11n
cb44591a47
Derivation scheme parsing incorporates fingerprint and key path (#4781) 2023-03-17 14:35:30 +01:00
Wouter Samaey
e02abb509f
Allow plugins to do something before and after automatic payouts (#4224) 2023-03-17 13:50:37 +01:00
Nicolas Dorier
eff6be9643
Remove mention of LNUrl-Withdraw when paying by NFC (#4779) 2023-03-17 12:24:27 +01:00
Andrew Camilleri
348dbd7107
Support Form Select option (#4726)
* Support Form Select option

* Add country select
2023-03-17 14:37:37 +09:00
Andrew Camilleri
f74ea14d8b
Plugins can now build apps (#4608)
* Plugins can now build apps

* fix tests

* fixup

* pluginize existing apps

* Test fixes part 1

* Test fixes part 2

* Fix Crowdfund namespace

* Syntax

* More namespace fixes

* Markup

* Test fix

* upstream fixes

* Add plugin icon

* Fix nullable build warnings

* allow pre popualting app creation

* Fixes after merge

* Make link methods async

* Use AppData as parameter for ConfigureLink

* GetApps by AppType

* Use ConfigureLink on dashboard

* Rename method

* Add properties to indicate stats support

* Property updates

* Test fixes

* Clean up imports

* Fixes after merge

---------

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2023-03-17 11:56:32 +09:00
d11n
a671632fde
Dashboard: Fix app stats tiles (#4775)
* Dashboard: Fix app stats tiles

They broke with #4747, because they contain script blocks that are loaded asynchronuosly and need to get run once the chart data is added to the page.

* Refactor PoS dashboard component

* Collocate the component JS files in separate files

---------

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2023-03-16 15:51:24 +09:00
Andrew Camilleri
e344622c9e
Form quick fixes (#4759) 2023-03-15 10:23:33 +01:00
Nicolas Dorier
06d7483ca3
Remove obsolete cli argument 'plugin-remote' (#4773) 2023-03-15 09:06:06 +01:00
d11n
2a31613fe8
Fix invoice paid after expiration icon 2023-03-14 14:54:01 +01:00
d11n
ded0c8a3bc
Update price display (#4736)
* Update price display

As proposed by @dstrukt in #4364.

* Update format

* Unify price display across the app

* Add DisplayFormatter

* Replace DisplayFormatCurrency method

* Use symbol currency format for invoice

* Unify currency formats on backend pages

* Revert recent changes

* Do not show exchange rate and fiat order amount for crypto denominations

* Fix test and add test cases
2023-03-13 10:12:58 +09:00
d11n
f3d9e07c5e
Checkout v2: Celebrate payment with confetti (#4727)
* Checkout v2: Celebrate payment with confetti

Have a colorful celebration for successful payments.

* Make it default and add test
2023-03-13 10:09:56 +09:00
Andrew Camilleri
7951dcada6
make sure we have cors for all of greenfield (#4760)
fixes #4758
2023-03-10 15:20:11 +01:00
Andrew Camilleri
06951a39c6
fix API breaking changefor payout processors (#4757)
fixes #4752
2023-03-10 17:57:33 +09:00
d11n
abe29f21f0
Checkout v2: Option to display amount in Sats in BIP21 case (#4730) 2023-03-09 21:36:11 +01:00
d11n
f57eab3008
Store branding: Add complementing text and accent colors (#4746) 2023-03-09 21:34:15 +01:00
d11n
397ca6ef0c
Checkout v2: Minor UI updates (#4734)
* Checkout v2: Minor copy change

* Allow copying of invoice ID and order ID on results page

* Add copy icons for payment details on results view

* Add missing powered by class to store footers
2023-03-08 21:39:03 +09:00
d11n
d6e5ee2851
UI: Decrease content padding top on small screens (#4749)
If the viewport height is less than 800px, decrease the content padding top for breakpoints L and on.
2023-03-08 21:37:25 +09:00
Nicolas Dorier
98d62e826b
Do not through missing-permission error when no store on /api/v1/stores (Close #4735) (#4748) 2023-03-08 21:36:51 +09:00
Nicolas Dorier
7b5ce8f70c
CSP: Remove unsafe-eval when vue isn't used (#4747)
* CSP: Remove unsafe-eval when vue isn't used

* Prevent XSS injection via VueJS
2023-03-08 17:57:36 +09:00
nicolas.dorier
f787058c17
Fix: Impossible to create invoice after migration from Sqlite (Close #4743) 2023-03-07 10:27:04 +09:00
Kukks
87ccae0d90
add missing docs of store payment method criteria 2023-03-05 14:40:18 +01:00
d11n
fb4feb24f3
Minor updates from design repo (#4733) 2023-03-04 09:36:30 +01:00
Nicolas Dorier
5caa0e0722
[Greenfield] Allow passing email instead of user id in API (#4732) 2023-03-03 21:24:27 +09:00
nicolas.dorier
0406b420c8
Do not create if create API key is called on a non-existant user (Fix #4731) 2023-03-03 20:30:54 +09:00
nicolas.dorier
fdc47e4a38
Avoid crash when some plugins are installed (#4725) 2023-03-03 20:18:09 +09:00
nicolas.dorier
0566e964c0
Fix incorrect punctuation in translations 2023-03-03 17:32:46 +09:00
nicolas.dorier
896fbf9a5c
Lang update 2023-03-03 16:38:39 +09:00
d11n
126c8c101e
Re-add language selector (#4723)
Fixed version
2023-03-02 16:34:15 +09:00
d11n
2042ba37d8
Update What's New (#4713)
Links to https://blog.btcpayserver.org/btcpay-server-1-8-0/ which doesn't exist yet, that's why the linkcheck is expected to fail.
2023-03-01 23:41:27 +09:00
nicolas.dorier
41a4ba62b0
Remove lang popup in checkout v2 2023-03-01 17:10:54 +09:00
nicolas.dorier
21558d25b1
Do not show product information if there are no product information 2023-03-01 16:19:10 +09:00
Nicolas Dorier
06622bfbfd
Translate Checkout v2 (#4710) 2023-03-01 15:49:21 +09:00
d11n
16fd2e3938
Greenfield: Show detailed Lightning routing error (#4722)
The implementations have more detailed messages for LN routing errors, which e.g. allow me to detect self-payemnts in LNbank. We pass those from the LN lib, so if we have it, we should display it to provide a better insight on what's going on when a rout cannot be found.
2023-03-01 15:46:48 +09:00
Umar Bolatov
040d7670ec
Add currency code to payment request list (#4709)
https://github.com/btcpayserver/btcpayserver/discussions/4619
2023-03-01 15:46:13 +09:00
d11n
23761eacc1
Unset X-Frame-Options header correctly (#4721)
* Unset X-Frame-Options header correctly

According to the [spec](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options) there are onlye the `DENY` and `SAMEORIGIN` options, `ALLOW-FROM` being deprecated. Hence we have to actively unset the header, as we made `DENY` the default.

This also unsets the X-Frame-Options header for the public form pages, which fixes #4666.

* Ignore anti forgery token in Forms

---------

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2023-03-01 15:27:18 +09:00
nicolas.dorier
5790bed766
Do not crash sqlite migration if the db is create but without tables 2023-03-01 15:04:32 +09:00
d11n
2f88da67e8
Fix build warnings and indentation (#4720) 2023-03-01 10:32:48 +09:00
Andrew Camilleri
21091cbf1a
show all plugins regardless of version (#4717) 2023-02-28 12:16:33 +01:00
nicolas.dorier
808949a884
Update langs 2023-02-26 21:07:23 +09:00
nicolas.dorier
06334273dc
Fix crashing on unserialize of old data 2023-02-26 11:18:54 +09:00
nicolas.dorier
5399c04dff
Fix crashing on unserialize of old data 2023-02-26 11:05:23 +09:00
d11n
cd051d4093
Update transaction label display (#4700)
* Update transaction label display

* Fix test
2023-02-26 11:01:46 +09:00
Nicolas Dorier
c229425534
Remove JSON in strings from JObjects (#4703) 2023-02-25 23:34:49 +09:00
Andrew Camilleri
e89b1826ce
add invoicemetadata as a tab (#4693)
* add invocie metadata as a tab

* Allow forms to add to posdata too in pos app

* Cleanup view

* Display additional information directly

* Update BTCPayServer/Views/Shared/PosData.cshtml

* Update BTCPayServer/Models/InvoicingModels/InvoiceDetailsModel.cs

---------

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2023-02-25 22:38:28 +09:00
d11n
4ef19e19cc
Checkout v2 fixes (#4705)
* Prevent duplicate titles on invoice view

* Fix text display of escaped values

Fixes #4696.

* Fix payment details re-rendering

Closes #4683. Closes #4684.

* Cleanup
2023-02-25 22:28:02 +09:00
Kukks
ff58301729
do not require docker for plugin restart
we now have a more graceful restart mechanism specifically for plugins and most installs can handle this mechanism
2023-02-24 13:52:46 +01:00
Nicolas Dorier
4ae05272c3
Greenfield: Admins can create/delete API keys of any user (#4680)
* Greenfield: Admins can create/delete API keys of any user

* Greenfield: Improve doc for scoped apikey (Close #4673)

* Fix permissions hierarchy

* Update BTCPayServer.Client/Permissions.cs

* Fix tests

---------

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2023-02-24 16:19:03 +09:00
d11n
d14dafc871
Apply branding to custom forms (#4697) 2023-02-23 14:35:29 +01:00
d11n
d5bd86b07a
POS: Align Keypad centered vertically (#4690) 2023-02-23 10:30:16 +01:00
d11n
66e1eee010
POS improvements (#4668) 2023-02-23 09:52:37 +01:00
Nicolas Dorier
ddb125f458
Fix: HTML injection in payment request/posData/receiptData (Close #4678) (#4679)
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2023-02-22 16:35:34 +01:00
Dennis Reimann
0a437fba6a
Do not show Vue components when there is no JavaScript enabled
Small fix, came across this while testing the noscript checkout version.
2023-02-22 13:34:51 +01:00
Dennis Reimann
13f9eb0d18
Cleanups and unified wording 2023-02-22 11:20:50 +01:00
Dennis Reimann
575b829799
Fix LNURL-Withdraw payments
Fixes comparisons of `long` and `LightMoney`, which did not work, because the `amount` provided was in sats and Lightmoney compares to millisats.

Closes #4663.
2023-02-22 11:18:26 +01:00
nicolas.dorier
02e50fadae
Fix: Crash during migration on some SQLite instances (Close #4623) 2023-02-22 17:07:27 +09:00
nicolas.dorier
a02f191034
Fix: Crash during migration on some SQLite instances (Close #4623) 2023-02-22 16:55:19 +09:00
d11n
d73d0f178f
Checkout: Allow NFC/LNURL-W whenever LNURL is available (#4671)
* Checkout: Allow NFC/LNURL-W whenever LNURL is available

With what we have in master right now, we display NFC only for top-up invoices. With these changes, we display NFC in all cases, where LNURL is available.

Note that this hides LNURL from the list of selectable payment methods, it's only available to use the NFC — and explicitely selectable only for the edge case of top-up invoice + non-unified QR (as before).

Rationale: Now that we got NFC tightly integrated, it doesn't make sense to support the NFC experience only for top-up invoices. With this we bring back LNURL for regular invoices as well, but don't make it selectable and use it only for the NFC functionality.

* Fix LNURL condition

* Improve and test NFC/LNURL display condition

Restores what was fixed in #4660.

* Fix and test Lightning-only case

* Add cache busting for locales
2023-02-22 15:53:14 +09:00
Andrew Camilleri
d542a61f5a
Fix missing walletchanged event and add storeremoved event (#4676) 2023-02-22 13:13:58 +09:00
Andrew Camilleri
e0486aaa24
Label Manager component (#4594)
* Label Manager component

closes #4464

* UI updates

* Test fix

* add test

* fix warnings

* fix select update bug

* add test

* fix test

* Increase payment box max-width

* add labels from address to tx on detection

* Exclude well known label from the dropdown

* Add test on transaction label attachement, tighten UpdateLabels method to only update address labels

---------

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2023-02-22 11:47:02 +09:00
Kukks
c553dc02a9
Greenfield: Expose Payment method criteria 2023-02-21 15:23:51 +01:00
d11n
ff71caa47e
Upgrade Lightning lib (#4674)
To include the fix from btcpayserver/BTCPayServer.Lightning#122
2023-02-21 16:00:10 +09:00
Nicolas Dorier
2bd8227e20
Start using JSONB column instead of app side compressed data (#4574) 2023-02-21 15:06:34 +09:00
d11n
5c61de3ae9
Different icons for notifications (#4632)
* Different icons for notifications

Closes #2510.

* Fix version appendix for SVG use attributes

* Fix SVGUse TagHelper

* Update icons
2023-02-21 11:06:27 +09:00
d11n
cff46f2d59
UI: Remove highlight for valid fields (#4669) 2023-02-20 19:23:09 +01:00
Andrew Camilleri
bbbaacc350
Generic Forms (#4561)
* Custom Forms

* Update BTCPayServer.Data/Migrations/20230125085242_AddForms.cs

* Cleanups

* Explain public form

* Add store branding

* Add form name to POS form

* add tests

* fix migration

* Minor cleanups

* Code improvements

* Add form validation

Closes #4317.

* Adapt form validation for Bootstrap 5

* update logic for forms

* pr changes

* Minor code cleanup

* Remove unused parameters

* Refactor Form data handling to avoid O(n3) issues

* Rename Hidden to Constant

* Pre-populate FormView from the query string params

* Fix test

---------

Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2023-02-20 19:35:54 +09:00
d11n
60f84d5e30
Display "Pay by LNURL" only when appropriate (#4660)
Closes #4657.
2023-02-20 08:49:10 +09:00
d11n
5218aa3c43
Fix missing style tag around embedded CSS (#4659) 2023-02-18 20:38:02 +09:00
nicolas.dorier
4b2ea0c0c3
Fix: Should not crash with command line arg --help 2023-02-16 18:32:26 +09:00
Dennis Reimann
9aff143d40
UI: Fix standalone confirmation modal 2023-02-15 16:17:22 +01:00
Nicolas Dorier
fc14f418cb
Fix: Setting the password of a new created user via API shouldn't be required (Close #4534) (#4647) 2023-02-15 17:11:39 +09:00
Nicolas Dorier
b99253ff47
Revert "Fix: Setting the password of a new created user via API shouldn't be required (Close #4534) (#4645)" (#4646)
This reverts commit 9cb844cbbb.
2023-02-15 16:32:36 +09:00
Nicolas Dorier
9cb844cbbb
Fix: Setting the password of a new created user via API shouldn't be required (Close #4534) (#4645) 2023-02-15 16:32:03 +09:00
nicolas.dorier
5121d64022
Fix: Migrating from SQLite was crashing in some conditions (Close #4623) 2023-02-15 15:59:45 +09:00
nicolas.dorier
8b80910d70
Fix: Unable to Edit amount when cloning paid Payment Request (Close #4639) 2023-02-15 15:33:26 +09:00
nicolas.dorier
a5ff655eed
Fix: If user get locked out, unlocking or deleting user fails
This is due to the fact our UserService is a singleton, and it had a
reference on UserManager which is scoped.

UserManager is caching user entities at the scope level.
UserService then had a view completely unsynchronized with the database.
2023-02-15 14:28:34 +09:00
d11n
cc9c63c33e
Add list count to user preferences cookie (#4637)
I think it's fair to assume that the user wants to set this as a preference and it fixes #4592.
2023-02-15 11:04:17 +09:00
Ikko Eltociear Ashimine
87eef72289
fix typo in vaultbridge.ui.js (#4640)
targetting -> targeting
2023-02-14 19:20:03 +01:00
d11n
8e8ba3d052
Webhook: Add missing model validation (#4636)
Fixes #4628.
2023-02-14 22:37:35 +09:00
Nicolas Dorier
fea27b900c
Harden file type inputs (#4635) 2023-02-14 17:03:12 +09:00
d11n
7ad91a76cd
Checkout v2: FIx automatic redirect after paid (#4633) 2023-02-14 08:56:00 +09:00
nicolas.dorier
350f35b08d
Add code comment 2023-02-13 23:39:55 +09:00
Andrew Camilleri
0d077f6ce5
Fix lnurl for pull paymentdescription + fix authorize redirect form issue (#4630)
fixes #4627
fixes #4624
2023-02-13 23:34:43 +09:00
Nicolas Dorier
dffa6accb0
Fix XSS: Stenghten CSP rules on static file uploads (#4629) 2023-02-13 23:04:15 +09:00
Andrew Camilleri
b5abcd5ae5
Merge pull request #4622 from dennisreimann/domain-mapping 2023-02-13 13:41:34 +01:00
dstrukt
72a9e676c1
Feature Descriptor (#3831) 2023-02-13 09:25:24 +01:00
nicolas.dorier
8c6fe91c71
After successful migration from SQLite or MySql, there is an error after a restart 2023-02-11 21:01:36 +09:00
Dennis Reimann
3c344331af
Improve domain mapping constraint
- Fix potential double assignment to appId, leading to an [exception](https://pastebin.com/j8dhtcTE)
- Add port to redirect, which makes it work in dev env
2023-02-10 18:15:54 +01:00
d11n
d14ce2a37f
POS: Improve Keypad view (#4596)
* UI updates

* Updates modes and calculation

* Unify tip buttons

* White caret

* Add top margin to calculation

* Add space between mode buttons and keypad

* Discount updates
2023-02-10 16:26:38 +01:00
d11n
33d272d4b0
Crowdfund: View updates (#4588)
* Crowdfund: View updates

Improve store branding and remove the card styles, because they had borders which seemed like visual clutter. Other than that I made some changes to the header section and cleaned up the markup and indentation.

* adds column spacing + details header

* Move the Featured Image input

* Center align the Last Updated

* Remove store header, update header section

* Bump description font size

* Improve perk display

* Improve details section

* Fix main image display

---------

Co-authored-by: dstrukt <gfxdsign@gmail.com>
2023-02-10 16:26:09 +01:00
Kukks
9148a1e564
fix #4570 2023-02-10 09:10:10 +01:00
Kukks
4c3f5e1e1a
fix #4618 2023-02-10 08:59:18 +01:00
Nicolas Dorier
1f8bc5b490
Add ability to migrate from MySQL and SQLite with EF (#4614) 2023-02-10 11:43:46 +09:00
d11n
753ffd401b
BIP21 + LNURL fix (#4616)
In case of the unified invoice, the LNURL wasn't correct — with this change we are simply reusing th one that was issued on invoice creation instead of generating it anew on the fly.

Also fixes missing uppercasing for the QR code in case of non-unified QR.
And removes the `lightning:` scheme from the LNURL that's displayed to the user (unifies it with what we do for Onchain and Lightning)
2023-02-10 11:23:48 +09:00
Dennis Reimann
5d03e300fb
LNURL: Add missing CORS
In addition to #4587. Closes #4615.
2023-02-09 17:45:09 +01:00
nicolas.dorier
a20408bed1
Fix crash for installations supporting zcash or monero (#4610) 2023-02-09 09:49:08 +09:00
nicolas.dorier
ed0ccd6f13
Bump lightning lib, fix warnings 2023-02-08 21:29:20 +09:00
nicolas.dorier
bb1138efb5
Catch exception when creating new invoice with GetLNURL 2023-02-08 20:45:05 +09:00
Nicolas Dorier
7bbfc8e6d4
Greenfield: Currency rate should be strings (#4607) 2023-02-08 19:18:37 +09:00
Andrew Camilleri
85513aa5c3
Make NFC built in (#4541)
* Make NFC built int

* support checkout v2

* uninstall old plugin

* fix lnurl in unified checkout

* fix tests

* fix tests

* fix old checkout unified qr

* clean up and make nfc submission more sturdy

* support topup invoices for lnurlw

* fix test

* Payment URI fixes

* Fix LNURL exclusion cases

* UI updates

* Adapt test

---------

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2023-02-08 15:47:38 +09:00
ndeet
67254cc30c
Website is nullable. (#4604) 2023-02-07 12:04:13 +01:00
Umar Bolatov
b055844973
Greenfield get app details (#4102)
* Add Greenfield API endpoints for retrieving app details

* add app items details

* Add GetPosApp and GetCrowdfundApp to LocalBTCPayServerClient

* Simplify POS app data items example

* Document app type enum

* make "RequiresRefundEmail" nullable

* remove "Template" and "PerksTemplate" fields
2023-02-07 17:01:53 +09:00
nicolas.dorier
9ba03848f2
Small perf improvement when fetching exactly 1 payout by id 2023-02-07 16:53:44 +09:00
Andrew Camilleri
5b96ab89fd
Fix Payout Mark Paid in UI (#4585)
fixes #4579
2023-02-07 16:51:20 +09:00
Nicolas Dorier
6a4d8f7404
Fix: Payjoin wasn't always properly choosing utxo for optimal change (#4600)
* Fix: Payjoin wasn't always properly choosing utxo for optimal change

* Update with timeout
2023-02-07 16:43:31 +09:00
Nicolas Dorier
219d03b8dd
Fix: If PoS item code contains a /, LNUrl would not work (fix #4601) (#4602)
This is caused by a weird buggy behavior from ASP.NET Core concerning
path value decoding. (More information on
https://github.com/dotnet/aspnetcore/issues/14170#issuecomment-533342396)

This hasn't been fixed for a while, and the dotnet team keeps reporting
it over and over.
2023-02-06 18:17:17 +09:00
d11n
523654f2eb
Upgrade Lightning lib (#4589)
Includes the updates from btcpayserver/BTCPayServer.Lightning#121.
2023-02-06 13:26:11 +09:00
Dennis Reimann
94f2cd4257
Server Theme: Allow to unset CustomThemeCssUri
It is necessary to have a way to unset the deprecated variable, to get access to the new way of uploading a theme file.
2023-02-04 17:24:19 +01:00
d11n
26248774c2
App domain redirect (#4391)
* Fix duplicates in GetAllApps with allowNoUser

* Use domain mapping as canonical reference and redirect to it

* Revert domain mapping to hostname instead of URL
2023-02-02 20:53:42 +09:00
Nicolas Dorier
f2ced20c42
Fix a bunch of open redirect (#4575) 2023-02-02 09:42:58 +09:00
d11n
e4f256d5cd
Lightning Address: Fix availability check and refactor option view (#4584)
As @petzsch rightfully assumed in #4578, the check took only the last available LN payment method into account, which in this case was LN on LTC. We now pass the crypto code as well and I refactored the checks as well as the option view.

Fixes #4578.
2023-02-02 09:42:41 +09:00
Nicolas Dorier
ca1dac4cc3
Add missing CORS to ln address of BTCPay (Compatibility Beach Wallet) (#4587) 2023-02-02 09:40:31 +09:00
Dennis Reimann
24c19efd52
Crowdfund: Add CSP rules for Disqus
Fixes #4572.
2023-01-31 22:13:45 +01:00
Kukks
a3edd829a6
Add onchain wallet send ui extension 2023-01-31 16:49:41 +01:00
Andrew Camilleri
aad06c583e
Greenfield: Add store rates api (#4550)
* Add store rates api

* Improve doc

---------

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2023-01-31 14:42:25 +09:00
d11n
f821e35cb0
Store branding: Unify public pages (#4568)
Closes #3842.
2023-01-30 09:23:49 +01:00
nicolas.dorier
14313291d5
Make test less flaky by ordering GetApps query 2023-01-30 17:17:35 +09:00
Nicolas Dorier
b818352a04
Register rate providers in DI, so it can be accessed by plugins (#4551) 2023-01-30 09:46:12 +09:00
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
Kukks
b372dc21d6
handle non built in tag attachments better 2023-01-27 15:44:21 +01:00
Nicolas Dorier
3d576cd06b
Fix XSS on uploaded files to the file storage (#4567) 2023-01-26 19:12:06 +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
Dennis Reimann
4df2f1f756
Store Branding: Add custom CSS option 2023-01-24 13:24:17 +01:00
d11n
f10c1c4730
Checkout v2: UI fixes (#4552)
* Checkout v2: UI fixes

* Improve icon border
2023-01-24 21:00:04 +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
Dennis Reimann
b5071237fd
Fix swagger file 2023-01-23 12:11:13 +01: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
Nicolas Dorier
a3203e5775
Fix several HTML injections (#4545) 2023-01-21 19:08:12 +01:00
nicolas.dorier
5f24b41250
Update Changelog, log restarts 2023-01-19 22:10:38 +09:00
d11n
b577c0adb7
Minor UI updates (#4530)
* Minor UI updates

* Lockout page fixes

Fix duplicate headline and model null-check
2023-01-19 18:08:34 +09:00
nicolas.dorier
a9ad0fde9e
After a plugin install or uninstall, restart now just kill the process instead of requiring SSH with docker install 2023-01-19 14:27:33 +09:00
nicolas.dorier
9974b6070e
Fix NRE in plugin list 2023-01-19 14:22:57 +09:00
Kukks
bd5e4f3d94
fix NRE in plugins list 2023-01-18 13:47:15 +01:00
d11n
e0adb1133d
Plugins: Add checkout-noscript-end UI extension point (#4532) 2023-01-18 13:38:58 +01:00
d11n
3cdb4f5b2a
FileService: Null-check stored file before removal (#4535) 2023-01-18 13:38:37 +01:00
nicolas.dorier
248401f534
Plugin assemblies shouldn't be unloadable 2023-01-18 16:46:08 +09:00
Nicolas Dorier
1228a06a90
Improve detection of plugin bricking an install on startup (#4533) 2023-01-18 14:15:27 +09:00
d11n
798553e96a
Greenfield: Add separate permission for viewing LN invoices (#4529)
Based on the diff by @ArttuPakarinen provided in #4523. Closes #4523.
2023-01-16 21:42:54 +09: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
Nicolas Dorier
785cf597ad
Redesign plugin list items (#4528)
* Redesign plugin list items

* Update icon and format code

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2023-01-16 12:12:51 +01:00
nicolas.dorier
ee70fe85c0
Fix loading of plugins in the plugin directory 2023-01-16 16:31:26 +09:00
Nicolas Dorier
2e31816979
Can load external plugins during dev to debug more easily (#4518)
* Can load external plugins during dev to debug more easily

* Add again load plugin by project reference

* Make sure we don't load same plugin twice
2023-01-16 10:37:17 +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
Nicolas Dorier
2428b564fd
Fix: Version numbers in UI appeared with a suffix zero x.x.x.0 instead of x.x.x (#4521) 2023-01-11 18:24:51 +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
bb733c5811
Unify 2FA login boxes (#4506)
* Unify 2FA login boxes

* 2FA setup: Make auth code copyable
2023-01-09 16:38:03 +01:00
Andrew Camilleri
ffeaf55c4e
add extension points for dashboard (#4483) 2023-01-09 14:07:05 +01:00
d11n
313f2a667e
Summernote: Allow Twitter embeds (#4488)
Bitcoin Ekasi is planning a crowdfund and they want to embed their Twitter timeline into the page. This adds the necessary domains to the SUmmernote iframe whitelist.
2023-01-06 22:22:49 +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
3fa28bb46d
Upgrade Lightning lib (#4503) 2023-01-06 22:08:03 +09:00
d11n
eb90fab640
LNURL updates (#4501) 2023-01-05 14:41:18 +01:00
d11n
099d65032a
Checkout: Fix language dropdown cutoff (#4486)
Fixes #4452 — this time for real. See [this comment](https://github.com/btcpayserver/btcpayserver/issues/4452#issuecomment-1366580849).
2023-01-02 12:09:46 +01:00
d11n
e96feb36cd
Sync modal: Adjust to Bootstrap changes (#4485)
Fixes #4484.
2022-12-31 09:24:29 +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
Umar Bolatov
03d7dc8971
Ensure only valid non-negative numbers in tip input (#4481)
close #4478
2022-12-27 20:03:31 +01:00
d11n
627ada56b7
Checkout v2: Minor view improvements (#4473) 2022-12-23 17:04:42 +09:00
nicolas.dorier
9ce06fdc4e
Update lightning libs (Fix #4458) 2022-12-23 17:03:37 +09:00
Chase Mossing
bb63ae6d87
fixes language dropdown cutoff on checkout page (#4465)
* fixes language dropdown cutoff on checkout page

* Use min-height class to fix the tests

Co-authored-by: d11n <mail@dennisreimann.de>
2022-12-22 20:31:08 +01:00
nicolas.dorier
a4182621da
Update persian 2022-12-22 22:30:18 +09:00
Kukks
0534261759
Fix wallet transaction info merging logic and compute color as fallback for labels to not crash 2022-12-22 14:17:23 +01:00