* 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>
* 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>
* 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
* Mention the missing API permission in the response header or body
* Fixes + Added a unit test. 1 TODO remains.
* Added MissingPermissionDescription to the error
* Update BTCPayServer.Tests/GreenfieldAPITests.cs
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
* Fix tests
* [GreenField]: Make sure we are sending fully typed errors
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
* Change implementation of the Smtp server
* Update BTCPayServer/Services/Mails/EmailSettings.cs
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
* Update layout structure and header
* Implement store selector
* Simplify homepage
* Update layout
* Use dropdown for store selector
* Hide global nav in store context
* Horizontal section nav
* Remove outer section and container from content views
* Update nav
* Set store context for invoice and payment request lists
* Test fixes
* Persist menu collapse state on client-side
* MainNav as view component
* Update app routes to incorporate store context
* Test fixes
* Display ticker for altcoins build only
* Plugins nav
* Incorporate category for active page as well
* Update invoice icon
* Add apps list to nav
* Add store context to app type controllers
* Incorporate id for active page as well
* Test fixes
* AppsController cleanup
* Nav: Display only apps for the current store
* Remove leftover from merge
* Nav styles optimization
* Left-align content container
* Increase sidebar padding on desktop
* Use min-width for store selector menu
* Store settings nav update
* Update app and payment request routes
* Test fixes
* Refactor MainNav component to use StoresController
* Set store context for invoice actions
* Cleanups
* Remove CurrentStore checks
The response will be "Access denied" in case the CookieAuthorizationHandler cannot resolve the store.
* Remove unnecessary store context setters
* Test fix
* Test improvement exposing failing test
* Test fixes
* Fix test
* update alt compose
* Fix test CanUsePullPaymentsViaUI
* Fix CanChangeUserMail
Co-authored-by: Kukks <evilkukka@gmail.com>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* changes copy to "unarchive", more clear
* adds semibold custom class
* adds class to TH elements & uppercases labels
* whitespace and padding patches
* uppercase patches
* removes class in site.css + updates class name
* Fix test
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
* adds checkbox to pull payment
* adds label improvement
* removes "back to list"
* Remove superfluous style block
Seems to be a copy and paste remainder
* Make custom CSS additional options
* Fix input name and test
* Improve display for case with only one payment method
* Fix test
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
* Prevent creation of on-chain invoices below the dust limit
Fixes#3071.
* Apply suggestions from code review
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
* small fix
* Fix selenium test
0.000000012 BTC (whether rounded or not) is below the dust threshold, causing this test to fail.
* fix CanCreateTopupInvoices test
Don't apply dust threshold conditional for topup invoices.
* Fix test, and minor changes
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
* Wallet settings merge
Merges both wallet settings screen from the wallets and the store section. Closes#2626.
* Improve wallet transactions view
* Remove unnecessary row/col construct
This addresses an obscure issue where `LockSubscription` is unintentionally set to `true`,
which results in a large number of tests failing. h/t to @NicholasDorier for the assist.
* Add more details to lnaddress not found errors, make sure lnaddress is only for BTC
* Update BTCPayServer/LNURL/LNURLController.cs
Co-authored-by: d11n <mail@dennisreimann.de>
* Update BTCPayServer/LNURL/LNURLController.cs
Co-authored-by: d11n <mail@dennisreimann.de>
* Update BTCPayServer/LNURL/LNURLController.cs
Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: d11n <mail@dennisreimann.de>
* Edit and view app name in app settings
Currently the "name" property is not exposed at all in an app's settings/update page, which can result in confusion about which app is being updated, and also a general confusion between the `Title` property and the `Name` property.
This PR gives visibility to the app name in settings, and allows updating of the same.
I also changed the display label for `title` and `name` to make them more distinct and specific.
* Fix tests
* Update AltcoinTests.cs
* Update SeleniumTests.cs
* fix tests
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
* LNURL Payment Method Support
* Merge recent Lightning controller related changes
* Fix build
* Create separate payment settings section for stores
* Improve LNURL configuration
* Prevent duplicate array entries when merging Swagger JSON
* Fix CanSetPaymentMethodLimitsLightning
* Fix CanUsePayjoinViaUI
* Adapt test for new cancel bolt invoice feature
* rebase fixes
* Fixes after rebase
* Test fixes
* Do not turn LNURL on by default, Off-Chain payment criteria should affects both BOLT11 and LNURL, Payment criteria of unset payment method shouldn't be shown
* Send better error if payment method not found
* Revert "Prevent duplicate array entries when merging Swagger JSON"
This reverts commit 5783db9eda.
* Fix LNUrl doc
* Fix some warnings
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Payout Destination Handling
fixes#2765
This PR:
* reactivates the BIP21 support for payouts.
* allows LNUrl destinations to be reusable.
* allows addresses to be reused in claims as long as the other claims are in a final state
* Ensure bolt amount matches the payout amount
* fixes
* reduce duplicate parsing of bolt
* make hash the id of bolt
* better bolt11 tostring
* use cached payment request from lnurl
* Fix default payment bug
This attempts to fix the default payment bug described in #2963.
Update to complete #2986
This takes into account #2986 and @NicolasDorier 's suggestion to add a default payment type as an empty (valueless) option that is selected by default.
* Fix tests
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Greenfield: Provide negative undue when overpaid.
closes#2935
* Invoice's due can be negative, fix Amount field of invoice
* Update swagger.template.invoices.json
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
* Allow User to delete own account
* Add User delete e2e test
* fix test
* Apply suggestions from code review
Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: d11n <mail@dennisreimann.de>
* Patch bootstrap-vue modal close button
For Bootstrap v5 compatibility, which bootstrap-vue does not have currently.
* Crowdfund: Use common global layout head (and themes)
* Crowdfund: Display disabled alert also for simple variant
* Crowdfund: Unify non-JS/simple and JS-enabled view
* Improve fireworks animation
* Improve layout
Inspired by the Bitcoin Smiles compaign, see #2783
* Cleanup and remove views
* Fix typo
* Fix test
* Disallow cancelling payment request when "Allow payee to create invoices in their own denomination" is not enabled
close#2802
* Disallow cancelling pending invoice on BE
* Update non-JS version of payment request view to disallow cancelling
* Update CanCancelPaymentWhenPossible
* Fix typo
* Support taproot for HotWallet
* Support taproot for hardware wallets
* Fix NBX version
* Undo formatting
* Do not show Taproot when not supported
* Create taproot wallet from xpub
* Bug Fix
* Enhanced Files action by modifying it to accept a list of SelectedFileIds
* Added checks to verify all files passed to the files action exist, Updated tests
* Enhanced Files action to accept an array of fileIds
* Removed redundant fileId list
* Fix missing master fingerprint/account key path on wallet import
Re-adds the view model properties that got removed in 8a1d5bbc57 and passes them through the confirm addresses form.
* Add test
This test fails on current master
* wip
* Local GreenField Client for Plugins
* support notification handlers being missing
* Initial support for scoped btcpay client
* test out scoped local client
* wip
* small fix
* Throw exception if using local greenfield client and it has not been implemented yet
* adapt based on new changes in BTCPay
* update
* fix tests
* Allow Local client to bypass authorization handler
* Add Misc endpoints to Local API Client
* Add new endpoints
* Apply code review changes
* Auto-detect language on payment page
based on the requst Accept-Language header, which is the language you configured in your browser/OS and this 99.99% accurate
* Update BTCPayServer/Services/LanguageService.cs
Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
* Update BTCPayServer/Services/LanguageService.cs
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
* Update BTCPayServer/Services/LanguageService.cs
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
* Update BTCPayServer/Services/LanguageService.cs
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
* Added loop for all locales in Accept-Language sorted by weight + check if know this language
* New public method so a unit test can be created for it
* Unit test for language detection
* Fix language service when not in browser context
* fall back to default lang
* Auto-detect setting + ?lang=auto support
* Added invoice param "?lang=auto" info to docs
* Using null-coalescing assignment operator
* Reduce complexity and http dependency in language service
Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
* re-ordering
* adds section header
* updates label on "products"
* changes button to primary
* moves description
* updates partial
* re-ordering + section headers
* more section heads and ordering
* redorders
* Toggle custom amount and tips settings
* Use display name for point of sale app type
* Use switches for enabling options
* Add space before required indicator
* Set and consolidate view model display names
* Move redirects and custom CSS to additional options
* Revert to checkbox for discounts
* adds padding
* removes bs-parent for multiple open elements on accordion
* adds helper text to discount checkbox
* updates "default view" label text
* wording cleanup
* more wording adjustments
* updates
* Add display names for app types
* Extract template editor inline styles
* updates helper text
* Display names for app types
* Typo fix
* Move template back to editor
* Fix selenium test
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
* Refactor and decouple Payout logic
So that we can support lightning + external payout payments
Fixes & refactoring
almost there
final
Remove uneeded payment method checks
Refactor payouts to handle custom payment method specific actions
External onchain payments to approved payouts will now require "confirmation" from the merchant that it was sent by them.
add pill tabs for payout status
* Improve some UX around feature
* add test and some fixes
* Only listen to address tracked source and determine based on wallet get tx call from nbx
* Simplify isInternal for Payout detection
* fix test
* Fix Noreferrer test
* Make EnsureNewLightningInvoiceOnPartialPayment more resilient
* Make notifications section test more resilient in CanUsePullPaymentsViaUI
* Unit test to check for (possibly) external links
* Add rel="noreferrer noopener" to all external links so unit test passes
* Update BTCPayServer.Tests/UnitTest1.cs
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
* Update BTCPayServer.Tests/UnitTest1.cs
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
* Fixed bad merge from master
* PascalCasing
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
* Add payjoin option to hot wallet setup
Enables payjoin by default when creating a hot wallet and offers the user an opt-out.
Test fix
* Display PayJoin option only if it is available
* Test fixes
* Update hot wallet checks
* Test fix after rebase
* Use toggle buttons for enabling options
* Mark Payouts as Paid
This PR allows users to mark payouts as paid manually through the UI and through the API. It also sets up the payout proof system to be able store a manual proof that will in a later PR allow you to specify a proof of payment (link or text)
* add docs, test and greenfield client
* remove extra docs stuff
* Update BTCPayServer.Tests/GreenfieldAPITests.cs
Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
* clean up pull payment/payouts fetch code
* Ensure payoutis are retrieved with pull payment
Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
* Set lightning invoice fallback in QR code as uppercase
On the lightning payment view the invoice is encoded as uppercase inside the QR code; however this is not true for the on-chain payment QR code if the invoice is set as fallback option.
This commit sets the fallback invoice as uppercase inside the QR code.
* Adds test case for uppercase fallback lightning invoice
* Apply suggestions from rockstar's review
Co-authored-by: Kukks <evilkukka@gmail.com>
* Fix: Payout Transaction not matching when rate provided longer decimal precision
fixes#2513 most likely
* Do not sue rounding and ensure crypto amount is saved with correct decimal places
* Round pull payment payout to the nearest digit supported by network
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Migrate existing U2F to Fido2
This seamlessly switches all u2f registrations over to the new FIDO2 support. Please note that I have not yet added a way to drop the u2f DB and its UI so that we can test the migration works properly for all.
* add testing logic
* fix u2f tests
* remove duplicate status message
* fix test and namespaces
* fix test
* customized api/v1/invoices query parameters to filter results
* customized api/v1/invoices query parameters to filter results
* update swagger and make parameters as arrays
* change startDate and endDate types to UnixTimestamp
* update invoice status type in swagger and better handle dateTimeoffset
* change status type to array of InvoiceStatus to match controller
* change status type to array of InvoiceStatus to match controller
Co-authored-by: somera <somera@tesla.com>
* FIDO2/WebAuthN Support
This adds initial support for WebAuthN/FIDO2 as another MFA mode. U2F is still intact and runs alongside it for now. Once this is merged, I will start work on migrating U2F support to happen over the FIDO2 protocol instead.
* Refactor and future proof system (prep work of seamless u2f migration)
* attempt js fix for mobile devices
* Apply suggestions from code review
Co-authored-by: d11n <mail@dennisreimann.de>
* fix fido name saving
* do not spam logs and hide loader when failed
* PR Changes
* Apply suggestions from code review
Co-authored-by: d11n <mail@dennisreimann.de>
* attempt fido2 bump
* add name if not named for credentials
Co-authored-by: d11n <mail@dennisreimann.de>
* TorServices Refactor to make value passing easier
* Allow specifying Tor services through config
Format:
BTCPAY_TORSERVICES: "BTCPAYSERVER:URL.ONION:VIRTUALPORT;BTC-P2P:URL.ONION:VIRTUALPORT;BTC-RPC:URL.ONION:VIRTUALPORT;SOMEOTHERONIONSERVICE:URL.ONION:VIRTUALPORT"
* add tests
* Optimize Tor Services loader and ensure it is loaded as a hosted service
* Remove Task from Tor service loader
* Use options to parse Tor services
* Fix booboo
* Fix test after fixing booboo
* Adding timeout on long running CanEnumeratetorServices test
(cherry picked from commit 274b77e3175960158b803410037e2c7ff31984be)
* Renaming timeout variable to better name
* Only allow one of torrcfile or torservices
Co-authored-by: Kukks <evilkukka@gmail.com>
Co-authored-by: rockstardev <rockstardev@users.noreply.github.com>
* Separate coinswitch as a system plugin
* Decouple Coinswitch from Checkout UI
* remove dummy csproj
* Remove CoinSwitchTests.cs per @NicolasDorier feedback
Co-authored-by: rockstardev <rockstardev@users.noreply.github.com>
* Refactor and decouple Payout logic
So that we can support lightning and more complex flows like allowing external payments to payouts.
* fix dropdown align
* switch to simpler buttons
* rebase fixes
add some comments
* rebase fixes
add some comments
* simplify enum caveman logic
* reduce code duplication and db round trips
* Fix pull payment date format
* fix issue with payouts to send page not working correctly
* try fix some style issue
* fix bip21parse
* Improve and unify page headers
* Altcoin test fixes
* Update BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
* Update BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
* Fix missing store name in pairing view
* Fix CanUsePairing test
* Bump header navigation font size
* Use partial tag instead of Html.PartialAsync in views
As suggested by @nicolasdorier. These are equivalent, see details [here](https://docs.microsoft.com/en-us/aspnet/core/mvc/views/partial?view=aspnetcore-3.1#partial-tag-helper).
* Fix docs link
As in #2432.
* Update BTCPayServer/Views/Wallets/SignWithSeed.cshtml
Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
* Update BTCPayServer/Views/Wallets/WalletSendVault.cshtml
Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
* Update BTCPayServer/Views/Wallets/WalletTransactions.cshtml
Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
* Make Invoice Create Faster And Fix Gap Limit Issue
This make address reserve only when user "activate" paymet method in ui. optional setting in store checkout ui.
* Fix swagger documentation around Lazy payment methods
* fix changed code signature
* Add missing GreenField API for activate feature
* Fix checkout experience styling for activate feature
* Fix issue with Checkout activate button
* Make lightning also work with activation
* Make sure PreparePaymentModel is still called on payment handlers even when unactivated
* Make payment link return empty if not activated
* Add activate payment method method to client and add test
* remove debugger
* add e2e test
* Rearranging lazy payments position in UI to be near dependent Unified QR code
* fix rebase conflicts
* Make lazy payment method mode activate on UI load.
Co-authored-by: Kukks <evilkukka@gmail.com>
Co-authored-by: rockstardev <rockstardev@users.noreply.github.com>
Co-authored-by: Andrew Camilleri <kukks@btcpayserver.org>
* GreenField: Wallet API
* more work
* wip
* rough fiunish of transaction sending api
* Allow to create tx without broadcasting and small fixes
* Refactor Wallet Receive feature ad add greenfield api for address reserve for wallet
* add wallet api client
* add docs
* fix json converter tags
* fixes and add wallet tests
* fix tests
* fix rebase
* fixes
* just pass the tests already
* ugggh
* small cleanup
* revert int support in numeric string converter and make block id as native number in json
* fix LN endpoint
* try fix flaky test
* Revert "try fix flaky test"
This reverts commit 2e0d256325.
* try fix other flaky test
* return proepr error if fee rate could not be fetched
* try fix test again
* reduce fee related logic for wallet api
* try reduce code changes for pr scope
* change auth logic for initial release of wallet api
* Reenabling uppercase BECH32 in QR codes
* Fixing the test now that we're uppercasing BECH32 address
* Implementing Nicolas' feedback
Co-authored-by: rockstardev <rockstardev@users.noreply.github.com>
* Refactor how we handle and validate LN ConnectionStrings
* Migrate existing connection string to Internal Node if they are the same. Cleanup some obsolete fields
* Fix typos, remove duplicated method
* Add a InternalNodeRef to LightningSupportedPaymentMethod
* GreenField API: Configure Store Lightning Payment Method
* Remove internal ln node endpoint and use Auth service to check internal node usage
* fix test
* Fix missing hot wallet option on seed import
Thanks @kukks for spotting!
* Tests: Wait for button to be ready for interaction
* Camelcase test selectors
* Tests: Remove general ImplicitWait
* Tests: Add WaitForAndClick helper
* Tests: Refactor SetCheckbox
* Tests: Add WaitForElement helper
* Tests: Refactor and use wait.UntilJsIsReady helper
* Fix missing helper in ethereum tests
* Tests: Some more refactorings
* Prepare existing layouts and views
* Add icon view component and sprite svg
* Add wallet setup basics
* Add import method view basics
* Use external sprite file instead of inline svg
* Refactor hardware wallet setup flow
* Manually enter an xpub
* Prepare other views
* Update views and models
* Finalize wallet setup flow
* Updat tests, part 1
* Update tests, part 2
* Vaul: Fix missing retry button
* Add better Scan QR subtext
Still tbd.
* Make wallet account an advanced setting
* Prevent empty xpub
* Use textarea for seed input
* Remove redundant error message for missing file upload
* Confirm store updates after generating a new wallet
* Update wording
* Modify existing wallets
* Fix proposed method name
* Suggest using ColdCard Electrum export option only
Advise the user to use the electrum export of the coldcard instead of saying either electrum or wasabi export file … the electurm one contains more info, e.g. the wasabi one doesn't include the account key path.
* More concise WalletSetupMethod setting
* Test fix
* Update wallet removal code
* Fix back navigation quirk in change wallet case
* Fix behaviour on wallet enable/disable
* Fix initial wallet setup
* Improve modify view and messages
* Test fixes
* Seed import fix
Uses the correct form url for confirming addresses
* Quickfixes from design meeting
* Add enable toggle switch on modify page
* Confirm wallet removal
* Update setup view
* Update import view
* Icon finetuning
* Improve import options page
* Refactor QR code scanner
Allow for usage with and without modal
* Update copy and instructions on import pages
* Split generate options: Hot wallet and watch-only
* Implement hot wallet options correctly
* Minor test changes
* Navbar improvements
* Fix tables
* Fix badge color
* Routing related updates
Thanks @kukks for the suggestions!
* Wording updates
Thanks @kukks for the suggestions!
* Extend address types table for xpub import
Thanks @kukks for the suggestions!
* Rename controller
* Unify precondition checks
* Improve removal warning for hot wallets
* Add tooltip on why seed import is not recommended
* Add tooltip icon
* Add Specter import info