* 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
* Introduce Additional Data to Store Blob and move obsolete props to migration
* Fixes and tests
* Small adjustements to prevent tracking too many objects
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* UI: Consistent spacing on maintenance view
* UI: Empty states for apps, stores and wallets
* UI: Empty state for file storage
* UI: Toggle invoice selection in list on row click
* Update ChromeDriver
* Fix selector in payjoin test
* GreenField: Notifications API
This refactors notifications so that we dont have a bunch of duplicated direct access to db contexts in controllers and then introduces new endpoints to fetch/toggle seen/remove notifications of the current user.
* add tests + docs
* fix test
* pr changes
* fix permission json
This allows plugins to create custom dbcontexts, which would be namespaced in the scheme with a prefix. Migrations are supported too and the table would be prefixed too
* Remove QuadrigaCX references
Quadriga has been dead for years. I've removed the references to them and replaced them with a different Canadian exchange (ndax) for example.
The whole set of instructions could probably use an overhaul, but for now, at least let's get rid of Gerry's presence.
* Remove Quadriga from tests too
Co-authored-by: Kukks <evilkukka@gmail.com>
I upgrade lightning max/bitcoin min to support better control in store. Now can have setting only enable specific payment method only if value high/low I think make code simple more too and backward compatible
* Rename user param to userId in API key redirect
This way it is clearer what to expect and it also make the parameteer easier to consume.
* Post redirect: Allow form url and prettify page
- Form URL as alternative to controller/action for external URLs
- Making it look nice and add explanation for non-JS case
* APIKeys: Minor view updates
fix
* APIKeys: Use POST redirect for confirmation
fix
* UI: Minor update to confirm view
Tidies it up and adapts to the newly added ConfirmAPIKeys view.
* APIKeys: Update delete view
Structures the information in title and description better.
* APIKeys: Distinguish authorize and confirm (reuse)
* Upgrade ChromeDriver
* Test fixes
* Clean up PostRedirect view
By adding missing forgery token
* Re-add tests for callback post values
* Rename key param to apiKey in API key redirect
* Update BTCPayServer/wwwroot/swagger/v1/swagger.template.authorization.json
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
* Use DEBUG conditional for postredirect-callback-test route
* Remove unnecessary ChromeDriver references
* Add debug flag
* Remove debug flags
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
This lets the authorize api key screen redirect to the defined url and provide it with the user id, permissions granted and the key.
This also allows apps to match existing api keys generated for it specifically using the application identifier, and if matched, presented with a confirmation page before redirection.