* 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
* 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>
Fixes comparisons of `long` and `LightMoney`, which did not work, because the `amount` provided was in sats and Lightmoney compares to millisats.
Closes#4663.
* Checkout: Allow NFC/LNURL-W whenever LNURL is available
With what we have in master right now, we display NFC only for top-up invoices. With these changes, we display NFC in all cases, where LNURL is available.
Note that this hides LNURL from the list of selectable payment methods, it's only available to use the NFC — and explicitely selectable only for the edge case of top-up invoice + non-unified QR (as before).
Rationale: Now that we got NFC tightly integrated, it doesn't make sense to support the NFC experience only for top-up invoices. With this we bring back LNURL for regular invoices as well, but don't make it selectable and use it only for the NFC functionality.
* Fix LNURL condition
* Improve and test NFC/LNURL display condition
Restores what was fixed in #4660.
* Fix and test Lightning-only case
* Add cache busting for locales
* Label Manager component
closes#4464
* UI updates
* Test fix
* add test
* fix warnings
* fix select update bug
* add test
* fix test
* Increase payment box max-width
* add labels from address to tx on detection
* Exclude well known label from the dropdown
* Add test on transaction label attachement, tighten UpdateLabels method to only update address labels
---------
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Custom Forms
* Update BTCPayServer.Data/Migrations/20230125085242_AddForms.cs
* Cleanups
* Explain public form
* Add store branding
* Add form name to POS form
* add tests
* fix migration
* Minor cleanups
* Code improvements
* Add form validation
Closes#4317.
* Adapt form validation for Bootstrap 5
* update logic for forms
* pr changes
* Minor code cleanup
* Remove unused parameters
* Refactor Form data handling to avoid O(n3) issues
* Rename Hidden to Constant
* Pre-populate FormView from the query string params
* Fix test
---------
Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* UI updates
* Updates modes and calculation
* Unify tip buttons
* White caret
* Add top margin to calculation
* Add space between mode buttons and keypad
* Discount updates
* Crowdfund: View updates
Improve store branding and remove the card styles, because they had borders which seemed like visual clutter. Other than that I made some changes to the header section and cleaned up the markup and indentation.
* adds column spacing + details header
* Move the Featured Image input
* Center align the Last Updated
* Remove store header, update header section
* Bump description font size
* Improve perk display
* Improve details section
* Fix main image display
---------
Co-authored-by: dstrukt <gfxdsign@gmail.com>
In case of the unified invoice, the LNURL wasn't correct — with this change we are simply reusing th one that was issued on invoice creation instead of generating it anew on the fly.
Also fixes missing uppercasing for the QR code in case of non-unified QR.
And removes the `lightning:` scheme from the LNURL that's displayed to the user (unifies it with what we do for Onchain and Lightning)
* Make NFC built int
* support checkout v2
* uninstall old plugin
* fix lnurl in unified checkout
* fix tests
* fix tests
* fix old checkout unified qr
* clean up and make nfc submission more sturdy
* support topup invoices for lnurlw
* fix test
* Payment URI fixes
* Fix LNURL exclusion cases
* UI updates
* Adapt test
---------
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
As @petzsch rightfully assumed in #4578, the check took only the last available LN payment method into account, which in this case was LN on LTC. We now pass the crypto code as well and I refactored the checks as well as the option view.
Fixes#4578.
* BIP21: Uppercase addresses only in QR, not in payment URL
The uppercased address/BOLT11 should only be used for the QR code, the payment URI for the link should stay as it is.
References:
- #2110
- https://bitcoinqr.dev/
* Improve comments
* Add comments step by step
* Ensure correct delimiter
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Checkout v2: Configure countdown timer
This addresses feedback by @astupidmoose left [here](https://github.com/btcpayserver/btcpayserver/discussions/4308#discussioncomment-4438926): Make the countdown timer configurable with a minutes setting. This way the merchant has full control over when to display the timer. They could even set it to equal the invoice expiry, so that it is shown right from the beginning.
* Rename property and adjust wording
* Remove expiration percentage from Checkout v2
* Update some buttons
* Potential flaky test fix
* Dark theme: Fix primary accent color
* Pay Button: Remove unused clipboard dependency
The pay button uses the cope-to-clipboard.js
* Remove babel-polyfill
Browser-support should be good by now.
* Remove unused jquery-easing scripts
* Remove unused CSS
* Theme extensions
Adds the ability to choose the themeing strategy: Extend one of the existing themes (light or dark) or go fully custom. The latter was the only option up to now, which isn't ideal:
- One had to provide a full-blown theme file overriding all variables
- Tedious, error prone and hard to maintain, because one has to keep track of updates
This PR makes it so that one can choose light or dark as base theme and do modifications on top.
Benefit: You can specify a limited set of variables and might get away with 5-20 lines of CSS.
* Ensure custom theme is present
* Update checkout test
* Use better default than coingecko when creating a new store
* Improve recommended exchange UX
* Add btcturk for TRY
* Fix recommendation
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
* PayButton: Fix CSP problems in Firefox
Firefox does not support [`unsafe-hashes`](https://caniuse.com/?search=unsafe-hashes), so I figured it might be best to get rid of the inline event handlers in general.
Closes#4325.
* Account for multiple paybuttons on one page
* 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>
* 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
* 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>
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.
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
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.
* Opt-in for new checkout
* Update wording
* Create invoice view update
* Remove jQuery from checkout testing code
* Checkout v2 basics
* WIP
* WIP 2
* Updates and fixes
* Updates
* Design updates
* More design updates
* Cheating and JS fixes
* Use checkout form id whenever invoices get created
* Improve email form handling
* Cleanups
* Payment method exclusion cases for Lightning and LNURL
TODO: Cases and implementation need to be discussed
* Introduce CheckoutType in API and replace UseNewCheckout in backend
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
As the Node Info was used as an ID, this didn't work with IPv6 addresses, as those contain characters not suitable for HTML IDs.
Fixes#4245.
Also: Simplify the head section of that view by reusing the existing partial.
* Add logo upload
* Add brand color definition
* Cleanups
* Add logo to store selector
* Improve brand color handling
* Update color input
* Add logo dimensions hint
* Fixes
* Fix pattern and warning in js logs for color validation
* Fix condition, add test
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
Fixes styling issues introduced in #4074, because the `max-width` was to small for localized dates.
Also adds the ability to choose the prefered initial display format, which can be the localized or relative date.
* Update WalletTransactions pagination default settings
Remove the numeric page selection and add displaying data of last 30 days by default.
* Update WalletTransactions to show txs based on Days
* Update text formatting on WalletTransactions view
Keeps the logic changes. Just undo the formatting of the file from previous commit
* Update WalletTransactions to show all after second load
Utilize Model.Days instead of new variables
Moved javascript code to PageFootContent section
* Update WalletTransactions to use ajax for infinite scroll
* Cleanups
* Apply skip and count only when not prefiltering
* Infinite scroll mode
* Improve datetime formatting and switching
* Upgrade NBXplorer to include get_wallets_recent bugfix
* Revert "Upgrade NBXplorer to include get_wallets_recent bugfix"
This reverts commit b390d942d74d88bb1da3ab8e3407184a527175ef.
* JS fixes
* Upgrade ChromeDriver and BundleMinifier
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Removes the current value on focus, so that the user gets to see the available options. If no selection or change is made, the value is reset to the previous value on blur.
Closes#4154.
* Fix settigs sidebar activation
* remove active payout from settings
* Fix Store Settings nav highlight
Fixes#4134.
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
They failed with an `System.NullReferenceException: Object reference not set to an instance of an object.` when navigating to a LNbank page, because LNbank uses Razor Pages and the controller part wan't defined. Brought up [on Mattermost](https://chat.btcpayserver.org/btcpayserver/pl/x3iohhct97nateyq4y1c4hp9mw).
Based on the `ur-registry` upgrade I refactored the `CameraScanner` and `ShowQR` partials: Besides general code changes, the main change is that most of the configuration and result handling now happens on the outer view.
Those partials and functions are now generalized and don't know about their purpose (like handling PSBTs): They can be instantiated with simple data (e.g. for displaying a plain QR code) or different modes (like showing a static and the UR version of a QR code) and the result handling is done via callback.
The callbacks can now also distinguish between the different results (data as plain string vs. UR-type objects for wallet data or PSBT) and also handle the specific type of data. For instance: Before it wasn't possible to strip the leading derivation path from an xpub when scanning the QR code, because the scanner didn't know about the type of data it was handling. Now that the data is handled in the callback, we can implement that functionality for the scan view only.
* Added custodian account trade support
* UI updates
* Improved UI spacing and field sizes + Fixed input validation
* Reset error message when opening trade modal
* Better error handing + test + surface error in trade modal in UI
* Add delete confirmation modal
* Fixed duplicate ID in site nav
* Replace jQuery.ajax with fetch for onTradeSubmit
* Added support for minimumTradeQty to trading pairs
* Fixed LocalBTCPayServerClient after previous refactoring
* Handling dust amounts + minor API change
* Replaced jQuery with Fetch API + UX improvements + more TODOs
* Moved namespace because Rider was unhappy
* Major UI improvements when swapping or changing assets, fixed bugs in min trade qty, fixed initial qty after an asset change etc
* Commented out code for easier debugging
* Fixed missing default values
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
* Move TagHelpers to Abstractions
Makes them available for use in plugins. Also cleans up the tag helper references in the view code: As we have it in the root view imports, the individual directives in the views are superfluous.
* Move CurrenciesSuggestionsTagHelper back
To get rid of the Rating dependency in Abstractions.
* 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
* After a utxo rescan, the cached balance should be invalidated
* Fixed Kraken plugin build issues
* Added Kraken plugin to build
* WIP UI + config form
* Create custodian account almost working - only need to add in the config form
* Working form, but lacks refinement
* Viewing balances + Editing custodian account works, but cannot change the withdrawal destination config because that is an object using a name with [] in it
* cleanup
* Minor cleanup, comments
* Working: Delete custodian account
* Moved the MockCustodian used in tests to a new plugin + linked it to the tests
* WIP viewing custodian account balances
* Split the Mock custodian into a Mock + Fake, various UI improvements and minor fixes
* Minor UI fixes
* Removed broken link
* Removed links to anchors as they cannot pass the tests since they use JavaScript
* Removed non-existing link. Even though it was commented out, the test still broke?
* Added TODOs
* Now throwing BadConfigException if API key is invalid
* UI improvements
* Commented out unfinished API endpoints. Can be finished later.
* Show fiat value for fiat assets
* Removed Kraken plugin so I can make a PR
Removed more Kraken files
* Add experimental route on UICustodianAccountsControllre
* Removed unneeded code
* Cleanup code
* Processed Nicolas' feedback
Co-authored-by: Kukks <evilkukka@gmail.com>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Enhance Store email capability
Currenty the new email rules can send an email when an invoice event occurs. However, there is currently no way to customize the email based on the invoice, making the feature a bit useless.
This PR:
* adds the rich text editor to the body input
* allows you to use some of the properties from the Invoice (based on greenfield api properties. I've taken a imple approach for now using just a string.replace mechanism, but we can update this to a dynamic linq approach so that users can customize further (e.g. `{Invoice.Metadata["something"].ToString().ToUpper()}`)
NOT READY:
Since this all takes place as a background service, there is an issue around how to handle items such as the "checkout link", as we are not aware of the btcpay url at that moment. Thoughts? @nicolasdorier
* fix typo and make it simpler for now
* remove dditor
* Public Invoice receipt
* implement payment,s qr, better ui, and fix invoice bug
* General view updates
* Update admin details link
* Update view
* add missing check
* Refactor
* make payments and qr shown by default
* move cusotmization options to own ReceiptOptions
* Make sure to sanitize values inside PosData partial
* Refactor
* Make sure that ReceiptOptions for the StoreData is never null, and that values are always set in API
* add receipt link to checkout and add tests
* add receipt link to lnurl
* Use ReceiptOptions.Merge
* fix lnurl
* fix chrome
* remove i18n parameterization
* Fix swagger
* Update translations
* Fix warning
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Store Emails
* fix test
* Update email rules layout
* Cleanups
* Test cleanups
* Add back comments
* Update view; add test
* Show email rules link even if email settings aren't completed
* Validate email addresses
* No redirect, display warning
* Fix test
* Refactoring: Change email argument types to MailAddress
* Test fix
* Refactoring: Use MailboxAddress
* Parse emails properly in controllers and backend
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* ui+paymentrequest: moves 'view' link to name
* ui+pull: moves 'view' link to name column
* Update links, fix tests
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
* Move files
* Fix potentially missing default payment method
Before, it got removed if any other value was changed besides the default payment method.
* Fix missing store data
* Update BTCPayServer/Plugins/PayButton/PayButtonPlugin.cs
Co-authored-by: Pavlenex <pavle@pavle.org>
* Update pay button warning
Closes#3535.
Co-authored-by: Pavlenex <pavle@pavle.org>
Fixes the return URL for the case in which the dropdown content got replaced after a notification update: As the refresh request is done via AJAX, the return URL previously was `/notifications/getnotificationdropdownui` (the `Context.Request.GetCurrentPathWithQueryString()` value of the AJAX action).
We need to pass in the URL of the actual current page as the return URL.
* 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>
We're keeping the `store-integrations-list` extension point name for backwards compatibility, otherwise I renamed all "integration" occurences in the views and also the routes.
Note: We still refer to external software like WooCommerce, Drupal, Magento and such as "integrations", I think that distinction makes sense.
Closes#3594.
* 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>