Domains are case-insensitive, so this comparision should be too.
I encountered this issue with a Citadel user who accidentially named their domain an uppercase name (Pay.example.com), but browsers automatically converted it to pay.example.com
* Add grouping feature to the PoS with Cart
* Improve UI
* Rename groups to categories
* Make it easier to select categories of the items
* Refactor TemplateEditor, use TomSelect for categories
* Prevent Vue code insertion
* Prevent empty categories
* Add label ids
* Add test case
---------
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Feedback we got at BTCPrague: Do not show more than five items in the top list, because otherwise the list can get very long if there's a POS with many items.
* Ajaxify the wallet transaction list to avoid timeout (Fix#4987)
* Add cancellation to request to wallet transactions
* Fix tests
* Improve empty state
* Cleanups
---------
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
* Remove Order ID link
* Add separate print version for receipt
* Fix POS number handling and add keypad test
Fixes#5056.
* Add formatting function
* Remove OrderUrl for POS, bring back order link for receipt
* Update BTCPayServer/Plugins/PointOfSale/Controllers/UIPointOfSaleController.cs
* Lightning: Relax GetInfo constraint for LNDhub connections
The LNDhub-compatible implementation by LNbits does not support the `GetInfo` call for all their funding sources — see lnbits/lnbits#1182. By catching that exception in combination with the `LndHubLightningClient`, we give people the ability to still use their LNbits-based LNDhub as a Lightning node.
Fixes#4482.
* Update approach to handling unsupported GetInfo calls
Fixes these two:
```
/source/BTCPayServer/Hosting/MigrationStartupTask.cs(643,49): warning CS0168: The variable 'items' is declared but never used [/source/BTCPayServer/BTCPayServer.csproj]
/source/BTCPayServer/Hosting/MigrationStartupTask.cs(644,24): warning CS0168: The variable 'newTemplate' is declared but never used [/source/BTCPayServer/BTCPayServer.csproj]
```
Items with type topup have a price = null and hence not even the property set (ignored in JSON). This needs to be handled in the temlate, otherwise this exception occurs:
```
An unhandled exception was thrown by the application.
System.InvalidOperationException: Nullable object must have a value.
at AspNetCoreGeneratedDocument.Views_Shared_Crowdfund_Public_ContributeForm.<>c__DisplayClass24_0.<<ExecuteAsync>b__0>d.MoveNext()
```
When apps were set, the `GetAllApps` included the store data, which led to a circular reference when serializing the JSON. That data isn't necessary here, so we can just drop it before rendering.
Fixes#5038.
* Pluginify on chain wallet setup
This PR fixes a few logical points in the wallet setup flow to allow more extensive plugin flexibility; It also fixes an issue when building plugins that requires an Altcoin config profile. Here is an example showcasing the Liquid+ plugin using this to enforce that it is a hot wallet (a requirement it has) and that import to RPC is always set, and a new option that is used to configure the wallet further https://i.imgur.com/pDPQ73v.gif
* Update BTCPayServer/Controllers/UIStoresController.Onchain.cs
* update nbx
* Remove payment requirement for marking expired invoices
Allows to manually mark expired invoices, regardless of registered payments. See dennisreimann/btcpayserver-plugin-lnbank#34 for context, in which BTCPay Server sometimes did not register payments that were received to a LNbank wallet (this got fixed in btcpayserver/BTCPayServer.Lightning#129)
* Refactor conditions for better readability
The `IsOwner` property went missing with #4940, so everyone landed on the invoices list when switching stores. This brings back the original behaviour of linking to the Dashboard, if the user has the permission to access it.
Fixes#5015.
* Add What's New in v1.10.0
* Update BTCPayServer/Views/UIStores/Dashboard.cshtml
Co-authored-by: B <102448109+Bas02@users.noreply.github.com>
---------
Co-authored-by: B <102448109+Bas02@users.noreply.github.com>
* Do not generate new address when a new payment is detected
* Update BTCPayServer.Tests/UnitTest1.cs
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
---------
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
As the request for invoice creation is issued via web socket, the display URL ends up being the hob connection URL. This replaces it with the actual app URL and fixes#4930.
* Show correct array regardless of size
fixes#4890
* Email provided to pos form was not forwarded to form
fixes#4810
* Make invoice receipt url redirect to the invoice redirect url if receipt is not enabled
When setting up a default email rule upon invoice settlement, you would link to the receipt page naturally. However, if using the payment requests, receipts are disabled as the payment request itself is the receipt. This commit makes the receipt url redirect to the invoice redirect url if available, and in the case of payment requests, it would mean the receipt url is the payment request url. fixes#4895
* Set the email address in the form when configured in the payment request
* fix pay request email copy
* fix payouts nav link
fixes#4788
* Update BTCPayServer/Views/UIPaymentRequest/EditPaymentRequest.cshtml
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
---------
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
I came across this while debugging #4889. This does not actually fix it, but it fixes an inconsistence in the casing of the parameter name.
However, I think the original issue is a caching problem in the browser. I was able to reproduce it on first load, after reloading the page once more it works as intended. The weird thing is: even though the values are correct on first load (verified via debugger), the `choiceKey` for the first item is set incorrectly to an integer value.
* Prevent an NRE in LNURL
In addition to f05a7f9f14. Fixes#4904.
* Revert "Prevent an NRE in LNURL"
This reverts commit 0b241d61ab.
* Fix NRE
---------
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
Remove the plugin, which is superseded with the plugin template and move the PluginPacker to the root of th solution (which matches its location in the file system).
* Refactor: Dot not make LNURLPaymentMethodDetails depends on BTCPayInvoiceId
* Abstract PaymentProof
* fix bug
* Make the selenium container resolves the btcpay host name
* Allow LN Address to customize invoice metadata
solves https://github.com/OpenSats/website/issues/8
* Refactor GetLNUrl
* Fix lightningAddresssettings.Max being ignored
* Fix: The payRequest generated by the callback wasn't the same as the original
---------
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* If loading addresses into the send wallet page using bip21 or address, (or clicking on "Send selected payouts" from the payotus page), existing labels will be pre-populated.
* Add the payout label to the address when the payoutis created instead of to the transaction when it is paid.
* Add the label attachments when adding labels from an address to the transaction.
closes#4830
If users want to deal with expired payout destinations, then they should be able to conifugre it that way. Some wallets simply do not allow customizing the bolt11 expiry and the defaults are much less than a day. I think we should merge #3857 if we introduce this as an automated payotu processor for lightning running every few minutes would work together with this and solve it.
* Introduce very flexible form input system
* Refactorings after rebase
* Test fix
* Update BTCPayServer/Forms/FormDataService.cs
---------
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
* Store rule emails in HTML + Test rule emails
* Store rule emails in HTML + Test rule emails
* Update BTCPayServer/Controllers/UIStoresController.Email.cs
Thanks !
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
* change in StoreEmails() to work properly with add commande
* CanSetupEmailServer() : Remove Bosy sendkeys that doesn't work with new HTML control
* Update test for new HTML control
* better command treatment
---------
Co-authored-by: nisaba <infos@nisaba.solutions>
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
* Add labels for recent txs dashboard widget
It is not with the rich data for now, but a good start.
* Turn labels into links
* Add rich info to dashboard labels
* Use truncate-center component for recent transactions
---------
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
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.
* 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>
* 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>
The LocalBTCPayServerClient deserializes the results as arrays (`LightningPaymentData[]` and `LightningInvoiceData[]`) — if they are `IEnumerable` the `GetFromActionResult` does not return the data but null.
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)
* 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>
* 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>
* 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.
* 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>
* 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>
* 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
* 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
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.
* 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>
* 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>
* 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>