Commit Graph

152 Commits

Author SHA1 Message Date
Nicolas Dorier
35b3fef7c5
Fix wallet import (#5695)
* Fix wallet import

* Improve error message for import of wallet file
2024-01-24 17:49:15 +09:00
d11n
f31aa43c6a
Wallet file parsing: Add Wasabi test case and re-add Electrum distinction (#5694)
* Extend tests, add Wasabi file

* Re-add Electrum distinction

* Specter: Fix indentation

* Cleanups
2024-01-24 09:28:22 +09:00
nicolas.dorier
bd196ad963
fix build 2024-01-18 12:31:59 +09:00
nicolas.dorier
1ad93838c9
Remove reliance on static field 2024-01-18 11:13:32 +09:00
Nicolas Dorier
376067324b
Remove unused variables (#5669) 2024-01-18 09:47:39 +09:00
Nicolas Dorier
1d6d146fb2
Revert "Remove unused variables" (#5667)
This reverts commit f070b22355.
2024-01-18 00:05:50 +09:00
nicolas.dorier
f070b22355
Remove unused variables 2024-01-17 18:46:28 +09:00
Andrew Camilleri
c5a0e28420
Refactor Wallet import code (#5638)
* Refactor Wallet import code

The code for wallet import was incredibly messy as it evolved over time from various requests.

This PR:
* splits up each supported format into its own file
* Supports taproot descriptors (through a hack until NBitcoin supports it internally) fixes #5518
* Reduces different paths for handling electrum/non-electrum xpubs
* Allows plugins to add their own import support formats for onchain wallets.

* Update NBitcoin to parse tr descriptors

* Fix warnings

* Use dedicated type OnChainWalletParsers

---------

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2024-01-17 18:08:39 +09:00
Nicolas Dorier
b3f9216c54
Use PullPaymentId to derive the cardkey of Boltcard (#5575) 2023-12-21 10:29:28 +09:00
d11n
5114a3a2ea
Lightning: Fix connection display name in LN settings (#5569)
* Lightning: Fix connection display name in LN settings

Builds on btcpayserver/BTCPayServer.Lightning#153.

* Upgrade Lightning lib
2023-12-20 19:26:24 +09:00
Nicolas Dorier
04292d09e1
Pluginify BTCPayNetworkProvider (#5331) 2023-11-29 18:51:40 +09:00
Andrew Camilleri
2f23bad3bc
Support the new LN lib (#5422)
* Support the new LN lib

* fix test

* do not cache factories

* try without useless userinfo in lnd

* Remove monero wallet files

* support simpler DI too

---------

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2023-11-21 18:55:02 +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
Nicolas Dorier
22435a2bf5
Refactor logic for calculating due amount of invoices (#5174)
* Refactor logic for calculating due amount of invoices

* Remove Money type from the accounting

* Fix tests

* Fix a corner case

* fix bug

* Rename PaymentCurrency to Currency

* Fix bug

* Rename PaymentCurrency -> Currency

* Payment objects should have access to the InvoiceEntity

* Set Currency USD in tests

* Simplify some code

* Remove useless code

* Simplify code, kukks comment
2023-07-19 18:47:32 +09:00
Nicolas Dorier
1956919886
Do not crash when an invoice have an amount that is too big (#5070) 2023-06-16 10:47:58 +09:00
nicolas.dorier
4e03c2523a Prune webhook data from database 2023-05-29 09:02:47 +02:00
Nicolas Dorier
fea27b900c
Harden file type inputs (#4635) 2023-02-14 17:03:12 +09:00
Nicolas Dorier
219d03b8dd
Fix: If PoS item code contains a /, LNUrl would not work (fix #4601) (#4602)
This is caused by a weird buggy behavior from ASP.NET Core concerning
path value decoding. (More information on
https://github.com/dotnet/aspnetcore/issues/14170#issuecomment-533342396)

This hasn't been fixed for a while, and the dotnet team keeps reporting
it over and over.
2023-02-06 18:17:17 +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
Andrew Camilleri
f8619e382b
Fix LN Address payouts (#3960)
* Fix LN Address payouts

LN Address was validated when creating the claim but the paying sdection did not support it.

* reuse code

* reuse code

* do not use mail directly

* fix email validator
2022-07-15 12:37:47 +09:00
Andrew Camilleri
b8f1c0df09
Create interface for providing store id to plugins (#3910) 2022-06-29 23:18:02 +09:00
d11n
ef6016857b
FileService: AddFile from URL (#3566) 2022-03-31 11:54:25 +02:00
Dennis Reimann
749c22a0c3 Refactoring: Extract HttpRequest extensions 2022-03-08 08:17:39 +00:00
Dennis Reimann
6867774627 Refactoring: Extract StringExtensions 2022-03-08 08:17:39 +00:00
Dennis Reimann
4a05f16050 Refactoring: Move WellKnownTempData into Abstractions.Constants
This allows plugins to reuse the status message mechanism.
2022-02-21 16:39:08 +01:00
Umar Bolatov
a3b748ffe3
Remove payment methods not currently configured when creating invoice (#3394)
* 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>
2022-02-17 18:22:09 +09:00
nicolas.dorier
9e2f7fb048
Do not register services of altcoins if not used 2022-02-10 12:36:07 +09:00
Nicolas Dorier
300d84c5d8
[UX/UI] Add CPFP (#3395)
* Add CPFP

* Sign PSBT should go back to the initial page
2022-02-10 12:24:28 +09:00
d11n
ff9a1a1f55
Delete user preferences cookie on logout (#3379)
I think it is a good practice to remove those settings on logout. Otherwise they get persisted across multiple accounts, which might not be desired.
2022-02-01 10:42:31 +09:00
nicolas.dorier
50d4b55f73
Warning if not using 'simple using' 2022-01-14 17:50:29 +09:00
nicolas.dorier
7a787fc945
Rename UI controllers 2022-01-14 13:46:03 +09:00
Nicolas Dorier
04b8eafacb
Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
d11n
e2d0b7c5f7
Store centric UI: Part 3 (#3224)
* 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>
2021-12-31 16:36:38 +09:00
Nicolas Dorier
ed5b159fb6
Use ArgumentNullException.ThrowIfNull everywhere (#3239) 2021-12-28 17:39:54 +09:00
nicolas.dorier
c0e9f91bdc
Fix warnings 2021-12-27 13:58:18 +09:00
Dennis Reimann
3a59e2a5c4 Cache resolved store items in HTTP context 2021-12-21 09:24:09 +01:00
Nicolas Dorier
bd2f35a241
Remove Ethereum support (#3182) 2021-12-11 14:31:41 +09:00
nicolas.dorier
35aad4ebf9
Remove Logs static singletons 2021-11-23 13:55:34 +09: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
262798d577
Refactor by adding extension FindPayoutHandler (#2984) 2021-10-18 15:00:38 +09:00
nicolas.dorier
ef70f4d547
Simplify code with PaymentMethodId.TryParse 2021-09-24 14:21:30 +09:00
Andrew Camilleri
8c061b1f07
Attempt cover scenarios of switching back to Bitcoin only after taint (#2881) 2021-09-24 14:16:25 +09:00
Kukks
d5019f61ce Expose ExplorerClientProvider to plugins via interface 2021-07-12 14:17:25 +02:00
Nicolas Dorier
c551e5cd0a
Make sure to only select accounted payments where we should (#2523) 2021-05-14 16:16:19 +09:00
nicolas.dorier
9b24e9378f
Explicitely disallow \ for in filename 2021-03-19 20:22:24 +09:00
nicolas.dorier
779f21a1ca
Make sure cookie are HttpOnly 2021-03-19 20:09:55 +09:00
nicolas.dorier
73d70aa5e5
Better validate file names 2021-03-19 18:55:21 +09:00
Nicolas Dorier
7e714f1ef8
Refactor how we handle and validate LN ConnectionStrings (#2314)
* 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
2021-03-02 11:11:58 +09:00
Andrew Camilleri
49ae62b02e
Use library for Payjoin Sender (#2158)
* Use library for Payjoin Sender

* update payjoin sender to use new package and reduce code

* fix using statements
2021-03-01 22:44:53 +09: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