Commit Graph

366 Commits

Author SHA1 Message Date
rockstardev
8947f13dbe Deleting legacy DBriize database if present 2021-01-04 22:35:00 -06:00
Nicolas Dorier
0929857b12
Attempt to solve webhooks disappearing (#2178) 2021-01-05 12:38:12 +09:00
nicolas.dorier
f64f86fbb6
Make sure the invoice migration loop can be interrupted 2020-12-28 19:13:00 +09: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
Umar Bolatov
16e5e2d757
Add ability to associate custom CSS with a pull payment 2020-12-08 18:25:58 -08:00
nicolas.dorier
18e68d04f9
Rename invoice states and payment states 2020-11-23 18:28:35 +09:00
nicolas.dorier
07c5c2972d
Add callback doc 2020-11-16 12:13:27 +09:00
nicolas.dorier
df79c2cf48
Improve tests of webhooks 2020-11-14 13:39:44 +09:00
nicolas.dorier
94bcbeb604
Add Greenfield API 2020-11-13 14:15:03 +09:00
nicolas.dorier
f3611ac693
Add Webhooks in store's settings 2020-11-08 15:57:24 +09:00
nicolas.dorier
c967f91abb
Move some code out of InvoiceNotificationManager into InvoiceEventSaverService 2020-11-06 22:24:02 +09:00
nicolas.dorier
a30456a92d
Fix warnings 2020-10-26 14:19:05 +09:00
Andrew Camilleri
e3a0fe88c1
Fix LN invoices (#1955)
* Fix LN invoices

This commit adds more to the previous LN fix in the case of a partial payment to an invoice. While it generated a new LN invoice after 1 partial payment was made, there were some new issues uncovered:
* Any other subsequent partial payments was not listened to  and did not generate an invoice ( fixed by listeneing to received payment event and makng sure that the status was already set `to partialPaid`)
* Any other subsequent partial payments caused a DbConcurrency error and did not generate an invoice ( Fixed in `MarkUnassigned`)
2020-10-17 08:57:21 +02:00
rockstardev
e47359129e Fixing returned version string, trimming leading v 2020-10-05 23:09:05 -05:00
Kukks
713a1f03e9 Fix warnings 2020-09-29 16:47:05 -05:00
Nicolas Dorier
abd0ba49ca
Merge pull request #1875 from dennisreimann/invoice-notification-email
Invoice notification email improvements
2020-09-19 11:16:49 +09:00
Nicolas Dorier
62f00fa970
Merge pull request #1886 from Kukks/invite-link
Allow admins to invite new users
2020-09-19 11:15:38 +09:00
Kukks
8a3c751c10 Add more labels (payment requests, apps, better payout label) 2020-09-17 16:39:55 +02:00
Dennis Reimann
45ba4675fc
Fix async void usage
https://github.com/davidfowl/AspNetCoreDiagnosticScenarios/blob/master/AsyncGuidance.md#async-void
2020-09-16 14:25:48 +02:00
Dennis Reimann
79c685c99b
Invoice notification email improvements 2020-09-16 14:25:47 +02:00
Dennis Reimann
1c5567225c
Don't send mail for expired invoices 2020-09-16 14:25:46 +02:00
Kukks
371b33a2e1 Allow admins to invite new users
* This refactors the email sending so that all the logic related to users and emails are now contained in one location.
* The Reset password screen has been updated from its ugly plain self to use the same layout as the login.
* An admin can now create a new account without specifying a password. A link is generated that can be given to the intended user to configure the password. If emails are configured, it also sends an email
* An admin can now create accounts that still require the user to verify their if the setting is enabled from the server settings. A link is generated that can be given to the intended user to configure the password. If emails are configured, it also sends an email.
* The above features can be used in conjunction: An email will have to verify their email through a link. Once verified, the user is redirected to setting the password.
* When an email has been verified OR a password has been set, users are now redirected to the login page with the email filled in and a success status message shown instead of a dedicated thank you page.
2020-09-16 08:54:24 +02:00
Kukks
98c4b658c4 Add invoice event severity
closes #1681
https://i.imgur.com/eyMO9M3.png
2020-09-01 18:19:49 +02:00
nicolas.dorier
b2ff041ec0
Create Metadata property for InvoiceEntity, migrate all data without logic there 2020-08-26 21:36:31 +09:00
Kukks
d96bd15b3b
add status and refactor 2020-08-26 21:36:30 +09:00
Kukks
26aac6c45d Do not crash UI and background services after switching to BItcoin Only when you have altcoin payments 2020-08-09 16:17:16 +02:00
rockstardev
16eedf4153 Deducing if to perform update check from update url configuration 2020-08-03 03:17:04 -05:00
rockstardev
c18167889d Adding update related options and using them in HostedService 2020-08-03 03:17:04 -05:00
rockstardev
adefaf2fa8 Ensuring that only tags that match release format raise notification
Utilizing the same regex used on circleci
2020-08-03 03:17:04 -05:00
rockstardev
c9d830f9ae Logging exceptions and unsuccessful http calls 2020-08-03 03:17:04 -05:00
rockstardev
9e70bb448a Fixes based on feedback 2020-08-03 03:17:04 -05:00
rockstardev
53f9c22fb7 Refactoring to exposing related classes 2020-08-03 03:17:04 -05:00
rockstardev
1b3e40fd70 Fixing typo 2020-08-03 03:17:04 -05:00
rockstardev
dc3c130162 Initializing Cts with class, preventing race condition 2020-08-03 03:17:04 -05:00
rockstardev
ea7231ff26 Adding hosted service that will optionally check for new version once a day 2020-08-03 03:17:04 -05:00
rockstardev
f88c02cccd Removing unused usings, readonly fields where possible 2020-06-28 22:07:48 -05:00
rockstardev
b6c7af32de Cleaning up bom from cs files 2020-06-28 21:44:35 -05:00
nicolas.dorier
51514252b6
Run dotnet format 2020-06-28 17:55:27 +09:00
nicolas.dorier
d03124dfba
Add an approval state to pull payments 2020-06-25 13:35:10 +09:00
Nicolas Dorier
8230a408ac
Add pull payment feature (#1639) 2020-06-24 10:34:09 +09:00
Andrew Camilleri
12e2b93ac9
Add invoice notifications (#1674)
* Add invoice notifications

* fixeth le order

* comment-to-code auto commit

* reduce notifications
2020-06-22 16:32:51 +09:00
rockstardev
741b93dc04 Removing obsolete NotificationDbSaver hosted service 2020-06-15 01:22:09 -05:00
rockstardev
0dab96f0a6 Moving Notification to dedicated Service namespace 2020-06-14 23:49:08 -05:00
rockstardev
342f63a625 Directly casting to NotificationEvent, evading null case 2020-06-14 23:49:08 -05:00
rockstardev
f52c6b65ce Switching to using registered IMemoryCache 2020-06-14 23:49:08 -05:00
rockstardev
ffa04b625a Changing case for private methods 2020-06-14 23:49:08 -05:00
rockstardev
0c170fc399 Caching of notifications, refactoring NotificationManager into singleton 2020-06-14 23:49:08 -05:00
rockstardev
d1383d78c5 Disconnecting NotificationBase from Event, introducing NotificationSender 2020-06-14 23:49:08 -05:00
rockstardev
b53cb50a91 Pkzipping Notification blobs to keep with convention 2020-06-14 23:49:08 -05:00
rockstardev
294dad01c3 Switching to UserManager for fetching user id 2020-06-14 23:49:08 -05:00
rockstardev
73588ea22b Generalizing saving to database and registration of NotificationEventBase classes 2020-06-14 23:49:08 -05:00
rockstardev
95a751c505 Displaying last 5 notifications in Layout 2020-06-14 23:49:08 -05:00
rockstardev
654bb0c8ca Displaying number of unread messages in _Layout.cshtml 2020-06-14 23:49:08 -05:00
rockstardev
4bc0fd98ca Saving notifications to database and loading them from there 2020-06-14 23:49:08 -05:00
rockstardev
9206f0cd2e Handling notifications event and rendering them through controller 2020-06-14 23:49:08 -05:00
rockstardev
e834cd7595 Add Notification Entity migration 2020-06-14 23:49:08 -05:00
rockstardev
6ddb20d022 Foundation for events to propagate notifications 2020-06-14 23:49:08 -05:00
Kukks
67c3581989 Add order id to IPN
fixes #1598
2020-06-07 08:31:42 +02:00
nicolas.dorier
9e16b506e5
Small esthetic refacotring 2020-06-01 13:10:21 +09:00
Kukks
70d4e98dff Make App Inventory Updater run updates in order
followed the same logic we used in the new auto labelling
2020-04-29 14:51:37 +02:00
Andrew Camilleri
b31fb1a269
Auto label utxos based on invoice and payjoin (#1499)
* Auto label utxos based on invoice and payjoin

This PR introduces automatic labelling to transactions.
* If it is an incoming tx to an invoice, it will tag it as such.
* If it was a payjoin tx , it will tag it as such.
* If a transaction's inputs were exposed to a payjoin sender, we tag it as such.

* wip

* wip

* support in coinselection

* remove ugly hack

* support wallet transactions page

* remove messy loop

* better label template helpers

* add tests and susbcribe to event

* simplify data

* fix test

* fix label  + color

* fix remove label

* renove useless call

* add toString

* fix potential crash by txid

* trim json keyword in manual label

* format file
2020-04-28 15:06:28 +09:00
Dennis Reimann
c205e41072 Rename modern to default theme 2020-04-10 09:18:07 +02:00
Andrew Camilleri
d47e225dce
Fix email sending on registration crash (#1454) 2020-04-10 15:59:39 +09:00
nicolas.dorier
1c0d713b00
Catch all error thrown by EndAccept 2020-04-09 20:36:19 +09:00
nicolas.dorier
70c80f4d44
Remove useless line 2020-04-09 20:27:24 +09:00
nicolas.dorier
e3f6de8472
Remove warnings, replace BIP79 by Payjoin, Fix strange error in Accept loop 2020-04-09 20:25:17 +09:00
nicolas.dorier
f57db12c09
Document downside of socks proxy 2020-04-09 18:56:30 +09:00
nicolas.dorier
0d821ff4db
Connection: close when using the internal proxy, fix gateway errors with connections in limbo 2020-04-09 18:49:30 +09:00
nicolas.dorier
6927d81175
Implement Http Tor proxy as a internal http proxy 2020-04-09 17:38:55 +09:00
nicolas.dorier
fd026a9733
Refactor server-side 2020-04-05 12:02:36 +09:00
Kukks
e99767c7e2 Greenfield API: Create User
Slightly big PR because I started refactoring to reduce code duplication between the UI based business logic and the api one.
2020-03-17 08:21:27 +01:00
nicolas.dorier
65afc9f7b2
Make sure dashboard is initialized from the beginning 2020-03-10 17:42:53 +09:00
hannes
f097ecdc80
fix: remove ipn via email #1241 (#1337)
* fix: remove ipn via email #1241

* fix: remove ipn via email #1241
2020-02-24 21:21:03 +09:00
rockstardev
29d51ad2a2 Adding 1 second leeway for expiration 2020-02-21 17:09:03 -06:00
rockstardev
1be6408246 Adding logging to try and catch situations where invoice is not expired 2020-02-21 17:09:03 -06:00
nicolas.dorier
f2aab4cf03
Add warning if fail to load rates from cache 2020-02-16 23:04:48 +09:00
nicolas.dorier
c03dc48fe9
Do not crash if can't load rate cache 2020-02-16 22:07:56 +09:00
nicolas.dorier
25b733ca7f
Remove knowledge of ExchangeName from BackgroundRateFetcher 2020-01-18 19:42:46 +09:00
Andrew Camilleri
025da0261d new feature: Wallet Receive Page (#1065)
* new feature: Wallet Receive Page

closes #965

* Conserve addresses by waiting till address is spent before generating each run

* fix tests

* Filter by cryptocode before matching outpoint

* fix build

* fix edge case issue

* use address in keypathinfo directly

* rebase fixes

* rebase fixes

* remove duplicate code

* fix messy condition

* fixes

* fix e2e

* fix
2020-01-18 14:12:27 +09:00
nicolas.dorier
9b165de5e6
Remove CoinAverage integration 2020-01-17 14:29:22 +09:00
nicolas.dorier
7d545ca682
Remove ability to set custom cache, fix coinaverage not really using coinaverage 2020-01-17 14:16:12 +09:00
nicolas.dorier
5dbdb4b399
Keep coinaverage compatibility, improve UX, hardcode feed provider supported exchanges 2020-01-13 23:37:01 +09:00
Kukks
58d9a48787
CoinGecko Rate Provider
The CoinGecko rate provider is similar to the bitcoin average one, in that you can ask it for a rate from its aggregated sourcing or you can get rates from specific exchanges. I've added support for both.
I haven't integrated it or replaced coinaverage just to see if we should use it as the default and switch everyone to it or what other action to take.
2020-01-13 20:20:00 +09:00
nicolas.dorier
d3408b91be
bump libraries 2020-01-12 15:32:26 +09:00
nicolas.dorier
731341b749
Do not preemptively fetch rates of all exchanges 2019-12-26 14:54:26 +09:00
Andrew Camilleri
4d7480db15 Liquid & Liquid Assets Support (#1118) 2019-12-24 16:20:44 +09:00
nicolas.dorier
47eb087d1b
Rename CanGenerateWallet to CanUseHotWallet, small refactoring on generatewallet 2019-12-18 22:28:03 +09:00
Kukks
6706658377 add policy to restrict generate wallet usage 2019-12-16 09:32:43 +01:00
Dennis Reimann
7ccf0c3612
UI: Add custom theme file option
This adds a "Custom Theme CSS file" to the "Server settings: Theme" page. It works similar to the custom bootstrap and creative start fields, but is only added to the head in case it is set.

The main idea here is that users would choose one of our predefined themes and have the option to override specific values. The other apporach would be to let the custom theme replace the predefined one, but this could lead to issues in case we extend the set of variables, which would be unset then.
This way users can copy a predefined theme and override all variables or just the ones they want to customize.

The help icon besides the label links to a page in the docs I'm currently working on.
2019-11-22 21:09:18 +01:00
nicolas.dorier
4c349803b6
Use Channel instead of blocking collection for the Invoice Watcher 2019-11-16 19:12:26 +09:00
rockstardev
c6ef6fc17d Removing bootstrap and creative start vendor dirs, moving to main 2019-11-14 20:41:53 -06:00
Dennis Reimann
6dd3c79c23
Move themes and bootstrap 2019-11-14 18:42:46 +01:00
Dennis Reimann
29465cbadc
Use "modern" theme as example 2019-11-14 18:42:44 +01:00
Dennis Reimann
fdc1aa25e4
Use variable based bootstrap and creativestart
fix
2019-11-14 18:42:40 +01:00
nicolas.dorier
57b87a55bc
Show Bitcoin RPC service 2019-11-07 14:33:10 +09:00
nicolas.dorier
55dd8da284
Redirect first run to register, redirect unlogged to login 2019-11-06 15:19:14 +09:00
nicolas.dorier
cd5b334a00
Make sure renci ssh does not prevent btcpay from closing 2019-10-26 23:40:35 +09:00
nicolas.dorier
12264d8e74
Make sure SSHClient Disconnect does not hang if a cancellationToken is passed 2019-10-21 18:43:53 +09:00
nicolas.dorier
3c7137830e
Make sure that the SSL connection does not prevent btcpayserver from restarting 2019-10-21 16:34:26 +09:00
nicolas.dorier
59afc05661
Log hosted services exiting 2019-10-19 14:12:43 +09:00
nicolas.dorier
fee106abef
Remove possible NRE when app start 2019-10-19 13:50:52 +09:00
nicolas.dorier
536f98b566
Fix entity framework queries to work in netcoreapp3.0 2019-10-06 15:48:12 +09:00
Kukks
59839a3332 make sure networks are abstracted properly 2019-09-21 16:39:44 +02:00
nicolas.dorier
3dada3c464
Remove SSH warning if no SSH settings set 2019-09-20 15:26:09 +09:00
nicolas.dorier
42dda56eea
Retry SSH connection later if it fails 2019-09-19 16:54:07 +09:00
nicolas.dorier
c247e275f6
Make sure NotificationUrl and RedirectUrl are of type Uri 2019-09-04 18:20:36 +09:00
nicolas.dorier
f17a359893
Fix NotificationUrl and RedirectUrl templating 2019-09-04 18:01:26 +09:00
Andrew Camilleri
d99beb9811 New feature: Apps limited inventory (#961) 2019-09-02 22:37:52 +09:00
nicolas.dorier
cb8c077c1e
better error message for bad ssh config 2019-08-27 23:39:17 +09:00
nicolas.dorier
9688798a4a
Asyncify SSH access, do not show SSH service if ssh is not well configured 2019-08-27 23:30:25 +09:00
Andrew Camilleri
b29b46bbc7 Add policy to allow internal lightning node for non-admins (#975)
Partially related to #204 (but no actual management and accounting of funds in different stores occurs)
2019-08-20 17:38:15 +09:00
nicolas.dorier
3dac7ef3f3
Fix dynamic dns 2019-07-25 23:26:56 +09:00
nicolas.dorier
63472d54d7
Can configure multiple dynamic dns 2019-07-25 18:29:18 +09:00
nicolas.dorier
db57b5ae80
Fix DynDNS renewal 2019-07-25 16:37:39 +09:00
nicolas.dorier
8896d89908
Add Dynamic DNS support 2019-07-24 17:59:30 +09:00
nicolas.dorier
36046f08f7
Use Migration startup task when starting BTCPay instead of hosted service. 2019-07-08 12:12:39 +09:00
Kukks
6cab02cd99 Multiple domains for apps in BTCPay
closes #887
2019-06-25 20:41:32 +02:00
nicolas.dorier
13c03cc0c2
Removing dependency on NetworkProvider from InvoiceWatcher 2019-06-07 13:34:38 +09:00
nicolas.dorier
281280d3ec
Fix crash which can happen during export if someone remove support for a network, inject Network inside paymentdata 2019-06-07 13:31:11 +09:00
nicolas.dorier
bea08e5cfd
Refactor: Remove uneeded dependencies to PaymentMethodHandlerDictionary 2019-06-04 10:17:26 +09:00
nicolas.dorier
ae4b2ab1fd
Fix #875 2019-06-03 16:46:35 +09:00
Andrew Camilleri
81dae7d350 BTCPay Abstractions: Move PaymentMethod specific logic to their handlers (#850) 2019-05-29 23:33:31 +09:00
Andrew Camilleri
d3e3c31b0c Btcpay abstract BTCPayNetwork -- Alternative PR to #865 (#868)
* BitcoinSpecificBtcPayNetwork - abstract BTCPayNetwork

* some type fixes

* fix tests

* simplify fetching handler in invoice controller

* rename network base and bitcoin classes

* abstract serializer to network level

* fix serializer when network not provided

* fix serializer when network not provided

* fix serializer when network not provided

* try fixes for isolating pull request
2019-05-29 18:43:50 +09:00
rockstardev
b300404bc7 Extending invoice monitoring if max confirmation count not reached 2019-05-25 17:20:17 -05:00
Nicolas Dorier
512ee16620
Refactor invoice entity to not have to inject the NetworkProvider (#858) 2019-05-24 22:22:38 +09:00
rockstardev
e6c794d68f Moving update of confirmation count to InvoiceWatcher 2019-05-12 14:56:13 +09:00
nicolas.dorier
e5704abfb3
Fix migration from old version to new version of WalletKeyPathRoots 2019-05-09 00:55:48 +09:00
nicolas.dorier
914eaaaa51
Refactor DerivationStrategy to DerivationSchemeSettings 2019-05-09 00:55:44 +09:00
nicolas.dorier
f93d1173e2
Show tor exposed bitcoin node 2019-05-07 13:58:55 +09:00
rockstardev
13e330fa65 Better UI for selection of app to be displayed on root 2019-04-12 00:13:14 -05:00
rockstardev
827b133534 Allowing for displaying of app directly on website root 2019-04-11 16:30:23 -05:00
nicolas.dorier
5190639b77 Simplify InvoiceWatcher logic and remove unused code 2019-04-08 13:28:13 +09:00
nicolas.dorier
c767a49f2d Increase notitifcation timeout to 1 minute, make sure that BackgroundJobScheduler is correctly cancelling tasks 2019-04-05 14:58:25 +09:00
nicolas.dorier
ea8196b532 Do not use HttpClient singleton for the InvoiceNotifcationManager 2019-04-05 14:31:09 +09:00
nicolas.dorier
767eca97cb Fix tests 2019-03-31 13:31:50 +09:00
nicolas.dorier
e5a26cfca8 Update dependencies 2019-03-31 12:08:08 +09:00
nicolas.dorier
978b7d930e Catch operation cancelled exception on the BackgroundJobScheduler 2019-03-29 18:09:54 +09:00
nicolas.dorier
5d9da82d8e fix build 2019-03-27 18:58:56 +09:00
nicolas.dorier
0bd02a9272 Fix some exceptions raised if port is already used 2019-03-27 18:56:43 +09:00
nicolas.dorier
abbdbda03a Add Bitbank provider 2019-03-20 00:49:44 +09:00
nicolas.dorier
e3a8892d24 Check tor services in the background 2019-03-17 21:07:24 +09:00
Kukks
053c2da9f1 use thememanager instead of view component 2019-03-09 16:29:04 +01:00
nicolas.dorier
051248f2fc Add CancellationToken to GetRatesAsync and propagate it from the controllers to the rate fetcher 2019-03-05 17:09:17 +09:00
nicolas.dorier
1d3f144d21 Support relative path for external services, simplify the code in Services 2019-03-01 13:20:21 +09:00
Kukks
ad25a2ed08 Add payment requests 2019-02-25 17:56:28 +09:00
nicolas.dorier
010c653995 Create EventHostedServiceBase and make AppHubStreamer use this 2019-02-20 12:27:10 +09:00
nicolas.dorier
50c8525012 Moving CrowdfundSettings in its own file 2019-02-19 13:07:10 +09:00
nicolas.dorier
dc46fd225a Migrate old crowdfund deployment to the new tagging system 2019-02-19 12:53:24 +09:00
nicolas.dorier
c071c81403 Pass the whole Entity object to internal InvoiceEvent 2019-02-19 12:08:07 +09:00