Commit Graph

6834 Commits

Author SHA1 Message Date
nicolas.dorier
31b25ca169
Propagate the ModelState errors on dynamic forms 2022-11-25 18:32:40 +09:00
Umar Bolatov
a6ee92fbd5
Update incorrect "monitoringTime" field for invoice API docs (#4348) 2022-11-25 09:12:55 +01:00
nicolas.dorier
5ff1a59a99
Make sure the form is properly validated 2022-11-25 16:11:13 +09:00
nicolas.dorier
4f65eb4d65
Remove dead code, fix dups form value 2022-11-25 15:14:54 +09:00
Nicolas Dorier
39328c7368
Rename walletobjects Parent/Child to A/B (#4347) 2022-11-25 12:06:57 +09:00
Andrew Camilleri
2f5f3e1b51
Do not enable receipts for payment requests (#4342)
Payment requests have a receipt-ish style by default. Receipts for each individual invoice of a payment request can be quite confusing as individually they do not prove the pay request was settled.
2022-11-25 11:04:34 +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
bf0a8c1e62
Fix flaky test ln payout (#4334) 2022-11-23 21:02:47 +09:00
nicolas.dorier
d2b10ef4e6
CanUseTorClient fail no more 2022-11-22 21:58:15 +09:00
Nicolas Dorier
9f3fca8fd7
Show the git commit of the current build of BTCPay (#4320)
* Show the git commit of the current build of BTCPay

* Fix build

Co-authored-by: d11n <mail@dennisreimann.de>
2022-11-22 21:37:07 +09:00
Nicolas Dorier
9404819dbe
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>
2022-11-22 12:17:29 +01:00
Nicolas Dorier
d959f5096b
Add documentation link to plugins (#4329)
* Add documentation link to plugins

* Minor UI updates

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-11-22 11:06:23 +01:00
Andrew Camilleri
bd3710a60f
Merge pull request #4327 from btcpayserver/dennisreimann-patch-1 2022-11-22 06:58:10 +01:00
Andreas Tasch
3d43f3a2b3
Change confirmed to settled. (#4328) 2022-11-22 11:10:21 +09:00
d11n
6194c156bd
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.
2022-11-22 10:27:27 +09:00
d11n
850c26dc13
POS: Fix null pointer
Introduced in #4307, the referenced object needs to be `itemChoice` instead of `choice`.
2022-11-21 22:07:46 +01:00
Kukks
eda0f7327e
fix monero issue 2022-11-21 19:55:19 +01:00
Nicolas Dorier
bf597495ff
Fix: If reverse proxy wasn't well configured, and error message should have been displayed (#4322) 2022-11-21 19:32:19 +01:00
Nicolas Dorier
20025f254c
Use the plugin builder website instead of docker to fetch plugins (#4285) 2022-11-21 10:23:25 +09:00
JesterHodl
ec76acd3a6
Code analysis (#4293)
* Enable NETAnalyzers for whole project

- remove obsolete analyzers so that the .NET Core SDK NETAnalyzers can be used
- enable NETAnalyzers for all projects so that developers can use them by defining the AnalysisMode on individual projects

This is because if we set AnalysisMode to minimal, recommended or all it would spam with warning.
The idea is to be able to turn them on during development to fix recommended stuff without polluting the build output.

Following commits will implement some of the Code Analysis findings

* Performance hints for using char overloads for single characters (CA1834 and CA1847)

CA1834: Use StringBuilder.Append(char) for single character strings
CA1847: Use string.Contains(char) instead of string.Contains(string) with single characters
2022-11-20 17:42:36 +09:00
Nicolas Dorier
1e2acfb296
Disable internal node options if no internal node configured (#4315) 2022-11-20 14:22:36 +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
d11n
d2f071b8b2
Make store creation field same width (#4311)
* Make store creation field same width

Closes #4306.

* Update CreateStore.cshtml
2022-11-19 11:29:34 +01:00
Pavlenex
fdbd7b977a
Merge pull request #4312 from btcpayserver/non-admin-wallet-warning
Refine non-admin wallet warning copy
2022-11-19 09:44:22 +01:00
d11n
d19961b7a0
Refine non-admin wallet warning copy
As [discussed on Mattermost](https://chat.btcpayserver.org/btcpayserver/pl/us4kscqsw7rzmnng7aarxczd5r).
2022-11-18 22:12:53 +01:00
Kukks
c156254600 Validate cart cost with explicit amount 2022-11-18 16:50:26 +01:00
Nicolas Dorier
9b5c6ece90
Refactor walletobj API, make wallet object graph directionless (#4297) 2022-11-19 00:04:46 +09:00
maxwedwards
bf91efc756
Add Lightning Service Torq (#4296) 2022-11-18 12:19:01 +01:00
nicolas.dorier
a253fd5001
Small doc improve 2022-11-18 14:22:59 +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
d11n
3942463ac9
UI: Unify payment request list with invoices (#4294)
Some quick win updates to the payment requests list that unify the display with the invoices list:

- Status is displayed as badge
- Amount is properly formatted
- Expiry date format and ability to switch to relative date
2022-11-18 13:24:57 +09:00
nicolas.dorier
ff572eef7f
Use constants rather than magic strings in transaction attachments 2022-11-17 10:24:49 +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
d11n
324112b73b
Receipts: Fix amount paid discrepancy (#4287)
Displays the actual amount paid instead of the total invoice price. Fixes #4242.
2022-11-16 11:35:49 +09:00
Andrew Camilleri
1d7dee8314
Fix NRE and do nto activate onchain if node unavailable even when lazy payments (#4291)
fixes #4289
2022-11-16 09:04:51 +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
d11n
17f3b4125b
Add option to customize the instance logo (#4258)
* Add option to customize the instance logo


Custom logo for BTCPay instances

* Incorporate SVGUse helper
2022-11-14 22:29:23 +09:00
nicolas.dorier
c8a1024e24
Remove dead shitcoin MUE 2022-11-14 15:59:41 +09:00
d11n
9a2d2e2d89
Confirm modal: Prevent form submit without confirmation (#4262)
Fixes https://github.com/btcpayserver/btcpayserver/issues/4259
2022-11-13 12:38:13 +01: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
Nicolas Dorier
a374e351e2
Use PluginLoader in the Plugin packer to prevent conflicts (#4277) 2022-11-09 15:28:16 +01:00
d11n
562f88555c
Lightning: Better handling for non-public nodes (#4263)
Fixes #4246. 

`LightningLikePaymentHandler.GetNodeInfo` needed the `throws` argument to handle the cases as previously, otherwise the catch case in `ShowLightningNodeInfo` never occured.

State with this PR: A node can be available, but not have any public addresses. The latter will now be reported when testing the connection and on the public node info page.
2022-11-05 12:21:24 +01:00
Pavlenex
167c5297fa
Merge pull request #4268 from dennisreimann/supporters
Supporters: Remove Nomics; add SVGs for README
2022-11-05 12:17:11 +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
Dennis Reimann
853a0ac5ea
Remove old/unused images 2022-11-03 21:58:53 +01:00
Dennis Reimann
ea948cfc3f
Optimize SVGs 2022-11-03 21:55:11 +01:00
Pavlenex
fdd13390fb
Merge pull request #4267 from dennisreimann/fix-4266
Fix wording
2022-11-03 19:57:34 +01:00