* Fix labels not showing multiple payouts payments
* Improve label tooltip
Makes it more readable
* Cleanup code
* Fix overflowing text in order ID field in invoices table (#3765)
close#3714
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
Co-authored-by: Umar Bolatov <bolatovumar@gmail.com>
* Wallet transactions export
The exported data needs some more work.
* Fix transactions export policy
* Add test cases
* Fix Selenium warnings
* Finalize export format
* Test export download
* Remove CSV download check
* Try to fix test
* WIP New APIs for dealing with custodians/exchanges
* Simplified things
* More API refinements + index.html file for quick viewing
* Finishing touches on spec
* Switched cryptoCode to paymentMethod as this allows us to differentiate between onchain and lightning
* Moved draft API docs to "/docs-draft"
* WIP baby steps
* Added DB migration for CustodianAccountData
* Rough but working POST /v1/api/custodian-account + GET /v1/api/custodian
* WIP + early Kraken API client
* Moved service registration to proper location
* Working create + list custodian accounts + permissions + WIP Kraken client
* Kraken API Balances call is working
* Added asset balances to response
* List Custodian Accounts call does not load assetBalances by default, because it can fail. Can be requested when needed.
* Call to get the details of 1 specific custodian account
* Added permissions to swagger
* Added "tradableAssetPairs" to Kraken custodian response + cache the tradable pairs in memory for 24 hours
* Removed unused file
* WIP + Moved files to better locations
* Updated docs
* Working API endpoint to get info on a trade (same response as creating a new trade)
* Working API endpoints for Deposit + Trade + untested Withdraw
* Delete custodian account
* Trading works, better error handling, cleanup
* Working withdrawals + New endpoint for getting bid/ask prices
* Completed withdrawals + new endpoint for getting info on a past withdrawal to simplify testing, Enums are output as strings,
* Better error handling when withdrawing to a wrong destination
* WithdrawalAddressName in config is now a string per currency (dictionary)
* Added TODOs
* Only show the custodian account "config" to users who are allowed
* Added the new permissions to the API Keys UI
* Renamed KrakenClient to KrakenExchange
* WIP Kraken Config Form
* Removed files for UI again, will make separate PR later
* Fixed docs + Refactored to use PaymentMethod more + Added "name" to custodian account + Using cancelationToken everywhere
* Updated withdrawal info docs
* First unit test
* Complete tests for /api/v1/custodians and /api/v1/custodian-accounts endpoints + Various improvements and fixes
* Mock custodian and more exceptions
* Many more tests + cleanup, moved files to better locations
* More tests
* WIP more tests
* Greenfield API tests complete
* Added missing "Name" column
* Cleanup, TODOs and beginning of Kraken Tests
* Added Kraken tests using public endpoints + handling of "SATS" currency
* Added 1st mocked Kraken API call: GetAssetBalancesAsync
* Added assert for bad config
* Mocked more Kraken API responses + added CreationDate to withdrawal response
* pr review club changes
* Make Kraken Custodian a plugin
* Re-added User-Agent header as it is required
* Fixed bug in market trade on Kraken using a percentage as qty
* A short delay so Kraken has the time to execute the market order and we don't fetch the details too quickly.
* Merged the draft swagger into the main swagger since it didn't work anymore
* Fixed API permissions test
* Removed 2 TODOs
* Fixed unit test
* Remove Kraken Api as it should be separate opt-in plugin
* Flatten namespace hierarchy and use InnerExeption instead of OriginalException
* Remove useless line
* Make sure account is from a specific store
* Proper error if custodian code not found
* Remove various warnings
* Remove various warnings
* Handle CustodianApiException through an exception filter
* Store custodian-account blob directly
* Remove duplications, transform methods into property
* Improve docs tags
* Make sure the custodianCode saved is canonical
* Fix test
Co-authored-by: Wouter Samaey <wouter.samaey@storefront.be>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Allow Users to be disabled/enabled
* rebrand to locked for api
* Update BTCPayServer/Views/UIAccount/Lockout.cshtml
Co-authored-by: d11n <mail@dennisreimann.de>
* fix docker compose and an uneeded check in api handler
* fix
* Add enabled user test
Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
* Automated Transfer processors
This PR introduces a few things:
* Payouts can now be directly nested under a store instead of through a pull payment.
* The Wallet Send screen now has an option to "schedule" instead of simply creating a transaction. When you click on schedule, all transaction destinations are converted into approved payouts. Any options relating to fees or coin selection are discarded.
* There is a new concept introduced, called "Transfer Processors". Transfer Processors are services for stores that process payouts that are awaiting payment. Each processor specifies which payment methods it can handle. BTCPay Server will have some forms of transfer processors baked in but it has been designed to allow the Plugin System to provide additional processors.
* The initial transfer processors provided are "automated processors", for on chain and lightning payment methods. They can be configured to process payouts every X amount of minutes. For on-chain, this means payments are batched into one transaction, resulting in more efficient and cheaper fees for processing.
*
* fix build
* extract
* remove magic string stuff
* fix error message when scheduling
* Paginate migration
* add payout count to payment method tab
* remove unused var
* add protip
* optimzie payout migration dramatically
* Remove useless double condition
* Fix bunch of warnings
* Remove warning
* Remove warnigns
* Rename to Payout processors
* fix typo
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
* Add dashboard and chart basics
* More widgets
* Make widgets responsive
* Layout dashboard
* Prepare ExplorerClient
* Switch to Chartist
* Dynamic data for store numbers and recent transactions tiles
* Dynamic data for recent invoices tile
* Improvements
* Plug NBXPlorer DB
* Properly filter by code
* Reorder cheat mode button
* AJAX update for graph data
* Fix create invoice button
* Retry connection on transient issues
* App Top Items stats
* Design updates
* App Sales stats
* Add points for weekly histogram, set last point to current balance
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Use default currency for new pull payments
Closes#3582.
* Pull payment: Improve create form
* Use default currency for new invoices
Closes #3581.
* Clean up old invoice form code
* Use default currency for new payment requests
* Test fixes
* Test fix
Logs
* Add test logs
* Test change
* Use async overloads in CanPayWithTwoCurrencies test
* Bump NBXplorer
* More test updates
* More logs
* More waiting
* More waiting
* Update GoToUrl calls
* Log request status
* More logs
* More logs, more waits, idk
* Click checkboxes using JS
* Go to url directly
* Double timeout
* Add error message when wallet is not configured
* Adjust payment methods based on available ones
* Disable "Create invoice" page if there is an error
* Add test
* update HasErrorMessage
* Add method for checking if payment methods are available
* small pr fixes
Co-authored-by: Kukks <evilkukka@gmail.com>
* Update wallet navigation
* Find matching text color for label bg color
* Cleanup
* Extract WalletNav component
* Move PSBT link to Send and Rescan link to Settings
* Update transactions view
* Test fixes
* Adapt invoices list actions
* Show invoice actions only if there are any invoices
* Link wallet name and balance to tranactions list
* Move wallet related actions from list to settings
* Fix main menu z-index
Needs a value between fixed and the offcanvas backdrop, see https://getbootstrap.com/docs/5.1/layout/z-index/
* Update receive and send views
* Add warning about the security tradeoff of the paybutton
* Update BTCPayServer/Views/UIStores/PayButtonEnable.cshtml
Co-authored-by: d11n <mail@dennisreimann.de>
* Move message in column
Co-authored-by: d11n <mail@dennisreimann.de>
* updates
* updates
* updates
* updates
* updates
* moves api key CTA to top right
* updates
* more updates
* more updates
* Fix active state when "Account" is selected
* Update wording in subnav: Profile becomes Account
* Fix email test
* Update Emails wording
* Try to fix email test
* Make General first tab in store settings
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
* Store Selector: Create first store button
* Add setup guide to homepage
* Policy update for stores list
* Fix test
* Initial create store button as primary
* Add notifications list to homepage
* Remove back to list from store create view
* Adapt content padding on desktop
* Add store home view with setup guide
* Fix active page nav highlighting
* Test fix
* Remove What's Next section
* Rename Store Home to Dashboard
* Fix Lightning setup link
* Add tests for store setup guide
* Update BTCPayServer/Views/Home/Home.cshtml
Co-authored-by: Pavlenex <pavle@pavle.org>
* Update BTCPayServer/Views/Stores/Dashboard.cshtml
Co-authored-by: Pavlenex <pavle@pavle.org>
* Remove setup guide on global homepage
* Remove Shopify setup link from nav
* Fix content container max-width on desktop
Co-authored-by: Pavlenex <pavle@pavle.org>
* 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>