* Greenfield: Refactor app endpoints
- Do not change unset data
- Clean up difference between request (template) and data (items/perks)
- Add missing properties (form id and custom tip percentage)
- Update docs
* Revert ToSettings changes in GreenfieldAppsController
* User: Add name and image URL
More personalization options, prerequisite for btcpayserver/app#3.
Additionally:
- Remove ambigious and read-only username from manage view.
- Improve email verification conditions and display.
- Greenfield: Update current user. Prerequisite for btcpayserver/app#13.
* Refactor UpdateCurrentUser
* Replace new columns by UserBlob
* Update email check and add test case for mailbox addresses
---------
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Allow overrides on all methods
* Add non-returning SendHttpRequest methods
* Use SendHttpRequest consistently
* Use file-scoped namespace
* Rates: Set default null value for currencyPair
* Ensure it works with instances which have BTCPAY_ROOTPATH set
* UI: Move section navigation to sidebar
* Scroll active nav link into view
* Move CTAs to top right
* Server Settings: Make Policies first page
* Responsive table fixes
* Spacing fixes
* Add breadcrumb samples
* store settings fixes
* payment request fixes
* updates pull payment title
* adds invoice detail fix
* updates server settings breadcrumbs + copy fix
* Don't open Server Settings on Plugins page
* Add breadcrumbs to pull payment views
* adds breadcrumbs to account
* server and store breadcrumb fixes
* fixes access tokens
* Fix payment processor breadcrumbs
* fixes webhook 404
* Final touches
* Fix test
* Add breadcrumb for email rules page
* Design system updates
---------
Co-authored-by: dstrukt <gfxdsign@gmail.com>
* Search: Display text filters in search input
This changes the search text input to also display the filters, which don't have a special UI (e.g. dropdown). Those filters (e.g. orderid) were not displayed before and hence could not be reset.
Fixes#5984.
* Add and fix test
Adjust the LNURL settings so that minimum price items aren't capped and can be overpaid.
Also fixes the missing LNURL response for free items to return a proper LNURL error instead of just 404.
Fixes#5995.
* Design system updates
* Icon fix
* Add new icons, replace show/hide
* Icon replacements
* Test fix
* Icon replacements in Vault
* More icon replacements
* Final icon replacements, remove Font Awesome
* allow admin update default rate provider and default currency for stores
* Updated PR on allowing server admin to update currency
* update server settings to select default currency
* revert standard default currency
* clean up
* Minor rewording
---------
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Remove deprecated CSS options
Closes#5945.
* Greenfield: Add brandColor to store APIs
Closes#5946.
* Migrate file IDs to URLs
Closes#5953.
* Greenfield: Add CSS and logo URL to store settings API
Closes#5945.
* Add migration test
* Store and Server branding can reference file's via fileid:ID
* Add PaymentSoundUrl to Store API
---------
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
- Unify single/multiple inputs display
- Destination: Move labels above amount
- Coin Selection: Add sorting by amount and confirmations, add page size. Closes#5850
- Move PSBT and BIP21 buttons up to input related button group
- Turn checkboxes in Advanced Settings into toggles
- Improve spacings and button groups
* Support pluginable rate providers
This PR allows plugins to provide custom rate providers, that can be contextual to a store. For example, if you use the upcoming fiat offramp plugin, or the Blink plugin, you'll probably want to configure the fetch the rates from them since they are determining the actual fiat rrate to you. However, they require API keys. This PR enables these scenarios, even much more advanced ones, but for example:
* Install fiat offramp plugin
* Configure it
* You can now use the fiat offramp rate provider (no additional config steps beyond selecting the rate source from the select, or maybe the plugin would automatically set it for you once configured)
* Apply suggestions from code review
* Simplify
* Do not use BackgroundFetcherRateProvider for contextual rate prov
---------
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Guard against running current master
With a longer release cycle for v2, we need to guard people from running master and corrupting their data. This adds a new requirement in that a special config must be set when running master. We will remove when v2 rc is ready.
* add envs
* Show Lightning node availability in navigation
Instead of simply communicating the setup state of the store's LN node, this now also checks its availability.
Closes #5940.
* Cleanups
* Add Selenium test for public node page and status in nav
* Cache the available lightning node result
---------
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
Once more an improvement for the receipt, which also fixes#5882:
- Unify data displayed on the web and print version
- Split cart and additional data and ensure additional data is displayed
- Do not display extra subtotal row if there are no tips or discounts
- Make PosData partial more universal and backwards-compatible by using case insensitive key lookups
Fixes#5917, which is a regression introduced in #5776. The Tor-check must happen to prevent redirecting, but we must still return true if we already resolved an `appId`.
* Adding Tether as BTCPay Server Foundation Supporter
* Adding Tether to _BTCPaySupporters partial as well
* Modfying supporter_strike.svg to have white backgroundf or dark mode
* Modifying supporter_tether.svg to fit in the 150x100 box
* Centering Tether shape
* Specify mailto: prefix for emails in Server Settings
* resolve test failure
* Update wording
* Apply mailto-prefix on setting change
---------
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
* Onboarding: Invite new users
- Separates the user self-registration and invite cases
- Adds invitation email for users created by the admin
- Adds invitation tokens to verify user was invited
- Adds handler action for invite links
- Refactors `UserEventHostedService`
- Fixes#5726.
* Add permissioned form tag helper
* Better way of changing a user's role
* Test fixes
* Providing additional parameter for info message
* Refactoring code to remove parameter and only set status message in LoadFromBIP21 if not present
* Update BTCPayServer/Controllers/UIWalletsController.cs
---------
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
* Add admin option to show item list for keypad view
* Refactor common POS Vue mixin
* Add item list to POS keypad
* Add recent transactions to cart
* Keypad: Pass tip and discount as cart does
* Keypad and cart tests
* Improve offcanvas button
---------
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
* If pull payment opened in mobile, use deeplink to setup card
* Allow passing LNURLW to register boltcard
* debug
* debug
* debug
* Only show setup/reset when the page is fully loaded
* Apply suggestions from code review
---------
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
* (bug) treat xmr wallet directory as required
The wallet directory configuration setting is required
because the `UIMoneroLikeStoreController`'s
`GetMoneroLikePaymentMethodViewModel` method checks if the wallet file
exists, and to do that in needs the directory.
* (feat) xmr settlement thresholds
Adds the ability to select zero, 1, 10, or a custom number of
confirmations as the payment settlement threshold.
* (review) fix validation message not showing
---------
Co-authored-by: Henry Hollingworth <henry.hollingworth@alcoa.com>
* PoS app to show POS view for easy setup
* update selenium test
* Updates
* Add QR code icon
---------
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
* Apps: Make app name the default title
Successor of #5762 with a way simpler approach. Allows the user-facing title to be set, but defaults it to the app name instead of "Tea shop".
* Test fixes
As discussed on #5718, there is no need for the store logo to be provided in square dimension. As it populates its own row on the public page layouts, we can remove that restriction and make it adaptable by providing only maximum height and width.
* Server Users: More precise message when inviting users
This lets the admin who invited a new user know whether or not an email has been sent. If the SMTP server hasn't been set up, they need to share the invite link with the user.
* Onboarding: Invite new users
- Separates the user self-registration and invite cases
- Adds invitation email for users created by the admin
- Adds invitation tokens to verify user was invited
- Adds handler action for invite links
- Refactors `UserEventHostedService`
* Remove duplicate status message from views that use the wizard layout
* Auto-approve users created by an admin
* Notify admins via email if a new account requires approval
* Update wording
* Fix update user error
* Fix redirect to email confirmation in invite action
* Fix precondition checks after signup
* Improve admin notification
Send notification only if the user does not require email confirmation or when they confirmed their email address. Rationale: We want to inform admins only about qualified users and not annoy them with bot registrations.
* Allow approval alongside resending confirm email
* Use user email in log messages instead of ID
* Prevent unnecessary notification after email confirmation
* Use ApplicationUser type explicitly
* Fix after rebase
* Refactoring: Do not subclass UserRegisteredEvent
* Reposition the camera scan icon in the wallet > send functionality
* refactored changes
* Minor adjustments
---------
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
* UI: Deprecate the custom CSS options
As discussed with @pavlenex we are deprecating the custom CSS options for particular entities (payemnt request, pull payment, POS, crowdfund) in favor of the store branding approach.
This displays the custom CSS section only if these values are set already.
* Add IDs to html element
This will allow styling of individual entities.
* Admin overview of the stores on the instance
POC/Draft for #5674.
* Enable admin to access foreign stores
* Remove stores list link
* UI updates
* Grant admins guest access to foreign stores
* Optimize cookie auth handler
* Test fix
* Revert changes related to StoreRepository.FindStore with isAdmin
* webhook tests
* fixes and add docs
* Do not update FormResponse and StoreId in update/create PullPayment
---------
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Server Settings: Customize instance name and add contact URL
- The custom instance name would improve #5563
- Added contact URL closes#4806
* Fix custom logo display
* Crowfund : Add Buyer information / Additional information(forms) like POS
* PR 5659 - changes
* Cleanups
* fix perk
* Crowdfund form tests
* Add Selenium test for Crowfund
* Selenium update
* update Selenium
* selenium update
* update selenium
* Test fixes and view improvements
* Cleanups
* do not use hacky form element for form detection
---------
Co-authored-by: nisaba <infos@nisaba.solutions>
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: Kukks <evilkukka@gmail.com>
Closes#5773.
- Adds seconds to the displayed date and time
- Adds a tooltip that displays the full date and time including milliseconds
- Reintroduced the colored text in case of unusual events/states (this didn't work before)
* Clarifying that only onchain funds will be restored to the wallet
Off chain recovery would need to be done with channel.backup file which is not part of this process
* Adding powershell version of lncli invoker
* Bumping LND to 0.17.4-beta-rc1
* Bumping LND to 0.17.4-beta
* Users list: Cleanups
* Policies: Flip registration settings
* Policies: Add RequireUserApproval setting
* Add approval to user
* Require approval on login and for API key
* API handling
* AccountController cleanups
* Test fix
* Apply suggestions from code review
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
* Add missing imports
* Communicate login requirements to user on account creation
* Add login requirements to basic auth handler
* Cleanups and test fix
* Encapsulate approval logic in user service and log approval changes
* Send follow up "Account approved" email
Closes#5656.
* Add notification for admins
* Fix creating a user via the admin view
* Update list: Unify flags into status column, add approve action
* Adjust "Resend email" wording
* Incorporate feedback from code review
* Remove duplicate test server policy reset
---------
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
* Store Email Settings: Improve configuration
This works with the existing settings and provides better guidance about the different store email cases. Closes#5623.
* Split email and notification settings
Fixes#5698. Before this, the app lookup was constrained by the user having at least `CanModifyStoreSettings` permissions. This changes it to require the user being associated with a store, leaving the fine-grained authorization checks up to the individual actions.
This ensures that guests land on the invoices list, which tehy are allowed to see — rather than the dashboard, which they don't have permissions for.
Fixes#5688.
When testing the webhook for payment requests, we were incorrectly creating a payout webhook instead of a payment request. This would cause an error (but nothing fatal as it is only a test webhook(
* Fix: Plugin updates do not work
* Offer install on disabled plugins when different version
This will:
* Clear any previous pending actions of a plugin if you click uninstall
* Show the plugin version that was disabled
* Show an update button on disabled plugins instead of install
* if a plugin is scheduled to be installed/updated, it will show which version was scheduled to be updated. If a newer version if available than the scheduled one, it will show an option to switch to that
* Ensure disabled plugins don't get loaded
* View fixes
---------
Co-authored-by: d11n <mail@dennisreimann.de>
* Refactor fee provider
The fee provider ended up glued with a hardcoded factory. This PR:
* removes this glue and uses the DI to register fee provider for a network. (allows plugins to add their own fee providers, for any network
* Add a 10 second timeout to mempoolspace fee fetching as they are slow at times
* use linear interpolation for mempool space fee estimation
* fix upper bound
* Add tests, rollback pluginify FeeProvider
---------
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Refactor Wallet import code
The code for wallet import was incredibly messy as it evolved over time from various requests.
This PR:
* splits up each supported format into its own file
* Supports taproot descriptors (through a hack until NBitcoin supports it internally) fixes#5518
* Reduces different paths for handling electrum/non-electrum xpubs
* Allows plugins to add their own import support formats for onchain wallets.
* Update NBitcoin to parse tr descriptors
* Fix warnings
* Use dedicated type OnChainWalletParsers
---------
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
When a POS has a form, which results in an error state, the store branding property was not set. This adds the missing property and also does not render the store branding partial, in case the model property isn't present.
Fixes#5655.
* Checkout v2: Clicking QR code copies full payment URI
Before it copied only the destination value (Bitcoin address or Lightning BOLT11). This didn't include the BOLT11 in case of the unified QR code. Now it will copy the full payment URI, which is the same as the QR represents:
- Unified: `bitcoin:ADDRESS?amount=AMOUNT&lightning=BOLT11`
- Bitcoin: `bitcoin:ADDRESS?amount=AMOUNT`
- Lightning: `lightning:BOLT11`
Fixes#5625.
* Test fix
* Prevent payment request to be created when a wallet is not set up
* Created an extension method for store wallet checks
* fix for invoice and payment request selenium test
* refactoring payment request controller
* removing unused variable
* Unify behaviour across controllers
---------
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
* Propose linking Greenfield API information within the Legacy API view
* Propose linking Greenfield API information within the Legacy API view
* moved Greenfield API section up
* moved Greenfield API section up
* Fix link
* Wording
* Adjust button alignment
---------
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
* Make tips and discount properties disabled in POS setting
* Update discount and tips boolean properties in model and swagger json
* update pos tests to cater for default tip and discount state
* Remove custom IDs and unify tests
---------
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
There are apps, which do not have a template and hence no inventory. Accessing it via `settings[templatePath]!.Value` causes exceptions in those cases.
When a plugin is disabled, we should at least show the uninstall option in the plugin option. Eventually we should also detect what version was disabled and offer an update instead
Allows to specify the text alignment in the description container via the richt text editor. Before it was center aligned, no matter what one did in the editor.
This is feedback we got in yesterdays call with Start9.
* Store Branding: Refactoring and logo as favicon
- Encapsulates store branding properties into their own view model
- Uses the logo as favicon on public pages
* Refactorings
* Updates
Cam across this while browsing the API docs: The checkout type setting isn't used for the POS, so we should simply remove it as this is configured on the store-level.