Commit Graph

226 Commits

Author SHA1 Message Date
Andrew Camilleri
cb25c225e9
Remove custodians (#5863)
* Remove custodians

* Hide Experimental checkbox in the server policies

---------

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2024-03-29 00:28:27 +09:00
d11n
09dbe44bca
Onboarding: Invite new users on store level (#5719)
* 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
2024-03-19 14:58:33 +01:00
Nicolas Dorier
912a706de9
Make Payouts and PullPayments columns JSONB (#5800) 2024-03-14 11:13:26 +01:00
d11n
4943c84655
Invoice: Improve events display (#5775)
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)
2024-02-21 14:08:28 +01:00
Nicolas Dorier
c2acff81c6
Fix: Labels wouldn't be properly applied to some wallet's transactions (#5770) 2024-02-20 18:42:38 +09:00
d11n
6290b0f3bf
Admins can approve registered users (#5647)
* 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>
2024-01-31 14:45:54 +09:00
nicolas.dorier
3ae1f13323
Bump libraries 2024-01-17 22:11:30 +09:00
Nicolas Dorier
3fc687a2d4
Fix: Payments to Top-Up could be undetected due to race condition (#5568) 2023-12-20 18:41:28 +09:00
Nicolas Dorier
ea2648f08f
Fix: Update of inventory could override app settings being updated (#5565) 2023-12-19 20:53:11 +09:00
Nicolas Dorier
d050c8e3b2
Boltcard integration (#5419)
* Boltcard integration

* Add API for boltcard registration
2023-12-06 09:17:58 +09:00
Andrew Camilleri
bac9ab08d1
Make wallet object system much more performant (#5441)
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2023-11-28 11:38:09 +01:00
Nicolas Dorier
9ccc42f556
Bump .NET 8.0 (#5479) 2023-11-21 14:11:17 +09:00
Nicolas Dorier
3ee4f43eb5
Remove CurrentRefund property in InvoiceData (#5494) 2023-11-21 12:52:40 +09:00
d11n
57bc90ad03
Archive stores and apps (#5296)
* Add flags and migration

* Archive store

* Archive apps
2023-09-11 09:59:17 +09:00
Nicolas Dorier
dc986959fd
Add reporting feature (#5155)
* Add reporting feature

* Remove nodatime

* Add summaries

* work...

* Add chart title

* Fix error

* Allow to set hour in the field

* UI updates

* Fix fake data

* ViewDefinitions can be dynamic

* Add items sold

* Sticky table headers

* Update JS and remove jQuery usages

* JS click fix

* Handle tag all invoices for app

* fix dup row in items report

* Can cancel invoice request

* Add tests

* Fake data for items sold

* Rename Items to Products, improve navigation F5

* Use bordered table for summaries

---------

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2023-07-24 09:24:32 +09:00
Andrew Camilleri
4063a5aaee
Quality of life improvements to payout processors (#5135)
* Quality of life improvements to payout processors

* Allows more fleixble intervals for payout processing from 10-60 mins to 1min-24hours(requested by users)
* Cancel ln payotus that expired (bolt11)
* Allow cancelling of ln payotus that have failed to be paid after x attempts
* Allow conifguring a threshold for when to process on-chain payouts (reduces fees)

# Conflicts:
#	BTCPayServer.Tests/SeleniumTests.cs

* Simplify the code

* switch to concurrent dictionary

* Allow ProcessNewPayoutsInstantly

* refactor plugin hook service to have events available and change processor hooks to actions with better args

* add procesor extended tests

* Update BTCPayServer.Tests/GreenfieldAPITests.cs

* fix concurrency issue

* Update BTCPayServer/PayoutProcessors/BaseAutomatedPayoutProcessor.cs

---------

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2023-07-20 22:05:14 +09:00
nicolas.dorier
4e03c2523a Prune webhook data from database 2023-05-29 09:02:47 +02:00
Andrew Camilleri
783e4ccb35
Store Custom Roles (#4940) 2023-05-26 23:49:32 +09:00
Andrew Camilleri
8860eec254
Switch Apps to json not YML (#4792) 2023-05-23 09:18:57 +09:00
nicolas.dorier
7546ef7a8e
Dotnet reformat 2023-04-10 11:07:03 +09:00
Andrew Camilleri
5d39bb7466
Allow LN Address to customize invoice metadata, and various bug fixes on LNUrl (#4855)
* Allow LN Address to customize invoice metadata

solves https://github.com/OpenSats/website/issues/8

* Refactor GetLNUrl

* Fix lightningAddresssettings.Max being ignored

* Fix: The payRequest generated by the callback wasn't the same as the original

---------

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2023-04-07 17:48:58 +09:00
Andrew Camilleri
fae1dc8dbb
Adapt cookie auth to work with same API permission system (#4595)
* Adapt cookie auth to work with same API permission system

* Handle unscoped store permission case

* Do not consider Unscoped as a valid policy

* Add tests

* Refactor permissions scopes

---------

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2023-03-20 10:46:46 +09:00
nicolas.dorier
3f18e5476a
Error when indexing invoices with some field that are too long (Fix #4771) 2023-03-15 09:31:38 +09:00
Andrew Camilleri
e0486aaa24
Label Manager component (#4594)
* 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>
2023-02-22 11:47:02 +09:00
Nicolas Dorier
2bd8227e20
Start using JSONB column instead of app side compressed data (#4574) 2023-02-21 15:06:34 +09:00
d11n
5c61de3ae9
Different icons for notifications (#4632)
* Different icons for notifications

Closes #2510.

* Fix version appendix for SVG use attributes

* Fix SVGUse TagHelper

* Update icons
2023-02-21 11:06:27 +09:00
Andrew Camilleri
bbbaacc350
Generic Forms (#4561)
* 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>
2023-02-20 19:35:54 +09:00
nicolas.dorier
5121d64022
Fix: Migrating from SQLite was crashing in some conditions (Close #4623) 2023-02-15 15:59:45 +09:00
Nicolas Dorier
1f8bc5b490
Add ability to migrate from MySQL and SQLite with EF (#4614) 2023-02-10 11:43:46 +09:00
nicolas.dorier
0d1bab45a0
Fix MySQL migrations 2023-02-10 11:17:52 +09:00
nicolas.dorier
ed0ccd6f13
Bump lightning lib, fix warnings 2023-02-08 21:29:20 +09:00
Nicolas Dorier
ae7b621e3d
Change Stores.DerivationStrategies to JSONB (#4573)
Gradually changing column from blobs to JSONB allow us to
later take advantages of more powerful queries on postgres.
2023-02-02 09:43:39 +09:00
Nicolas Dorier
b818352a04
Register rate providers in DI, so it can be accessed by plugins (#4551) 2023-01-30 09:46:12 +09:00
d11n
d5d0be5824
Code formatting updates (#4502)
* Editorconfig: Add space_before_self_closing setting

This was a difference between the way dotnet-format and Rider format code. See https://www.jetbrains.com/help/rider/EditorConfig_Index.html

* Editorconfig: Keep 4 spaces indentation for Swagger JSON files

They are all formatted that way, let's keep it like that.

* Apply dotnet-format, mostly white-space related changes
2023-01-06 22:18:07 +09:00
Nicolas Dorier
0c3f819200
Have address wallet objects rather than script objects (#4417) 2022-12-13 09:09:25 +09:00
Andrew Camilleri
0af3faf6ff
Wallet object scripts (#4301)
* Wallet object scripts

* Adjust comment

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-12-01 09:54:55 +09:00
nicolas.dorier
e11a775bed
fix migration 2022-11-29 11:29:35 +09:00
Nicolas Dorier
08b239e87a
Change some table type from TEXT to JSONB (#4371)
* Change some table type from TEXT to JSONB

* Deprecate mysql and sqlite backend
2022-11-28 20:36:18 +09:00
Nicolas Dorier
39328c7368
Rename walletobjects Parent/Child to A/B (#4347) 2022-11-25 12:06:57 +09:00
Andrew Camilleri
022285806b
Form Builder (#4137)
* 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>
2022-11-25 10:42:55 +09:00
nicolas.dorier
4ce504a1e1
Add index to WalletObjects + allow additional queries 2022-11-19 23:39:41 +09:00
Nicolas Dorier
9b5c6ece90
Refactor walletobj API, make wallet object graph directionless (#4297) 2022-11-19 00:04:46 +09:00
nicolas.dorier
ff572eef7f
Use constants rather than magic strings in transaction attachments 2022-11-17 10:24:49 +09:00
Nicolas Dorier
a2fa688cde
Refactor labels (#4179)
* Create new tables

* wip

* wip

* Refactor LegacyLabel

* Remove LabelFactory

* Add migration

* wip

* wip

* Add pull-payment attachment to tx

* Address kukks points
2022-10-11 17:34:29 +09:00
Andrew Camilleri
c40c11a822
bump ms aspnet packages (#4166)
* bump ms aspnet packages

* Bump .NET SDK in Dockerfile

* bump more packages

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-10-07 14:53:30 +09:00
Andrew Camilleri
d0b26e9f69
Refactor Payouts (#4032)
Co-authored-by: d11n <mail@dennisreimann.de>
2022-08-17 09:45:51 +02:00
Nicolas Dorier
c2a0daedeb
Bump versions of various deps (#3998) 2022-07-27 15:55:37 +09:00
Wouter Samaey
2abc35058b
Custodian Account UI: CRUD (#3923)
* 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>
2022-07-07 22:42:50 +09:00
Andrew Camilleri
3d7f628014
Support Lnurl Withdraw in pull payments (#3709)
* Support Lnurl Withdraw

* cleanup and small fixes

* remove putin brace
2022-06-28 23:02:17 +09:00
d11n
9428347cb6
Crowdfund finetuning (#3488)
* Update crowdfund defaults

* Crowdfund: Move sound, animation and discussion into additional options

* Update sound URLs

Fixes #3745.

* Update featured image URL label

* Improve the recurring goal section

* Crowdfund: Goal section finetuning
2022-06-28 12:03:13 +09:00
Andrew Camilleri
9a24e4ade1
Store Settings feature with own table (#3851)
* Store Settings feature with own table

* fix test

* Include the store settings to StoreRepository, remove caching stuff

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-06-13 13:36:47 +09:00
nicolas.dorier
8828251204
Remove HistoricalAddresses 2022-05-23 11:32:37 +09:00
Nicolas Dorier
174e743904
Improve invoice list performance (#3742) 2022-05-18 15:44:58 +09:00
Andrew Camilleri
76a6d94bbe
Exchange api no kraken (#3679)
* 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>
2022-05-18 14:59:56 +09:00
Andrew Camilleri
51690b47a3
Transfer Processors (#3476)
* 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>
2022-04-24 12:19:34 +09:00
Andrew Camilleri
7652d2c7e3
LN Address - db schema fix method (#3638)
* LN Address - db schema fix method

* pr changes

* shorten
2022-04-19 16:58:31 +09:00
Kukks
3231d5d179 Allow file service to be used in plugins 2022-03-02 12:22:46 +01:00
Kukks
7243aec213 Support LNURL Auth 2022-01-14 13:26:30 +01:00
Nicolas Dorier
04b8eafacb
Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
Nicolas Dorier
02419dcdd1
Migrate to .net6.0 (#3198) 2021-12-27 13:15:43 +09:00
Samuel Adams
ec68d2a0e6
Remove Confirmed state in UI (#3090)
* Remove Confirmed state in UI

Closes #1789.

* Add infobox & improve refund tooltip

* Update BTCPayServer/Views/Invoice/ListInvoices.cshtml

Add @dennisreimann suggestion

Co-authored-by: d11n <mail@dennisreimann.de>

* Add "don't show again" button

Adds a "Don't Show Again" button to the infobox. Also a bugfix that was preventing the new status from showing in the invoice details page.

* Add User blob and move invoice status notice to it

Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: Kukks <evilkukka@gmail.com>
2021-11-26 23:13:41 +09:00
Kukks
31cf2671f5 Optimize admin user list 2021-11-15 10:28:45 +01:00
Andrew Camilleri
951bfeefb1
LNURL Payment Method Support (#2897)
* 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>
2021-10-25 15:18:02 +09:00
nicolas.dorier
5318684e5c
fix build 2021-10-23 22:10:54 +09:00
Andrew Camilleri
db038723f4
Payout Destination Handling (#2985)
* 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
2021-10-22 00:43:02 +09:00
nicolas.dorier
ce1903b2fa
Bumping versions of libraries and dockerfile 2021-10-05 15:26:40 +09:00
d11n
6666786b7a
Unify Fido2 authentication under two-factor tab (#2866)
* Unify Fido2 authentication under two-factor tab

Closes #2754.

* Improve UI and wording

* Improve register FIDO2 device page
2021-09-13 10:16:52 +09:00
Jovo Kljajic
dbf2f99c4e
Fixing issue with mysql migration and maxLength (#2541) 2021-05-25 16:03:49 +09:00
Andrew Camilleri
5fe3c1c61f
U2fremove (#2496)
* Remove U2F support and JS

* fix final changes

* fix more final stuff
2021-04-28 16:22:09 +09:00
Andrew Camilleri
02bf5afe0b
Migrate existing U2F to Fido2 (#2484)
* 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
2021-04-28 13:14:15 +09:00
Andrew Camilleri
0554565b30
FIDO2/WebAuthN Support (#2356)
* 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>
2021-04-20 14:06:32 +09:00
Andrew Camilleri
2e12befb8b
Refactor and decouple Payout logic (#2046)
* 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
2021-04-13 17:36:49 +09:00
ketominer
1fed7fb5af fix for sqlite 2021-02-07 21:14:31 +01:00
ketominer
93d1ded4c2 fixed mysql support 2021-02-07 20:57:48 +01:00
Andrew Camilleri
58d01738ab
More Options refactoring (#2179)
* More Options refactoring

Continues refactoring config classes to use the propert Options pattern where possible.
DataDirectories and DatabaseOptions are now configured the Options pattern and the BTCPayOptions is now moved alongside the other config setup

* Move COnfigure logic for Options to the Startup
2021-01-06 23:51:13 +09:00
rockstardev
6c22546577 Merge pull request #2172 from btcpayserver/fix/db-refactoring
Refactoring db entities to follow conventions
2021-01-01 01:58:52 -06:00
rockstardev
24177ffc46 Removing partial class since Emperor requested it 2020-12-31 14:08:58 -06:00
rockstardev
8ae4315d43 Database Migration: Removing migration with wrong table name and refreshing 2020-12-31 14:08:58 -06:00
rockstardev
a588c72e6c Database Migration: Renaming InvoiceSearches table to follow convention 2020-12-31 14:08:58 -06:00
rockstardev
a656f86003 Refactoring ApplicationDbContext to order tables and OnModelCreating calls 2020-12-31 14:08:58 -06:00
rockstardev
c9dc60be7b Refactoring Data entities to fit one standard convention 2020-12-31 14:08:57 -06:00
Andrew Camilleri
39b5462809
Remove only dependency on Dbriize (TextSearch in new invoice column) (#2029)
* Remove only dependency on Dbriize (TextSearch in new invoice column)

* Switch to table for invoice text search

* Adding missing using after rebase

* Removing database migration in preparation for refresh

* Database Migration: Adding InvoiceSearchData

* Refactoring InvoicesRepository to make AddToTextSearch static and non-async

Operation as async is too expensive for simple filtering and AddRange

* Renaming InvoiceQuery property to Take

More inline with what property does by convention, Take is used in conjuction with Skip

* Refactoring SettingsRepository so update of settings can happen in another context

* Adding DbMigrationsHostedService that performs long running data migrations

* Commenting special placing of MigrationStartupTask

* Simplifying code and leaving comment on expected flow

* Resolving problems after merge

* Database Migration: Refreshing database migration, ensuring no unintended changes on ModelSnapshot

Co-authored-by: rockstardev <rockstardev@users.noreply.github.com>
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2020-12-28 19:10:53 +09:00
Nicolas Dorier
0d144d088e
Refactor label implementation (Fix #2090) (#2123) 2020-12-12 14:10:47 +09:00
nicolas.dorier
76e46d2fa7
Fix performance issues on query over orderId (fix #2114) 2020-12-08 14:43:39 +09:00
Nicolas Dorier
d8f145c4dc
Merge branch 'master' into plugins-db 2020-11-19 12:19:17 +09:00
Kukks
24f3285003 Let migration assembly resolve from itself 2020-11-18 13:22:05 +01:00
Kukks
179520a211 Plugins: Allow creation of independent DbContexts
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
2020-11-18 12:27:26 +01:00
nicolas.dorier
f3611ac693
Add Webhooks in store's settings 2020-11-08 15:57:24 +09:00
Andrew Camilleri
4d0b402e8b
Allow disabling notifications per user and disabling specific notifications per user (#1991)
* Allow disabling notifications per user and disabling specific notifications per use

closes #1974

* Add disable notifs for all users

* fix term generator for notifications

* sow checkboxes instead of multiselect when js is enabled

* remove js dependency

* fix notif conditions
2020-10-20 13:09:09 +02:00
Dennis Reimann
f2870caed2
Payment redesign (#1967)
* Payment redesign

Guess who's back!

This reverts commit 4174fa648d.

* Refactor PullPayment state string

Compatible with this one: https://github.com/btcpayserver/btcpayserver/pull/1834/files#diff-a9136096252382b110b9a7ac7747b95aR41

* Use unified copy to clipboard function

* Refactor status text class to helper function
2020-10-13 09:58:46 +02:00
Nicolas Dorier
55eec06e77
Merge pull request #1934 from btcpayserver/better-users
Add Created date to user, add verified column in list and make user l…
2020-10-08 12:08:16 +09:00
Kukks
9ff93ac2d5 add migration 2020-10-07 11:08:11 +02:00
Kukks
2147f8ec8b Make U2F devices cascade delete
fixes #1949
2020-10-06 17:57:16 +02:00
Kukks
3d2b4cbfa8 Add Created date to user, add verified column in list and make user list use same model as modern lists 2020-10-05 13:00:15 +02:00
Nicolas Dorier
81561c6f3d
Merge pull request #1800 from btcpayserver/apikeys/redirect
Add API Keys Application identifier + Redirect
2020-09-03 21:27:12 +09:00
Nicolas Dorier
85d393fec3
Merge pull request #1872 from Kukks/invoie-severity
Add invoice event severity
2020-09-03 21:24:20 +09:00
Kukks
98c4b658c4 Add invoice event severity
closes #1681
https://i.imgur.com/eyMO9M3.png
2020-09-01 18:19:49 +02:00
Kukks
811fd98a39 Add MaxLength and remove destination maxlength 2020-08-28 09:39:25 +02:00
Kukks
47930035a7 attempt mysql fix
fixes #1836
2020-08-28 09:39:25 +02:00
Kukks
0e07fcc706 fixes and adapt 2020-08-28 09:00:14 +02:00