Commit Graph

114 Commits

Author SHA1 Message Date
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
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
0e07fcc706 fixes and adapt 2020-08-28 09:00:14 +02:00
Kukks
7ca74aeea7 Add API Keys Application identifier
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.
2020-08-28 09:00:13 +02:00
Matthew
ccfb97612e forwarded filter for PullPaymentDataId in GetPayoutInPeriod 2020-07-06 15:49:39 -07: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
be44c3f9c2
Isolate OnModelCreating in Data classes (#1702) 2020-06-27 21:55:16 +09:00
nicolas.dorier
ae9fae1f7d
Consolidate tables before release 2020-06-25 15:43:45 +09:00
nicolas.dorier
5e8b379c50
Add invoice refund 2020-06-25 15:31:46 +09:00
nicolas.dorier
d03124dfba
Add an approval state to pull payments 2020-06-25 13:35:10 +09:00
nicolas.dorier
fdc11bba8d
Remove old unused refund table 2020-06-25 13:34:25 +09:00
Andrew Camilleri
dc5d8a6cb7
Refresh UI notifications automatically on update (#1680)
* Refresh UI notifications automatically on update

* make notif timeago live

* pass cancellation token

* Update InvoiceEventData.cs
2020-06-24 10:23:16 +02:00
Nicolas Dorier
8230a408ac
Add pull payment feature (#1639) 2020-06-24 10:34:09 +09:00
rockstardev
09a72f2cfb Cascade delete notifications for user 2020-06-14 23:49:08 -05:00
rockstardev
2f4967a23a Limiting Notification string fields 2020-06-14 23:49:08 -05:00
rockstardev
e834cd7595 Add Notification Entity migration 2020-06-14 23:49:08 -05:00
rockstardev
50e1e2d982 Standardizing DbSet properties, reducing whitespace 2020-06-14 23:49:08 -05:00
rockstardev
6ddb20d022 Foundation for events to propagate notifications 2020-06-14 23:49:08 -05:00
Andrew Camilleri
79b034b505
GreenField: Add properties to Store API (#1573)
* GreenField: Add properties to Store API

* Update StoreBaseData.cs

* fix api

* fix swagger
2020-05-24 04:13:18 +09:00
Andrew Camilleri
5b3b96b372
GreenField: Payment Requests CRUD (#1430)
* GreenField: Payment Requests CRUD

* fixes

* fix swagger

* fix swag

* rebase fixes

* Add new permissions for payment requests

* Adapt PR to archive

* fix tst

* add to contains policxy

* make decimals returned as string due to avoid shitty language parsing issues

* do not register decimal json converter as global

* fix cultureinfo for json covnerter

* pr changes

* add json convertet test

* fix json test

* fix rebase
2020-05-20 02:59:23 +09:00
Nicolas Dorier
5a9d1e3257
Merge pull request #1560 from Kukks/archive-pr
Archive Payment reqeusts
2020-05-10 00:51:59 +09:00
Kukks
8fa65408ed Archive Payment reqeusts
closes #1588
2020-05-08 12:33:47 +02:00
Kukks
e5a3ef3e22 Archive Invoice 2020-05-07 12:50:07 +02:00
Kukks
85517b0344 GreenField: Prep store for more data
refactored things around a bit to make it cleaner for when we add more properties to the store model
2020-04-30 16:43:16 +02:00
Andrew Camilleri
3a2970a495
Label Factory (#1516)
* Label Factory

* fix typo and format
2020-04-28 16:53:34 +09: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
nicolas.dorier
7434163848
Persist offchain transactions 2020-04-16 14:36:50 +09:00
nicolas.dorier
c73c34dfaa
Persisting locked input and outpoints 2020-04-13 16:06:07 +09:00
nicolas.dorier
a3a9361ba5
Persist the Delayed Broadcaster 2020-04-13 16:00:33 +09:00
Nicolas Dorier
79a0f97abb
Merge pull request #1432 from Kukks/api/permission-blob
GreenField: Switch to Blob for API Keys
2020-04-06 17:42:32 +09:00
Kukks
c6d75de3d7 GreenField: Switch to Blob for API Keys 2020-04-02 09:32:22 +02:00
Kukks
2e3a0706ee RBF Protection & Handling 2020-03-27 10:45:12 +01:00
Kukks
36bd76248b Allow Pay Button to work on Apps
This PR allows you to use the pay button generator to create buttons that target apps. This means that you can generate an invoice that is linked to an item on the POS/Crowdfund (targeting the item is optional). The POS/Crowdfund item amount -> invoice creation amount validation works too so that the user cannot modify the amount of a perk using just html ( fixes #1392 )
2020-03-24 23:43:47 -05:00
nicolas.dorier
29a807696b
Refactor permissions of GreenField 2020-03-19 23:43:51 +09:00
Kukks
5e15dd97b3 fix sqlite again
closes #1287
Seems like a merge conflict removed the fix for sqlite datetimeoffsets
2020-03-09 09:44:44 +01:00
Kukks
0a8b303c11 add label for api keys, make api keys without -, fix null exception on authorize 2020-02-25 14:43:53 +01:00
Andrew Camilleri
276a9a95f9
Remove OpenIddict (#1244) 2020-02-25 00:40:04 +09:00
Andrew Camilleri
fa51180dfa
Api keys with openiddict (#1262)
* Remove OpenIddict

* Add API Key system

* Revert removing OpenIddict

* fix rebase

* fix tests

* pr changes

* fix tests

* fix apikey test

* pr change

* fix db

* add migration attrs

* fix migration error

* PR Changes

* Fix sqlite migration

* change api key to use Authorization Header

* add supportAddForeignKey

* use tempdata status message

* fix add api key css

* remove redirect url + app identifier feature :(
2020-02-24 22:36:15 +09:00
Andrew Camilleri
1ceb5cb576 Fix sqlite madness (#1293)
* Need to reference Microsoft.EntityFrameworkCore.Design else you can't generate migrations
* fix design time migrations issues
* update snapshot
```
Your startup project 'BTCPayServer.Data' doesn't reference Microsoft.EntityFrameworkCore.Design. This package is required for the Entity Framework Core Tools to work. Ensure your startup project is c
orrect, install the package, and try again.
```
*
2020-01-19 21:57:50 +09:00
nicolas.dorier
4ac79a7ea3
Fixing SQLite in Invoices page (Fix #1287) 2020-01-17 21:45:20 +09:00
nicolas.dorier
629dfcf152
Cleanup netcore21 specific code 2020-01-12 13:30:54 +09:00
nicolas.dorier
8bcb2381a0
Comment code to generate MySql migration scripts 2019-12-23 15:03:05 +09:00
nicolas.dorier
281a2461ad
Refactor authorizations 2019-10-14 00:24:41 +09:00
nicolas.dorier
275fbc81e7
Prepare BTCPayServer.Data for .netcore 3.0 2019-10-03 16:36:02 +09:00
nicolas.dorier
d9cd00f49a
Make tests more resilient 2019-09-06 18:29:12 +09:00
nicolas.dorier
f257f9f91d
[Refactor] Move SQL classes in their own assembly 2019-08-30 18:22:13 +09:00