Compare commits

..

681 Commits

Author SHA1 Message Date
4c349803b6 Use Channel instead of blocking collection for the Invoice Watcher 2019-11-16 19:12:26 +09:00
35a4278ae8 Merge pull request from britttttk/app-button
Hide View button in crowdfund
2019-11-16 18:58:11 +09:00
06365b7b73 Merge pull request from Kukks/register-login-secure-lock
Do not allow login or register over an insecure connection
2019-11-16 18:15:16 +09:00
f31e013986 bump 2019-11-16 18:03:16 +09:00
fe1df743ce bump nbx 2019-11-16 17:22:51 +09:00
22ffd48cd4 refactor 2019-11-16 08:57:16 +01:00
c83bcd259d Testing happy messages, fix approval button 2019-11-16 15:20:54 +09:00
8ebac28ccf Fix tests 2019-11-16 15:07:02 +09:00
4e5001d7ef Delete password from the lnd seed backup 2019-11-16 14:07:43 +09:00
84fe14a1ed Test LND Seed Backup service and Logs. Use the Confirm View instead of poppup 2019-11-16 14:06:37 +09:00
6828730313 Merge pull request from dennisreimann/theme-fixes
Theme fixes
2019-11-16 12:36:50 +09:00
e540079220 Merge pull request from dennisreimann/main-bundle-script-order
Fix script order in main bundle
2019-11-16 12:36:03 +09:00
e99f806b66 Merge pull request from dennisreimann/page-titles
Page title fixes
2019-11-16 12:35:45 +09:00
b452f1d125 Limit custom table styles to small tables
Otherwise it overrides to many styles so that i.e. font-sizes with th .h*-classes do not work anymore.
2019-11-15 15:15:22 +01:00
f0a9d209a5 Fix bootstrap reference in cart bundle 2019-11-15 15:15:21 +01:00
984aa2912a Fix script order in main bundle
creative.js relies on ScrollReveal being present on initialization, so it has to be included after scrollreveal.min.js
2019-11-15 15:15:20 +01:00
c8937f6d46 POS app theme fixes 2019-11-15 15:15:19 +01:00
cb849ab23e Light/dark color fixes
fix
2019-11-15 15:15:18 +01:00
3bca3427eb Consistent use of page title on Pay Button page 2019-11-15 14:44:08 +01:00
a127b13db1 Add missing payment request page titles 2019-11-15 14:43:36 +01:00
a2f608266b Fix bootstrap reference in cart bundle 2019-11-15 14:01:18 +01:00
05f8b8d8af Fix script order in main bundle
creative.js relies on ScrollReveal being present on initialization, so it has to be included after scrollreveal.min.js
2019-11-15 13:56:03 +01:00
f1cef81d76 Do not allow login or register over an insecure connection 2019-11-15 12:39:17 +01:00
e1bf376f10 Mark up alert-links for better display 2019-11-15 11:24:27 +01:00
9298eab30d Improve QR code display on dark background 2019-11-15 11:23:52 +01:00
584528f903 Improve pay button display on dark background 2019-11-15 11:08:10 +01:00
3501920956 Set apart theme select from custom css file references 2019-11-15 11:06:09 +01:00
65a867e82d Fix css references on bootstrap kitchensink page 2019-11-15 11:05:12 +01:00
2bfea50014 Update NBXplorer 2019-11-15 18:53:20 +09:00
89539fca01 Fix build 2019-11-15 18:20:10 +09:00
240f6fa45a Allow /rates to pass storeId 2019-11-15 18:10:14 +09:00
c004065eea Apply some lipstick on the lnd seed backup 2019-11-15 17:55:55 +09:00
1cfba82d77 Hide button when missing required fields 2019-11-14 23:58:38 -07:00
3bdcbd8907 Small adjustment to make tables look better 2019-11-15 15:22:01 +09:00
fd53811fdd Adjust base font-size to match old style 2019-11-15 14:45:53 +09:00
5eeda40098 Addressing CSS inconsistencies compared to old design
Fixes: 
2019-11-14 22:48:15 -06:00
7bce316e78 Merge branch 'master' into feature/lndseedbackup 2019-11-14 21:02:56 -06:00
68f172b9ef Switching back to v as prefix, other scripts assume it's presence
z wouldn't work because some scripts in btcpayserver-docker re-append v as prefix to find tag
2019-11-14 21:00:39 -06:00
9b3e7338ba Fixing broken CrowdfundTests.CanContributeOnlyWhenAllowed test 2019-11-14 20:56:28 -06:00
c6ef6fc17d Removing bootstrap and creative start vendor dirs, moving to main 2019-11-14 20:41:53 -06:00
e4c797eaa7 Merge pull request from dennisreimann/ui-css-refactoring
UI: Support themes via CSS variables
2019-11-14 20:28:01 -06:00
bdca51a178 Fine tuning the classic theme 2019-11-14 21:10:17 +01:00
e147ce8606 Minor layout improvements 2019-11-14 18:45:35 +01:00
830286ecc1 Center content on forgot password page 2019-11-14 18:44:14 +01:00
bc56cab488 Fix colors in wallet send view 2019-11-14 18:44:13 +01:00
dd683db6d5 Bump up font size and spacings in classic theme 2019-11-14 18:44:12 +01:00
5436999b13 Fix welcome layout background 2019-11-14 18:44:11 +01:00
29946763ba Move theme switch to top 2019-11-14 18:42:58 +01:00
7160f7dc22 Add bootstrap kitchensink
Can be used to control the look of all elements:
/_bootstrap_kitchensink.html?theme=casa
2019-11-14 18:42:57 +01:00
e44db30ddb Finetune color settings
fix
2019-11-14 18:42:56 +01:00
458b2fd72e Register page fixes 2019-11-14 18:42:55 +01:00
66ffa5f987 Rename alpha theme variables to backdrop 2019-11-14 18:42:54 +01:00
dd8caa46c4 Remove modern theme option
For now as it is not really shaped yet.
2019-11-14 18:42:53 +01:00
55de85d829 Casa theme color fixes 2019-11-14 18:42:52 +01:00
10f782aa11 Integrate and adapt new register page 2019-11-14 18:42:51 +01:00
5bb6918465 Add Casa theme draft 2019-11-14 18:42:50 +01:00
205fd3c9ce Use grid consistently 2019-11-14 18:42:49 +01:00
50bf55cbdf Unify section headings 2019-11-14 18:42:48 +01:00
3a9ecd8b33 Dissect css rules and simplify color variables 2019-11-14 18:42:48 +01:00
5942a840b2 Move main bundle files also 2019-11-14 18:42:47 +01:00
6dd3c79c23 Move themes and bootstrap 2019-11-14 18:42:46 +01:00
a25e0ef592 add-theme-picker 2019-11-14 18:42:45 +01:00
29465cbadc Use "modern" theme as example 2019-11-14 18:42:44 +01:00
fdc1aa25e4 Use variable based bootstrap and creativestart
fix
2019-11-14 18:42:40 +01:00
04fbe42bda Merge pull request from bolatovumar/issue-1138
Vary page layout for registering new accounts
2019-11-14 23:58:37 +09:00
57a6949565 Fix View app on Crowdfunding () 2019-11-14 21:13:41 +09:00
bcb85e2084 Errors not working in PointOfSale () 2019-11-14 20:55:18 +09:00
6900964c03 Fix debug log not showing (Fix ) 2019-11-14 18:49:33 +09:00
3d2b8d2969 Merge pull request from bolatovumar/fix-1155
Improve mobile view on new welcome layout
2019-11-14 17:26:58 +09:00
c7da4e3eff Add TestTimeouts 2019-11-14 17:14:08 +09:00
9e31154808 Improve mobile view on new welcome layout
fix 
2019-11-13 18:46:58 -08:00
89353b8e7c Remove svg trash 2019-11-13 18:50:23 +09:00
b8eea53e01 Merge pull request from pavlenex/supporters-dglabs
Add supporter to readme
2019-11-13 18:43:43 +09:00
9bafce8069 Add DG Labs logo to readme 2019-11-13 10:38:31 +01:00
a9de1c2c64 Add link to foundation website 2019-11-13 17:37:57 +09:00
e6505040e0 Missing svg 2019-11-13 16:06:41 +09:00
92bdb20e1c Add new sponsor 2019-11-13 16:04:47 +09:00
c6bba9188b Improve error message for CanUsePosApp 2019-11-13 15:56:58 +09:00
c3a84f6577 Merge pull request from Kukks/bugfix/u2f
Fix U2F bug when using multiple devices
2019-11-13 15:37:14 +09:00
ba54b5aacf Merge pull request from Kukks/ndax
Bump ExchangeSharp, fixes breaking changes and switch to exchangeshar…
2019-11-13 15:36:52 +09:00
e92a15e072 Add logs to find out if tests hang on website getting operational 2019-11-13 15:24:56 +09:00
ad853c6985 Merge pull request from NicolasDorier/nico/remove-trezor
Remove Trezor in AddDerivationScheme
2019-11-13 15:20:12 +09:00
e7ff5c0a4b Remove Trezor in AddDerivationScheme 2019-11-13 15:10:33 +09:00
fef1bde9b6 Merge pull request from NicolasDorier/update/nbxplorerclient
Bump NBXplorer.Client
2019-11-13 14:45:10 +09:00
eb87d7cadc Bump NBXplorer.Client 2019-11-13 13:51:06 +09:00
5394e0a4a0 Merge pull request from Kukks/bugfix/ln-sats
Display proper rate for ln sats feature
2019-11-12 14:01:13 +09:00
0f0b846e04 Merge pull request from bolatovumar/fix-1029
Retain store ids when filtering invoices
2019-11-11 21:00:42 +09:00
ae869489b5 Merge pull request from pavlenex/readme-2
Add CTA at the bottom + fix broken table tag
2019-11-11 20:58:53 +09:00
cdc973cbea fix tests 2019-11-11 11:25:23 +01:00
bae9ca2a7a fix ambigous ref 2019-11-11 10:08:10 +01:00
0df7506ad5 Bump ExchangeSharp, fixes breaking changes and switch to exchangesharp provider for ndax 2019-11-11 07:14:29 +01:00
974101624b fix text 2019-11-10 18:51:51 +01:00
621a7d998d Display proper rate for ln sats feature
fixes 
2019-11-10 18:49:24 +01:00
539c7d6e17 fix for multiple U2F devices 2019-11-10 18:12:20 +01:00
2743641122 hidden challenges rendered 2019-11-10 17:32:28 +01:00
1d08a811e7 Enabling circleci builds on feature tags 2019-11-10 07:00:30 -06:00
c5ca02e48e Js cleanup based on Kukks feedback 2019-11-10 06:22:17 -06:00
bce201038f Including walletunlock.json file in TestData for easier debugging 2019-11-10 06:19:59 -06:00
c24bb443d3 Fixing check for external services that don't specify server 2019-11-10 06:12:32 -06:00
9c165d84ef Removing LND seed information from walletunlock.json 2019-11-10 06:12:32 -06:00
58b834fe9d Displaying information from walletunlock.json if file is present 2019-11-10 06:12:32 -06:00
2b1aac9aa9 Service page for LND Seed Backup 2019-11-10 06:12:32 -06:00
dfdb99165b Vary page layout for registering new accounts
address 
2019-11-09 21:24:19 -08:00
b75eaee6dd Merge pull request from escapedcat/feat/ledger-xpub-help
feat(stores): add ledger specific xpub help
2019-11-10 00:28:05 +09:00
888b06376d Merge pull request from Kukks/xmr-fix
fix moneromoney util
2019-11-10 00:07:27 +09:00
7f6b1e7e6e Merge pull request from bolatovumar/fix-1129
Make sure documentation tooltip link stays inline with label
2019-11-10 00:06:36 +09:00
8dd1efc126 Adding test timeout 2019-11-09 16:57:40 +09:00
9cd64bf81a Inline "allow custom payment amount" checkbox with label 2019-11-08 19:12:52 -08:00
2c14cece6b Make sure documentation tooltip link stays inline with label
close 
2019-11-08 19:12:51 -08:00
11c269693e feat(stores): add ledger specific xpub help
problem: maximum of 20 ledger accounts are being listed in the derivation-scheme select
solution: help users with i.e. multiple ledger accounts by providing link to docs for detailed info on where to find the xpub key manually
2019-11-08 15:24:12 +01:00
ae9b93ca8f Removing useless tool 2019-11-08 22:41:14 +09:00
563e95df7c Fix tests 2019-11-08 21:42:34 +09:00
5b37a9df0b Make sure we don't pass the psbt in GET url 2019-11-08 21:21:23 +09:00
28396206de Show the torrc config when debugging via F5 2019-11-08 17:26:32 +09:00
9d3026f676 Add torrc files in tests 2019-11-08 16:10:49 +09:00
0f7458254e Retain store ids when filtering invoices 2019-11-07 18:14:38 -08:00
2305a0a5c8 Add CTA at the bottom + fix broken table tag 2019-11-07 19:43:25 +01:00
7ce2ddb400 fix moneromoney util 2019-11-07 18:41:10 +01:00
13c8372329 Merge pull request from pavlenex/supporters-final
Add supporters, remove listed alts
2019-11-07 23:17:29 +09:00
8fd7ee0763 Add supporters, remove listed alts 2019-11-07 11:33:11 +01:00
aab7c08500 Unify StatusMessage handling 2019-11-07 18:59:51 +09:00
ff8de47e69 Fix tests 2019-11-07 18:36:45 +09:00
3ff9cc85ef Fix tests 2019-11-07 18:35:47 +09:00
0a2440e14c Fix test 2019-11-07 18:29:52 +09:00
d37abb53f0 Fix status message when a model is passed 2019-11-07 18:20:17 +09:00
656a3956b1 Fix strange message in PaymentRequests (Fix ) 2019-11-07 17:59:35 +09:00
c31e7593b6 Add label to FullyNoded 2019-11-07 17:08:24 +09:00
7be9083220 Update sponsor 2019-11-07 16:46:10 +09:00
b85667a191 Fix status message of PaymentRequest 2019-11-07 16:19:36 +09:00
892d906ac7 Fix tx link in payment request 2019-11-07 16:12:05 +09:00
0277708b2a Fix tor service parsing 2019-11-07 15:58:03 +09:00
d757aa2978 Fix typo 2019-11-07 15:48:56 +09:00
cf7bba9600 Fix services if there is more than one tor external services 2019-11-07 15:41:39 +09:00
a0d498812d bump 2019-11-07 14:35:18 +09:00
29e8783beb Update translations 2019-11-07 14:34:34 +09:00
57b87a55bc Show Bitcoin RPC service 2019-11-07 14:33:10 +09:00
9ff9377bc7 Make sure the recommended fees are different from the network fee rate 2019-11-07 13:45:45 +09:00
163ef031b9 Make sure the recommended fees are different from the network fee rate 2019-11-07 13:35:47 +09:00
1cfdd1489b Merge pull request from bolatovumar/master
Make recommended fee confirmation target configurable
2019-11-07 13:27:03 +09:00
0a9290a980 Make recommended fee confirmation target configurable
Address 
2019-11-06 16:21:33 -08:00
f0c2fb62df Select all link when clicked 2019-11-07 00:13:00 +09:00
24d6532dac Add onion link to login/register 2019-11-06 23:58:04 +09:00
fee1fe22a7 Use better svg version of the logo 2019-11-06 23:25:56 +09:00
d8103f7293 Fix webfont 2019-11-06 21:57:43 +09:00
3d3446e46a Improve design of register/login on mobile 2019-11-06 21:51:10 +09:00
22af4d2836 Because links are not reusable in LightningWalletService, it should not open in a new tab 2019-11-06 21:17:50 +09:00
06b2a3383d Merge pull request from NicolasDorier/fix/maintainence
Improve message in Maintainance page
2019-11-06 16:41:11 +09:00
06c3f01e41 Improve message in Maintainance page 2019-11-06 16:17:03 +09:00
d392880102 Merge pull request from NicolasDorier/ux/login-register
Add sponsor and new design to the login and registration page
2019-11-06 15:29:36 +09:00
55dd8da284 Redirect first run to register, redirect unlogged to login 2019-11-06 15:19:14 +09:00
e76f5b19b1 bump lightning package 2019-11-06 13:20:57 +09:00
5650b8560d Refactor the Header in its own partial view 2019-11-06 13:15:26 +09:00
2d80dbfa8f Custom logo and custom url for checkout page should accept any string (relative path) (Fix ) 2019-11-06 12:02:13 +09:00
c62aeb670a Merge pull request from rockstardev/cifixrefactor
Fixing CircleCi to run external test only in repo context, small refactor of LndServiceViewModel
2019-11-05 09:41:43 -06:00
1a407a2da3 Add sponsor and new design to the login and registration page 2019-11-05 18:01:43 +09:00
72d7e2dc5b Merge pull request from bolatovumar/issue-1111
Improve pay button display options section
2019-11-04 12:04:14 +09:00
a126ec1718 Renaming to LndServiceViewModel, used both by grpc and rest 2019-11-03 13:18:09 -06:00
bf59114a00 Run CircleCi external tests only in context of btcpayserver user & repo 2019-11-03 13:16:21 -06:00
6b587bfc31 Improve pay button display options section
address 
2019-11-03 09:53:09 -08:00
28a2017b65 Merge pull request from dennisreimann/paybutton
More pay button improvements
2019-11-03 20:26:55 +09:00
c3a6e9a799 Merge pull request from Kukks/fix-monero-qr
fix qr code amounts for monero
2019-11-03 20:26:35 +09:00
45c66a167b Merge pull request from Kukks/payment-request-fixes2
fix Payment request "Cancel invoice" button always showing
2019-11-03 20:25:46 +09:00
380629a961 Update BTCPayServer.Lightning 2019-11-03 16:34:14 +09:00
74fdd1358c Update translations 2019-11-03 16:31:01 +09:00
e9d63650b9 bump 2019-11-03 16:18:33 +09:00
9ecb27a9bd Fix and test /api-tokens (fix https://github.com/btcpayserver/woocommerce-plugin/issues/34) 2019-11-03 16:17:28 +09:00
b0ae878ef6 Merge pull request from NicolasDorier/ui/new-confirm
Redesign confirm forms
2019-11-03 15:37:33 +09:00
28cc4facd4 Redesign confirm form 2019-11-03 15:20:25 +09:00
749146ad3c fix Payment request "Cancel invoice" button always showing
The Cancel current invoice button always showed even when there was active invoice
2019-11-02 08:49:19 +01:00
a4ba93d249 fix qr code amounts for monero 2019-11-02 08:41:48 +01:00
7eae1f3b3c More pay button improvements 2019-10-31 11:31:30 +01:00
d66e8f2d13 Removing obsolete StatusMessage 2019-10-31 15:19:38 +09:00
058b768b0a update lightning charge in tests 2019-10-31 14:31:44 +09:00
3425f84507 Merge pull request from NicolasDorier/refactor/statusmessage
[WIP] Refactor StatusMessage and remove ExternalLogin
2019-10-31 14:12:05 +09:00
aad586232c Refactor StatusMessage and remove ExternalLogin 2019-10-31 14:11:33 +09:00
b514533814 Merge pull request from dennisreimann/paybutton
Improve pay button display
2019-10-31 14:01:38 +09:00
3b1f851f8a Improve pay button display
These changes should provide a more solid CSS approach to display the pay button in different scenarios. Also it fixes minor functionality issues like preselecting the merchant-chosen currency in the custom amount and slider dropdown.
2019-10-29 21:08:08 +01:00
99095f25d9 bump clightning 2019-10-29 16:46:22 +09:00
d79a28ac6f Merge pull request from rockstardev/lndseedless
Updating reference to new LND docker image and walletunlock.json path
2019-10-29 15:38:44 +09:00
120fe1ba85 Updating reference to new LND docker image and walletunlock.json path 2019-10-28 23:47:55 -05:00
ad8d8c31ab Merge pull request from Kukks/modal-close-fix
Fix: Close button for modal is broken
2019-10-28 14:26:20 +09:00
3e5ab70583 Fix: Close button for modal is broken
closes 
2019-10-27 08:13:30 +01:00
cd5b334a00 Make sure renci ssh does not prevent btcpay from closing 2019-10-26 23:40:35 +09:00
9a99b3fdc2 Fix bug: Could not delete store 2019-10-26 23:35:55 +09:00
2249ee195a Catch websockets exceptions 2019-10-23 16:11:20 +09:00
93cdbf7a1a Only push the released tag 2019-10-23 15:44:49 +09:00
22fa43f8d6 Version bump 2019-10-23 15:29:37 +09:00
39a6bd15d1 Update translations 2019-10-23 15:12:28 +09:00
1d8fe9fb93 Bump dbriize 2019-10-23 14:57:08 +09:00
565cac34b0 Update NBXplorer 2019-10-23 14:56:59 +09:00
1cb02b2913 Bump bundlerminifier 2019-10-23 14:56:48 +09:00
1174178771 Remove reliance on ambient routing values 2019-10-23 13:52:22 +09:00
f1a2cc2b65 Merge pull request from sam-sla/patch-2
Fix typo in SECURITY.md
2019-10-22 23:50:22 +09:00
36d97d1e74 Fix typo in SECURITY.md 2019-10-21 22:05:29 +02:00
12264d8e74 Make sure SSHClient Disconnect does not hang if a cancellationToken is passed 2019-10-21 18:43:53 +09:00
4d68b12080 Rewrite some EF queries to make EF3.0 happy 2019-10-21 18:38:57 +09:00
3c7137830e Make sure that the SSL connection does not prevent btcpayserver from restarting 2019-10-21 16:34:26 +09:00
4f1b4131cb Add more logs on hosted service exit 2019-10-21 14:03:55 +09:00
ccb45e3a99 Remove empty folder 2019-10-21 13:31:43 +09:00
f3461bfbe6 Show success message when derivation scheme is updated 2019-10-21 13:24:13 +09:00
22b05500f1 Reactivate ndax 2019-10-20 17:52:30 +09:00
66a2383ad1 Make CanHandleRefundEmailForm less capricious 2019-10-20 16:47:48 +09:00
7d6fb21a8c Fix test 2019-10-20 16:45:40 +09:00
5054e76d64 Fix build 2019-10-20 16:24:11 +09:00
9adb825c30 Do not ask for email in checkout by default (Fix ) 2019-10-20 15:46:34 +09:00
9a28dc5121 Pass cancellationToken around in the Kraken Provider 2019-10-20 15:24:07 +09:00
c82c67359c Merge pull request from reablaz/master
updated AppsUpdate view with correct GET request
2019-10-19 18:27:56 +09:00
59afc05661 Log hosted services exiting 2019-10-19 14:12:43 +09:00
c05820224e Log paytester dispose 2019-10-19 14:09:19 +09:00
fee106abef Remove possible NRE when app start 2019-10-19 13:50:52 +09:00
48fa11759f Missing files 2019-10-19 00:54:43 +09:00
eac4c91820 Move Bitpay authentication class in BTCPayServer.Security 2019-10-19 00:54:20 +09:00
037fcf93f5 Merge branch 'refactor/remove-scopes' 2019-10-18 23:58:43 +09:00
dabe805602 Remove dead link 2019-10-18 23:58:25 +09:00
dacf5c1e16 Go back to .net 7.3 2019-10-18 23:50:18 +09:00
da2e8665a1 Remove unused scope, assert policy on store listing 2019-10-18 23:42:06 +09:00
8643c04a39 Additional fixes for 3.0 2019-10-18 21:46:34 +09:00
c5ba063edf Move OpenId folder 2019-10-18 21:36:32 +09:00
9648836e2d Merge pull request from NicolasDorier/migration/openiddict30
Update to OpenIddict3.0
2019-10-18 21:30:27 +09:00
3c9b58916b Update to OpenIddict3.0 2019-10-18 19:02:23 +09:00
d56a5ad86e Merge pull request from bolatovumar/feat-1036
Add option to show recommeded fee on checkout invoice
2019-10-18 12:13:39 +09:00
cd5cc6435c make lightning scheme lowercase (Fix ) 2019-10-17 00:52:19 +09:00
c908301b84 Add option to show recommeded fee on checkout invoice
Address 
2019-10-14 10:09:26 -07:00
e68d76b56d Add timeout to tests 2019-10-14 23:50:51 +09:00
8339ec59b7 Merge pull request from bolatovumar/issue-1089
Make UI checkboxes inline with their labels
2019-10-14 22:47:29 +09:00
c5cfd7921a Merge pull request from NicolasDorier/refactor/authorization
Refactor authorizations
2019-10-14 22:46:26 +09:00
e584004b23 Make UI checkboxes inline with their labels
address 
2019-10-13 20:07:41 -07:00
281a2461ad Refactor authorizations 2019-10-14 00:24:41 +09:00
bd94b5f84e Temporarily remove docker image cache for circleci 2019-10-12 20:38:41 +09:00
2b040b3465 Merge pull request from Eskyee/patch-1
Update launchSettings.json
2019-10-12 12:28:28 +09:00
0e452c7cdf Update launchSettings.json
I`m  the Removing Docker-Regtest-https-monero as this loads as a default, which I didn't ask for, it  default in my builds config, launchSettings json, also I think since this json was changed, it gave my Mac VS a indent bug somehow, ?? But i may be wrong there, 
can Nicolas please review ?? this is the correct way I would remove Docker-Regtest-https-monero from my folk ?? thanks
2019-10-12 03:43:30 +01:00
2acdc77289 Update lang 2019-10-10 19:46:29 +09:00
fda6a1a77b Use ClaimTransformer instead of Authentication's JWT 2019-10-10 19:46:29 +09:00
7e5c593e09 Merge pull request from bolatovumar/fix-1078
[PoS app] Show card scrollbar only when necessary
2019-10-10 15:22:29 +09:00
40b191ef49 Skip HeadersOverrideMiddleware if on onion 2019-10-10 14:10:01 +09:00
a92f0fe289 [PoS app] Show card scrollbar only when necessary
fix 
2019-10-09 20:41:24 -07:00
ca17efbc29 Add missing file 2019-10-10 09:49:03 +09:00
5025e0dd4d Allow xforwardedproto to be override via configuration 2019-10-09 22:26:54 +09:00
1325c5d441 Add TestTimeout to some tests 2019-10-08 16:32:22 +09:00
30585d2cc1 Merge pull request from rockstardev/master
Replacing donation widget with link new donate page
2019-10-08 12:19:42 +09:00
98468f4eb0 Replacing donation widget with link new donate page
Resolves 

Co-authored-by: vswee <vswee@users.noreply.github.com>
2019-10-07 17:30:20 -05:00
39876dea07 Use random ports in container tests 2019-10-07 16:25:27 +09:00
03917ec806 Remove possible crash at shutdown 2019-10-07 16:06:36 +09:00
1c9a91140b Asyncify tests 2019-10-07 16:04:25 +09:00
3417556f5c Update pomelo on .netcore3.0 2019-10-07 15:12:22 +09:00
0cc2fa962d Prepare Startup.cs for netcoreapp30 2019-10-07 13:03:50 +09:00
8ba1303968 Move BitpayMiddleware up the stack 2019-10-07 12:43:17 +09:00
ae2b055fb5 Fix build 2019-10-06 23:41:27 +09:00
a919d3ddec Move TryGetSolutionDirectoryInfo in test utils 2019-10-06 23:38:57 +09:00
102b38b5a8 Make test CanUsePaymentMethodDropdown more reliable 2019-10-06 23:13:42 +09:00
56a363adf9 Add more test timeout 2019-10-06 22:51:01 +09:00
5c8dcb0292 Add test timeout 2019-10-06 22:49:28 +09:00
0fd5c722f6 Add test timeout for some selenium tests 2019-10-06 22:24:28 +09:00
b86befbdaf Merge pull request from pavlenex/security-md
Add Security.md
2019-10-06 22:20:26 +09:00
53310dee8a Add Security.md 2019-10-06 12:25:40 +02:00
78b86ce0ea Fix build in netcoreapp21 2019-10-06 18:47:49 +09:00
3bdc7c102a Fix Startup in netcoreapp3.0 2019-10-06 16:00:38 +09:00
f9714f0be0 Fix build 2019-10-06 15:54:19 +09:00
536f98b566 Fix entity framework queries to work in netcoreapp3.0 2019-10-06 15:48:12 +09:00
f4977e7f9f Prepare AuthenticationTests for .netcoreapp3.0 2019-10-05 20:45:09 +09:00
68807bae37 Do not use AsAsyncEnumerable() 2019-10-04 22:55:38 +09:00
ccc2d0e13c Exclude Google Cloud Storage for .netcoreapp3.0, it depends on System.Interactive.Linq which create namespace conflict with the new AsyncEnumerable 2019-10-04 17:56:08 +09:00
c2032ee15b Prepare the Authentication controller for .netcoreapp3.0 2019-10-04 17:21:53 +09:00
724a5b5460 Prepare code to move to netcoreapp3.0 2019-10-04 17:17:11 +09:00
c9ec0f9d3c Prepare startup.cs for netcoreapp3.0 2019-10-03 18:46:09 +09:00
411fe90b8c Can compile tests in netcoreapp3.0 2019-10-03 18:25:07 +09:00
a56004fbef Remove a warning on .netcoreapp3.0 2019-10-03 18:15:08 +09:00
e75edac3c1 Make .netcoreapp 3.0 build happy 2019-10-03 18:00:07 +09:00
aaa05eb5ec Fix build 2019-10-03 17:37:10 +09:00
8d0d80e086 Fix build 2019-10-03 17:14:07 +09:00
4d84343a80 Prepare BTCPayServer for .netcore 3.0 2019-10-03 17:06:49 +09:00
275fbc81e7 Prepare BTCPayServer.Data for .netcore 3.0 2019-10-03 16:36:02 +09:00
d23adfbd78 Prepare BTCPayServer.Common and BTCPayServer.Rating for .netcore 3.0 2019-10-03 16:13:12 +09:00
f7b85babfe Merge pull request from rockstardev/master
Cleanup U2F namespace to correspond to folder path
2019-10-03 12:57:53 +09:00
56e85b68d9 Csproj cleanup, reorganizing namespaces, fixing tests 2019-10-02 22:41:53 -05:00
755a6bf8e6 Cleaning up references to old U2F\Services folder 2019-10-02 12:38:06 -05:00
7282199c31 Cleanup U2F namespace to correspond to folder path 2019-10-02 12:32:41 -05:00
639f5d2fc4 Make sure calling monero related controllers can't be done if the shitcoin is not supported 2019-10-01 15:30:27 +09:00
8c8ef9d3ca Rename shitcoins to altcoins 2019-09-30 20:43:15 +09:00
2c5c6d28e3 Fix broken getting started link in readme () 2019-09-30 18:42:35 +09:00
fd78d02576 Moving Monero classes into BTCPayServer.Common 2019-09-30 17:58:41 +09:00
3a0328d0be Moving shitcoin code in shitcoin folder 2019-09-30 17:51:47 +09:00
d66b111121 xmr () 2019-09-30 17:32:43 +09:00
8cbc58ea2f updated AppsUpdate view with correct GET request
So user can request invoice data by invoice id from btcpayserver, to verify callback
2019-09-29 15:12:35 +03:00
3366c86b16 Authorize granular permissions ()
* granular scope permissions for api

* final fixes and styling

* prettify code

* fix missing policy
2019-09-29 16:23:31 +09:00
c7e3241a85 Update info link in ListTokens 2019-09-29 16:21:25 +09:00
1c2c3ede80 Update help link 2019-09-29 16:12:03 +09:00
0f46da2e6b Update c-lightning 2019-09-29 13:53:18 +09:00
514386ecdd Remove NDax support 2019-09-29 11:58:16 +09:00
2257b95732 bump 2019-09-24 15:22:26 +09:00
7a5cfcf50f Fix docker-entrypoint for raspberry 2019-09-24 15:21:50 +09:00
e8d5190569 bump 2019-09-22 22:00:17 +09:00
d6d13ec001 Merge pull request from Kukks/pre-monero
General optimizations and fixes
2019-09-22 00:15:37 +09:00
f3aa67e0f1 make invoice repository able to query more extensively 2019-09-21 17:07:48 +02:00
59839a3332 make sure networks are abstracted properly 2019-09-21 16:39:44 +02:00
fa18bd9a69 allow nav layout for store to not have a main title specified 2019-09-21 16:28:04 +02:00
bf9dd57177 move css logic to global css file as it makes more sense 2019-09-21 16:24:01 +02:00
a230e21737 Store Nav extension support 2019-09-21 16:22:26 +02:00
e763e9e41a Make sure BTCPAY_SSHKEYFILE is set when starting container 2019-09-21 23:06:15 +09:00
2e0abdbd06 Fix BTC_GBP pair not resolved for kraken 2019-09-21 13:05:05 +09:00
f3890cd029 Make test more reliable 2019-09-20 19:41:59 +09:00
2f918b1195 Fix SSH settings not correctly applied 2019-09-20 19:33:23 +09:00
5b73f22eb4 set buyer email in get invoice to refund email if not set ()
closes  fixes 
2019-09-20 19:15:07 +09:00
edfdae744f Fix other-dependencies reference in TOC () 2019-09-20 19:14:33 +09:00
438fc34ad2 Replace pay button PNG image with an SVG and add 2x res version ()
fix 
2019-09-20 19:14:08 +09:00
9e107b1eb1 Try to read the authorized keys file from the configuration 2019-09-20 18:51:14 +09:00
a8e2a99faa Do not use sed -i in docker endpoint 2019-09-20 18:06:21 +09:00
0823a3e0dc Remove warnings 2019-09-20 17:35:55 +09:00
7ac72c6c2a Make sure the key is deleted 2019-09-20 17:25:07 +09:00
6d703d590b Generate SSH keys in the docker container 2019-09-20 17:23:32 +09:00
3dada3c464 Remove SSH warning if no SSH settings set 2019-09-20 15:26:09 +09:00
a2cb6178b8 Can edit authorized_keys in SSH Services, remove download keyfile support 2019-09-19 19:17:20 +09:00
42dda56eea Retry SSH connection later if it fails 2019-09-19 16:54:07 +09:00
6407e15187 Create FUNDING.yml 2019-09-15 14:56:46 +03:00
af97e296ba bump 2019-09-15 01:13:06 +09:00
200c9709fe Updating BundlerMinifier () 2019-09-13 04:56:36 +09:00
18b8bec8d0 Checkout: show red border around email when invalid () 2019-09-12 18:28:11 +09:00
41d714e2ce Revert "Share same browser for all selenium tests"
This reverts commit 2ce0749bb6e77950b069a65296741b2ce77bd575.
2019-09-11 16:22:41 +09:00
60a8b23c03 Revert "Fix test"
This reverts commit 0096250384c618d8f5fbf202c5be7d475f417496.
2019-09-11 16:22:27 +09:00
0096250384 Fix test 2019-09-11 15:58:38 +09:00
2ce0749bb6 Share same browser for all selenium tests 2019-09-11 15:36:12 +09:00
7ab97311be Re-enable lightning sats feature through C# () 2019-09-11 14:49:06 +09:00
e6cfb6e851 Selenium Tests for Checkout + other store operations () 2019-09-10 17:03:24 +09:00
b3298589c3 Rockstarify the docker-compose 2019-09-10 13:02:52 +09:00
127ad3e573 Merge pull request from bolatovumar/fix-1025
Allow removing transaction labels by clicking on an icon
2019-09-10 12:45:34 +09:00
2a262c4e1e Allow removing transaction labels by clicking on an icon
close 
2019-09-09 20:40:32 -07:00
ee804c9922 Merge pull request from bolatovumar/fix-1017
[Wallet] Prevent jumpy transition on page load when transaction labels are present
2019-09-09 13:35:04 +09:00
3a8e136f39 Merge branch 'master' into fix-1017 2019-09-09 13:34:51 +09:00
8eec6db825 Merge pull request from dennisreimann/patch-1
Fix typo on Pay Button page
2019-09-09 13:33:22 +09:00
1c90b6227c Merge pull request from bolatovumar/fix-1024
[Wallet] Add space between transaction labels
2019-09-09 13:33:03 +09:00
8b7ea6c71f [Wallet] Add space between transaction labels
close 
2019-09-08 11:00:57 -07:00
3fc9d0c010 Better error message for seed signing (Fix ) 2019-09-08 00:18:30 +09:00
345ce6ba5a Fix typo on Pay Button page
Signed-off-by: Dennis Reimann <mail@dennisreimann.de>
2019-09-07 08:32:01 +02:00
d9cd00f49a Make tests more resilient 2019-09-06 18:29:12 +09:00
2266c0dc96 Merge pull request from Kukks/ndax-rates
Add Ndax rate provider
2019-09-06 17:37:42 +09:00
882430cf58 Fix docker-compose ssh connection 2019-09-06 16:59:20 +09:00
11730cbae6 Add sshd service so we can test SSH stuff as well 2019-09-06 16:51:49 +09:00
dc3abc76c3 add Ndax rate provider 2019-09-06 08:20:08 +02:00
0013703cef Use docker sleep for the dev container in tests 2019-09-06 15:16:24 +09:00
91b1a5e3e5 Remove MySQL from tests (never run) 2019-09-06 15:16:24 +09:00
911faeb510 Merge pull request from mbambnag/patch-1
Update Currencies.txt
2019-09-06 14:54:19 +09:00
8fa9834bf6 [Wallet] Prevent jumpy transition on page load when transaction labels are present
fix 
2019-09-05 19:22:31 -07:00
cf930fc46a Update Currencies.txt 2019-09-06 07:16:15 +07:00
9ca9b5a5d2 Remove lightning sats denomination (Fix ) 2019-09-05 14:58:01 +09:00
3a87dc2223 Fix payment method switching stopped working 2019-09-05 12:48:00 +09:00
67d3875c98 Fix error on this.fetchData 2019-09-05 12:13:36 +09:00
77d0f3d85c Fix tests 2019-09-05 11:55:31 +09:00
0798b95c6b fix build 2019-09-05 11:41:51 +09:00
c247e275f6 Make sure NotificationUrl and RedirectUrl are of type Uri 2019-09-04 18:20:36 +09:00
f17a359893 Fix NotificationUrl and RedirectUrl templating 2019-09-04 18:01:26 +09:00
8e15707dc7 fix dockerfiles 2019-09-04 17:37:40 +09:00
d890753ee2 bump 2019-09-04 17:30:58 +09:00
00b82ad07a Update translations 2019-09-04 17:30:24 +09:00
a21948cf16 Merge pull request from bolatovumar/fix-606
Tackle additional issues in 
2019-09-04 17:26:58 +09:00
eb583ba628 Revert "Start off cart hidden on desktop breakpoint"
This reverts commit a169179061c27670f14196cc21cdf64988fb941c.
2019-09-04 09:29:46 +02:00
a4b61f8aab [POS app] Allow empty string for product description ()
fix 
2019-09-04 13:07:09 +09:00
7208e63155 Excerpts from (manual PR) (part1 ) ()
* Excerpts from 

Relating to selenium tests + small renamings

* fix build
2019-09-03 20:11:36 +09:00
8f464b0838 Fix build 2019-09-03 14:10:13 +09:00
233b799a46 Fix inventory string () 2019-09-03 14:08:55 +09:00
d99beb9811 New feature: Apps limited inventory () 2019-09-02 22:37:52 +09:00
fefc45854e Remove anchor where querying URL 2019-09-02 18:05:40 +09:00
0047a5388d Add test for dead links in Views 2019-09-02 16:32:38 +09:00
66064bd2eb Add link to wallets doc 2019-09-02 16:10:52 +09:00
6bd601137a Allow Placeholders in redirectURL (Fix ) 2019-09-02 16:04:41 +09:00
eae913f809 fix(pos-app): hide "clear search" button when input field is manually cleared 2019-09-01 11:18:46 -07:00
bc8e7ce888 Add background color to cart tip button when it's focused 2019-08-30 20:27:43 -07:00
1ec342da1e Apply consistent border radius to POS app search bar 2019-08-30 20:06:08 -07:00
a169179061 Start off cart hidden on desktop breakpoint 2019-08-30 20:04:21 -07:00
57b436417c Revert "Skip BundleMinify if in Debug mode"
This reverts commit 0229b560e7b3fd1e1df42c4a7ade1ae5d6d16388.
2019-08-30 19:36:57 +09:00
0229b560e7 Skip BundleMinify if in Debug mode 2019-08-30 19:18:56 +09:00
3c51bd3b23 Merge pull request from btcpayserver/refactor/move-data
[Refactor] Move SQL classes in their own assembly
2019-08-30 18:45:22 +09:00
b7ba97d86f Fix namespace in the db snapshot 2019-08-30 18:22:19 +09:00
0eb58e9a91 Remove designer files 2019-08-30 18:22:18 +09:00
f257f9f91d [Refactor] Move SQL classes in their own assembly 2019-08-30 18:22:13 +09:00
8971dbc2f9 Ensure raised amount is showing with correct precision in crowdfound app tooltip ()
fix 
2019-08-30 16:17:17 +09:00
5b4e78f8d1 Add bitpay as direct provider, remove reliance on NBitpayClient in the Rate Assembly 2019-08-29 18:13:01 +09:00
27f20386df Add confirmation button to recovery codes view ()
fix 
2019-08-29 17:16:02 +09:00
9154e4264d Address issues in ()
* Increase POS cart button and input size elements as per 

* Increase confirmation modal input and button size as per 

* Add loading indicator to cart confirmation pay button as per 

* Ensure POS app tip amount input shows decimal amount with correct divisibility

* Center POS app cart quantity input field

address task in 

* Ensure search bar and content are horizontally aligned

address task in 
2019-08-29 17:15:00 +09:00
7457e99451 Change button style 2019-08-29 16:26:34 +09:00
c5227d9996 Request consent from user before giving application access to the user's data & services. 2019-08-29 16:25:16 +09:00
1447b5e8be Add top margin to 2FA screen heading ()
fix 
2019-08-29 16:16:16 +09:00
efdb131c33 checkout fixes () 2019-08-29 15:37:02 +09:00
d9a0db3efc bump nbx 2019-08-29 00:03:14 +09:00
cb8c077c1e better error message for bad ssh config 2019-08-27 23:39:17 +09:00
9688798a4a Asyncify SSH access, do not show SSH service if ssh is not well configured 2019-08-27 23:30:25 +09:00
9a9e31c759 Split Bitcoin/LN to partial defined in payment handler and convert checkout to Vue () 2019-08-27 11:31:15 +09:00
55c0c0ea6f fix tab slider not always working on checkout () 2019-08-26 20:43:40 +09:00
43ee22f965 Allow overriding UI of checkout in payment handler () 2019-08-25 22:50:11 +09:00
wiz
989a7b863e Revert "Add bisq as supporting P2P service" ()
This reverts commit 0c5c6233c7d8f1577ce20fc933a071b775142032.
2019-08-25 16:53:29 +09:00
709ee54ac2 Do not prevent btcpay from starting if unsupported sshkey 2019-08-25 12:27:29 +09:00
664b920a39 Make invoice payments view modular per payment handler () 2019-08-24 23:10:13 +09:00
7ea3312534 Add display attributes. Fix () 2019-08-24 23:06:34 +09:00
3e9bee2d44 simplify settings changed listening ()
* simplify settings changed listening

Might as well use the Event aggregator to listen in on changes instead of the current complicated magic in the settings repo. This also reduces db calls( it sends the new settings through the event instead of fetching them again)

* add settings extension

* switch to old style but using event aggregator
2019-08-22 20:44:06 +09:00
a571f77a40 Ensure POS/Crowdfund price input fields bring up numpad on mobile ()
fix 
2019-08-21 23:05:52 +09:00
13f2be7811 Add bigger than zero validation for payment request amount ()
fix 
2019-08-21 23:05:06 +09:00
3d00611ddf Remove stray semicolon from payment request view ()
fix 
2019-08-21 23:04:25 +09:00
576734b5cb downgrade clightning 2019-08-21 15:12:09 +09:00
6cd60732b5 Properly render replaced tx in invoice view 2019-08-21 01:25:03 +09:00
1635e1e3fb missing file commit () 2019-08-21 00:00:50 +09:00
b29b46bbc7 Add policy to allow internal lightning node for non-admins ()
Partially related to  (but no actual management and accounting of funds in different stores occurs)
2019-08-20 17:38:15 +09:00
e45f1afd51 Small rewrite of condition 2019-08-20 16:12:18 +09:00
288dc9b626 Do not loop infinitely waiting for btcpay to start 2019-08-20 16:10:44 +09:00
81c6a76ea2 make sure tests run on latest images 2019-08-20 14:17:52 +09:00
182f9b3cf6 bump clightning 2019-08-20 13:38:42 +09:00
e71fd4950f Add dev env videos to readme ()
- Add full node wallet as a feature
- Formatting
- Add windows dev env video
- Add ubuntu dev env video
2019-08-19 14:15:22 +09:00
72d519bb45 Add description and embedded css to POS ()
* Add description and embedded css to POS

* wrap embedded css props in <style> before Safe.raw
2019-08-19 14:13:42 +09:00
e743b2e457 Downgrade clightning 2019-08-17 15:57:15 +09:00
f932a34581 Fix docker-compose test 2019-08-17 15:37:57 +09:00
3543d9bd60 Fix docker-compose test 2019-08-17 15:35:41 +09:00
d387834c6c Fix docker-compose test 2019-08-17 15:25:00 +09:00
6ea15411b6 Update c-ligthning and some packages 2019-08-17 15:14:31 +09:00
63df6ac5eb Make sure EmbeddedCSS is CSS 2019-08-10 14:53:24 +09:00
039bee5b65 bump 2019-08-10 14:19:34 +09:00
be5597085b Use Safe.Raw and Safe.Json instead of Html.Raw and the JsonHelper, move sanitization at the View level () 2019-08-10 14:05:11 +09:00
6b355cbe1b Merge pull request from woutersamaey/improved-smtp-config-form
UI improvements to SMTP settings + Quick fill function for Gmail and Hotmail
2019-08-08 18:07:40 +09:00
dec5d19a2f Only show SMTP quick fill when JavaScript is enabled 2019-08-07 22:10:15 +02:00
ff533994d8 UI improvements to SMTP settings + Quick fill function for Gmail and Hotmail 2019-08-07 21:31:08 +02:00
221e2c7898 Fix "Key already added in dictionary" error when signing with ledger 2019-08-07 17:53:03 +09:00
fb77fddcc3 Merge pull request from woutersamaey/prevent-autofill-smtp-config
Prevent autofilling SMTP config user and password
2019-08-05 15:15:41 +09:00
c37086e000 Change type of SMTP password field to plain text, preventing autofill once and for all 2019-08-04 17:17:55 +02:00
3d6783b743 Merge pull request from PatrickLemke/fix-typo-dns-settings
Fix typo / grammar for dns error message
2019-08-04 21:42:43 +09:00
c479e6aae5 Merge pull request from woutersamaey/prevent-layout-break-long-text-links
Prevent layout from breaking on hyperlinks with very long URLs as the visible text
2019-08-04 21:33:07 +09:00
59a770e0d7 Prevent layout from breaking on hyperlinks with very long URLs as the visible text 2019-08-04 11:29:03 +02:00
140259e737 Merge pull request from Kukks/fix-domain-policy-dropdowns
Allow apps server admin does not have access to to be mapped in domain-to-app policy settings
2019-08-03 23:24:51 +09:00
59a391dcc9 add store name 2019-08-03 16:23:00 +02:00
3a1cdefa09 Allow apps server admin does not have access to to be mapped in domain-to-app policy settings
This is a bugfix imo:
If you have 2 server admins, where only Admin1 has access to a specific app and Admin2 goes to edit the policies, the mapping would be overwritten to "None" .
This PR exposes all apps on all stores to this mapping dropdown irrespective of user. I think it makes sense to leak this minor data here to server admins.
2019-08-03 16:23:00 +02:00
7be104f486 Only show the txid as unconf in the wallet transaction list 2019-08-03 23:21:09 +09:00
d90a65975c Add placeholder for label name 2019-08-03 23:13:27 +09:00
4e53f59a9c Implement label filter 2019-08-03 23:10:45 +09:00
8e58fc128d Fix bug on unable to add comment 2019-08-03 23:02:15 +09:00
756b6e9692 Make sure tags does not contains ',' 2019-08-03 22:06:14 +09:00
23d546c559 Add max length to comment and tags 2019-08-03 22:03:49 +09:00
6d4ea6a951 simplify code 2019-08-03 21:52:47 +09:00
f9b5dcd4a6 docker deployment method 2019-08-03 13:29:27 +02:00
eab679cb2b fix typo 2019-08-03 12:23:54 +02:00
ddf8b20091 Fix for bug & bug ()
* Fix "Do not propose lightning payment if value of the invoice is above..."

* Fix "Do not propose lightning payment if value of the invoice is above..." take care of the GAP edge case where OnChainMinValue > LightningMaxValue

* Fix "Do not propose on chain payment if the value of the invoice is below..." and take care of the GAP edge case

* Add test to cover all case and fix small issue

* Simplified version, with less validation
2019-08-03 12:55:58 +09:00
f1457582fe Fix test 2019-08-03 12:41:12 +09:00
7841f79f31 Prevent autofilling SMTP config user and password 2019-08-02 20:35:48 +02:00
56e5acfb65 Simplified version, with less validation 2019-08-02 14:14:54 -04:00
6b777878e3 Add test to cover all case and fix small issue 2019-08-02 14:14:54 -04:00
428c7c5444 Fix "Do not propose on chain payment if the value of the invoice is below..." and take care of the GAP edge case 2019-08-02 14:14:54 -04:00
f8427eb801 Fix "Do not propose lightning payment if value of the invoice is above..." take care of the GAP edge case where OnChainMinValue > LightningMaxValue 2019-08-02 14:14:54 -04:00
2a53c056ca Fix "Do not propose lightning payment if value of the invoice is above..." 2019-08-02 14:14:54 -04:00
21d555ee6b Fix bug: Can't remove comments to transaction 2019-08-03 00:55:27 +09:00
d79fda166f Can attach labels and comment to transaction in the wallet 2019-08-03 00:43:19 +09:00
c8025ebaac View pos in selenium test () 2019-08-02 13:48:12 +09:00
42d7ad02b0 In update store, make payment methods "enabled" only if properly configured 2019-08-01 17:10:52 +09:00
21556d4c07 added View App button to POS settings ()
* added View App button to POS settings

updated POS settings form group buttons to match Crowdfund settings from group buttons, addressing 

* added View App button to POS settings 

Fixed "Save Settings" Redirect
2019-08-01 15:55:41 +09:00
89a7166c1b More options to Custom Amount Pay button ()
* Start adding more options to Custom Amount Pay button

This allows you to simplify the custom amount pay button to remove the big + & - buttons along with set a min, max and step amounts. There's also an option to fit the button next to the input amount to have it more condensed(not finished)

* make fit button inline work nicely

* make currency dropdown more obvious

* fix space
2019-07-31 22:58:04 +09:00
5d6c28c997 Fix tests 2019-07-31 15:40:21 +09:00
717cadc64b Fix "Setting "Do not propose lightning payment if value of the invoice is above..." have no effect" (Fix ) 2019-07-31 15:38:49 +09:00
3dac7ef3f3 Fix dynamic dns 2019-07-25 23:26:56 +09:00
056cb60d5d Validate dynamic dns POST 2019-07-25 20:54:49 +09:00
bb4e92ec50 Fix alignement in Dynamic DNS 2019-07-25 19:44:40 +09:00
9218fb6463 bump 2019-07-25 19:39:15 +09:00
d9baea4c38 Remove global xpubs 2019-07-25 19:38:29 +09:00
6df6537cf9 Fix tests, improve logs 2019-07-25 19:36:03 +09:00
72d199f390 Add documentation link 2019-07-25 19:27:43 +09:00
233bce578b Can remove dyndns services 2019-07-25 19:07:56 +09:00
63472d54d7 Can configure multiple dynamic dns 2019-07-25 18:29:18 +09:00
db57b5ae80 Fix DynDNS renewal 2019-07-25 16:37:39 +09:00
8896d89908 Add Dynamic DNS support 2019-07-24 17:59:30 +09:00
8e07bf3ffb Update Login.cshtml ()
* Update Login.cshtml

[UI] Removed Unneeded string on login page with registering disabled. 

* Update Login.cshtml
2019-07-24 12:40:06 +09:00
6194d0ad44 bump NicolasDorier.RateLimits 2019-07-21 15:28:07 +09:00
138532d3d4 use donate.btcpayserver.org as donation link 2019-07-19 18:36:57 +09:00
4716b704d4 Paging on List Users page for big hosting providers like Esky () 2019-07-19 16:50:17 +09:00
109e576811 redo crowdfund modal perk list ()
* redo crowdfund modal perk list

closes 

* fix small responsive issue
2019-07-19 16:48:39 +09:00
631c878722 Fix typo. () 2019-07-19 16:47:52 +09:00
4cbcdb8af5 Make sure QRCodes use SVG instead of canvas (QRCodes on Tor does not work because of canvas fingerprinting protections) 2019-07-19 16:27:26 +09:00
d24628a386 fix payment request hub bug with payment types () 2019-07-18 14:00:46 +09:00
7e714bdfa2 Increasing default monitoring expiration time ()
With value 60 what would often happen is that invoice ends up being declared invalid, and then payment arrives later when system is not monitoring. After lots of production testing we decided to increase this value by default so that new users don't need to manually reassign invoices from `invalid` status, especially if they use third party plugin like wooCommerce.
2019-07-17 12:45:32 +09:00
e3283fb29b Bump NBitcoin and NBXplorer 2019-07-15 19:40:06 +09:00
be0285155f Do not redirect from login page if there is a returnUrl. 2019-07-15 17:18:30 +09:00
1c055a7282 Make sure perk contributions are not accounted until paid 2019-07-15 17:01:12 +09:00
8d3cdd39ca Fix "Configure Email Settings warning link not working" (Fix https://github.com/btcpayserver/btcpayserver/issues/906) 2019-07-14 22:54:27 +09:00
010ba4d5b6 Can specify display name for sender in email settings (Fix https://github.com/btcpayserver/btcpayserver/issues/910) 2019-07-14 22:45:14 +09:00
d176a16caa fix typo 2019-07-14 22:25:43 +09:00
fd4a27c1a3 When logged in, the URL /account/login is still accessible (Fix https://github.com/btcpayserver/btcpayserver/issues/916) 2019-07-14 22:16:23 +09:00
ae73858e23 Fix warning 2019-07-13 22:44:07 +09:00
1427e5458b Fix invoice page not showing tor link (Fix https://github.com/btcpayserver/btcpayserver/issues/915) 2019-07-13 22:42:46 +09:00
8853cf9f83 Only count contributors which paid invoice 2019-07-13 22:32:54 +09:00
de7f22bcbc bump 2019-07-13 22:21:23 +09:00
b8b2fa29d7 bump clightning 2019-07-13 22:03:33 +09:00
476a241936 bump 2019-07-12 23:36:28 +09:00
dc97982fad Remove trace of gdax (fix https://github.com/btcpayserver/btcpayserver/issues/913) 2019-07-12 23:34:10 +09:00
e488f93b17 Add explanation for the annoying windows popup 2019-07-12 13:04:54 +09:00
e6e9668bbb Prevent error 500 if bad psbt 2019-07-12 12:57:56 +09:00
56976898bd Fix error 414 2019-07-12 12:23:13 +09:00
221ff05c49 bump 2019-07-12 11:49:09 +09:00
8f719d3e33 Solve error 414 when PSBT are too big 2019-07-12 11:47:13 +09:00
67c2abca2d Hide openid warning message 2019-07-08 14:57:42 +09:00
36046f08f7 Use Migration startup task when starting BTCPay instead of hosted service. 2019-07-08 12:12:39 +09:00
3c4455c23c Update AppHubStreamer.cs ()
Bug fix 
2019-07-07 20:03:40 +09:00
e3db2e2b76 Remove warnings 2019-07-04 21:18:16 +09:00
5567a26b33 update translation 2019-07-04 21:16:20 +09:00
5387c3dd97 bump 2019-07-04 20:56:54 +09:00
d14eef979c Bump versions of package and software 2019-07-04 20:50:40 +09:00
c7069f4fd9 bump 2019-07-04 18:49:25 +09:00
b40239f93b bump nbxplorer 2019-07-04 18:48:54 +09:00
2958175add Sort payment requests, most recent first 2019-07-01 17:33:49 +09:00
719ad8f4d4 Add File Storage links ()
* add redirect to Services for enable provider

* add tooltip to FS FAQ
2019-07-01 15:20:33 +09:00
4055eda757 Part3: OpenIddict: Add Flows Event Handlers ()
* Part 1 & Part 2 squashed commits

pr changes


pr fixes


remove config for openid -- no need for it for now


Part 1: OpenIddict - Minor Changes & Config prep


Part2: Openiddict: Init OpenIddict & Database Migration & Auth Policies


pr changes


fix merge 


fix compile


fix compile 


Part 1: OpenIddict - Minor Changes & Config prep


add missing nuget


Part2: Openiddict: Init OpenIddict & Database Migration & Auth Policies

* Part3: OpenIddict: Add Flows Event Handlers

* pr changes

* fix merge

* fix rebase

* fix imports

* cleanup

* do not allow u2f enabled accounts to log in

* start better tests for flows

* add tests

* fixes

* reintroduce dynamic policy as policies on jwt do not work without it

* reduce logs

* fix incorrect endpoint definitions

* Add implicit flow e2e test

* add code flow and refresh flow

* do not allow jwt bearer auth for all requests( only those under /api)

* remove commentedt code

* make sure authorize attr is marked with scheme

* remove dynamic policy and set claims in jwt handler

* cleanup

* change serversettings policy to not need a claim

* Add test to checkadmin verification

* revert server setting claim removal

* fix test

* switch back to claim

* unit test fixes

* try fix build with weird references to csprojes

* start fixing rebase

* remove https requirement to handle tor

* reformat tests correctly

* fix csproj

* fix ut formatting

* PR Changes

* do not show selenium browser
2019-07-01 12:39:25 +09:00
442df56629 Merge pull request from Kukks/multiple-domains
Multiple domains for apps in BTCPay
2019-06-28 16:31:55 +09:00
477ab67fe9 set viewbag on method result instead 2019-06-26 07:02:22 +02:00
64c60741a0 Fix possible NRE 2019-06-26 13:46:45 +09:00
9e354d7703 Merge pull request from Kukks/pay-button-language
Allow language parameter in pay button endpoint
2019-06-26 13:27:52 +09:00
1932c1cd7c Merge pull request from Kukks/filesystem-downloads
fix tmp link download
2019-06-26 13:11:08 +09:00
11670d0c0f make checkout param more generic and add it to pay button generator 2019-06-25 21:01:37 +02:00
6cab02cd99 Multiple domains for apps in BTCPay
closes 
2019-06-25 20:41:32 +02:00
fc1d781272 fix tmp link download
closes 
2019-06-25 12:23:10 +02:00
a58ecfd35a Save local file storage upon selection instead
closes 
2019-06-25 11:40:33 +02:00
645516ee1b Change donation button from slider to input 2019-06-23 14:45:27 +09:00
f570de5086 Fix payment button alignement 2019-06-23 14:31:56 +09:00
81ccfa1e6c Change donation QR to use proper donation button. Remove also special thanks part as the contributors dramtically changed. 2019-06-23 14:29:43 +09:00
b808aa4971 allow language parameter in pay button endpoint 2019-06-18 18:31:20 +02:00
d1f1bc93b3 Fix version detection 2019-06-18 14:00:42 +09:00
faf433f644 Fix build 2019-06-18 13:51:04 +09:00
ba4660a03a bump 2019-06-18 13:41:30 +09:00
03aa3693d0 Update translations 2019-06-18 13:41:10 +09:00
ecae976993 Make sure we don't timeout on NBX 2019-06-18 13:37:24 +09:00
307c8980e0 Move Common and Version.csproj in Build folder 2019-06-17 21:42:48 +09:00
e53d0eda47 Fix NRE if the account has no rootedKeyPath 2019-06-16 12:32:00 +09:00
369b15b20b bump 2019-06-13 16:33:23 +09:00
ff8bbcd88a Merge branch 'amitasaurus-btcPay-coinSwitch' 2019-06-13 16:31:48 +09:00
c52d22dc30 resolved conflicts 2019-06-13 12:49:01 +05:30
4fa6c9dc3d coinswitchAmountDue always returning 1.025 possible fix 2019-06-13 12:14:28 +05:30
a958d10dd9 Fix local network detection (https://github.com/btcpayserver/btcpayserver-docker/pull/152) 2019-06-12 17:40:49 +09:00
ff86ce64b4 Merge pull request from Kukks/error-messages-login-register
Show Model errors on login/register
2019-06-12 14:02:26 +09:00
f31d8aa9d7 Merge pull request from btcpayserver/Kukks-patch-1
Fix automated docker build link
2019-06-12 14:01:18 +09:00
3cf7406123 Fix automated docker build link
Was pointing to nicolas' repo instead of the active one
2019-06-11 19:13:37 +02:00
5d8bf196a8 Fix: Allow get rate unauthenticated 2019-06-11 18:40:47 +09:00
019bd26c51 bump 2019-06-11 18:16:31 +09:00
0e1f924fc3 Relax "Insecure transport protocol to access this service, please use HTTPS or TOR" error in server setting services 2019-06-10 18:16:12 +09:00
15c3893aab Make sure currency is in uppercase 2019-06-10 00:46:29 +09:00
deeab7c238 Add link to checkout page theme doc 2019-06-09 22:26:59 +09:00
e5ba7b9e69 Refactor authentication handlers 2019-06-09 01:36:54 +09:00
ca5be7e38d Never use default AuthenticationScheme 2019-06-08 12:41:44 +09:00
fb530f2b34 fix build 2019-06-07 13:46:02 +09:00
29cbf63346 Remove deps on NetworkProvider in AppService 2019-06-07 13:40:48 +09:00
13c03cc0c2 Removing dependency on NetworkProvider from InvoiceWatcher 2019-06-07 13:34:38 +09:00
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
410be51951 Update language 2019-06-07 00:49:05 +09:00
eefe8289b3 Fix exception in CreateInvoice if a payment method is not supported 2019-06-07 00:45:10 +09:00
a53a5944f8 Remove empty row if no validation 2019-06-06 18:54:51 +09:00
cd009466b6 Make sure we don't have empty row if no StatusMessage 2019-06-06 18:47:31 +09:00
f0c106de75 Change the menu nav bar pages by moving the title above the nav pills 2019-06-06 18:29:54 +09:00
fcf1b679e6 Show Model errors on login/register
Invalid logins and registrations were not showing any messages
2019-06-04 14:37:13 +02:00
03ba57cd46 bump 2019-06-04 10:24:51 +09:00
bea08e5cfd Refactor: Remove uneeded dependencies to PaymentMethodHandlerDictionary 2019-06-04 10:17:26 +09:00
01787e2662 Refactor: Remove PrepareInvoiceDTO 2019-06-04 10:11:52 +09:00
ac76220349 Move GetTransactionLink to PaymentType 2019-06-04 09:56:18 +09:00
796954c6e3 Refactor: Remove BlockExplorerLink from the payment handler 2019-06-04 09:52:06 +09:00
292c188182 Fix build errors 2019-06-04 09:40:36 +09:00
1f7097ef89 Refactor: Move DeserializeSupportedPaymentMethod to PaymentType 2019-06-04 09:33:42 +09:00
b97e083017 Refactor: Move DeserializePaymentMethodDetails to PaymentType 2019-06-04 09:22:46 +09:00
8ffd182b98 Refactor: Add DeserializePaymentData at the PaymentType level 2019-06-04 09:16:18 +09:00
1e77546251 Refactoring, make PaymentType a class instead of enum 2019-06-04 08:59:01 +09:00
8711960e74 Removing DeserializePaymentMethodDetails from IPaymentMethodHandler 2019-06-04 01:55:07 +09:00
8e2bcef824 The list of payment method should not depends on configuration of the users 2019-06-04 01:40:23 +09:00
d418cf7b07 Optimize docker files 2019-06-04 01:30:36 +09:00
864bcbb675 Move back GetCryptoPaymentData logic inside PaymentEntity 2019-06-04 01:24:15 +09:00
0b257b98f5 Move back ToPrettyString() in PaymentMethodId to fix crash if a payment method as been disabled 2019-06-04 01:06:03 +09:00
daab68d0b8 Merge pull request from btcpayserver/feature/new-register
New register form
2019-06-03 21:02:25 +09:00
ab0511aa1d Make is admin checkbox inline 2019-06-03 21:01:48 +09:00
12494c3ac6 Merge pull request from btcpayserver/feature/login
New login page
2019-06-03 20:57:06 +09:00
621533e050 New register form 2019-06-03 20:47:18 +09:00
dc334d230a New login windows 2019-06-03 20:36:07 +09:00
b848595378 Add missing command lines 2019-06-03 17:34:10 +09:00
ae4b2ab1fd Fix 2019-06-03 16:46:35 +09:00
2ca8cc6ca3 bump 2019-06-03 15:57:13 +09:00
3b57e2684e Add NotPaid_ExtraTransaction 2019-06-03 15:56:25 +09:00
898c672193 decrease number conf funding channel required for lightningd 2019-06-03 15:53:26 +09:00
18a7bc9278 Decrease number of confirmations requires for channels of lnd in tests 2019-06-03 15:51:13 +09:00
bb29ee10c5 Only execute external_tests on master 2019-06-03 15:41:44 +09:00
5441ae537a Fix docker-entrypoint for tests 2019-06-03 15:36:50 +09:00
0a0ddafd67 Add permission to run-tests 2019-06-03 15:34:09 +09:00
a3b914d8b4 Remove code 2019-06-03 15:32:46 +09:00
39f75d3742 Refactor test run by circleci 2019-06-03 15:32:20 +09:00
3dd77a4f2c Rename CircleCI steps and dockerfiles 2019-06-03 15:20:20 +09:00
6782e82972 Update translations 2019-06-02 18:13:04 +09:00
120fce0288 fix test container 2019-06-02 17:41:34 +09:00
aa57531ed7 fix test container 2019-06-02 17:37:44 +09:00
8f76bc0bcb Extract version in separate csproj to have better dockerfile caching 2019-06-02 17:33:35 +09:00
189280e602 Fix docker images 2019-06-02 17:06:00 +09:00
78ca26cf78 bump 2019-06-02 16:53:36 +09:00
0c5c6233c7 Add bisq as supporting P2P service 2019-06-02 16:30:44 +09:00
4fe480ee55 Fix selenium test 2019-05-31 15:40:59 +09:00
be6560e08c Merge pull request from rockstardev/uifixes
Tweaking UI styles, updating default table style, and extra notification for payment for paidPartial
2019-05-31 15:39:17 +09:00
0f58f6da36 fix cryptoimage 2019-05-31 08:00:32 +02:00
dcaf0463a7 Displaying notification for extra transaction if paidPartial 2019-05-31 07:48:42 +02:00
5c6643270b Bugfixing path to crypto image
Will need to move all these paths to absolute, rather than relative
2019-05-31 07:48:42 +02:00
7b337bde49 Restoring table border styling done by KayBeSee 2019-05-31 07:48:42 +02:00
7056aae301 Do not show custom amount field in cart when not enabled ()
fixes 
2019-05-31 14:29:16 +09:00
1b6eb9cab0 Update explorer to blockstream.info () 2019-05-31 14:26:41 +09:00
80e23beda9 Update TwentyTwenty 2019-05-31 14:16:17 +09:00
d70e120acc Fix test 2019-05-31 12:17:47 +09:00
c877937fdf Show the inputs of the PSBT in the review screen 2019-05-31 00:23:23 +09:00
8379b07de0 Use a redirect for update 2019-05-31 00:00:20 +09:00
c8c33245b8 Revert table changes from 2019-05-30 23:42:56 +09:00
0faf2fe83e Fix buttons in PSBT 2019-05-30 23:36:01 +09:00
19bc511f39 Can update PSBT, fix the PSBT review page 2019-05-30 23:16:05 +09:00
916323bb3b [WIP] Further abstractions to Payment Handlers ()
* mark items to abstract


wip


wip


wip


wip


wip


wip


wip


cleanup


parse other types


compile and fix tests


fix bug 


fix warnings


fix rebase error


reduce payment method handler passings


more cleanup


switch tests to Fast mode 


fix obsolete warning


remove argument requirement 


rebase fixes


remove overcomplicated code


better parsing


remove dependency on environement


remove async

* fixes and simplification

* simplify

* clean up even more

* replace nuglify dependency

* remove extra space

* Fix tests

* fix booboo

* missing setter

* change url resolver

* reduce payment method handlers

* wrap payment method handlers in a custom type

* fix tests

* make invoice controller UI selectlist population cleaner

* make store controller use payment handler dictionary

* fix ln flag

* fix store controller test

* remove null checks on payment handlers

* remove unused imports

* 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

* Abstract more payment type specific logic to handlers

* fix merge issue

* small fixes

* make use of repository instead of direct context usage

* reduce redundant code

* sanity check

* test fixes
2019-05-30 16:02:52 +09:00
0e568e2af5 Make sure that only the log directory can be read on /server/logs 2019-05-30 11:46:09 +09:00
dde841383a Don't throw exception if derivation scheme is not found 2019-05-30 11:24:43 +09:00
81dae7d350 BTCPay Abstractions: Move PaymentMethod specific logic to their handlers () 2019-05-29 23:33:31 +09:00
d3e3c31b0c Btcpay abstract BTCPayNetwork -- Alternative PR to ()
* 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
90852fe951 updated styles on user server page ()
* updated styles on user server page

* moved files out of bootstrap.css

* removed old css classes from initial commit

* move css changes to site.css

* add missing }
2019-05-28 21:40:10 +09:00
a2251d245f Merge pull request from rockstardev/extendconfcount
Extending invoice monitoring time if we haven't reached MaxTrackedConfirmation
2019-05-26 11:18:22 +09:00
112f9c4241 Adding invoice back to pending to track confirmations if less than max 2019-05-25 17:30:27 -05:00
b300404bc7 Extending invoice monitoring if max confirmation count not reached 2019-05-25 17:20:17 -05:00
19161b52f5 Fiat denomination box disappeared from the wallet (fix ) 2019-05-25 22:23:32 +09:00
429170520e Make sure fingerprint/hdpath are passed down to AddDerivationScheme.
Close ledger popup on account selection.

Add additional info after pairing
2019-05-25 12:53:03 +09:00
5571413a78 Put Ledger Wallet pairing in a popup, prepare code for Trezor pairing ()
* Allowing for POS to be displayed at website root

* Switching to asp attributes for form post action

* Applying default formatting rules on HTML

* The destination pays mining fees => Subtract fees from amount

* small cleanup ()

* Part2: Openiddict: Init OpenIddict & Database Migration & Auth Policies ()

* Part 1: OpenIddict - Minor Changes & Config prep

* Part 1: OpenIddict - Minor Changes & Config prep

* Part2: Openiddict: Init OpenIddict & Database Migration & Auth Policies

* pr changes

* pr changes

* fix merge

* pr fixes

* remove config for openid -- no need for it for now

* fix compile

* fix compile 

* remove extra ns using

* Update Startup.cs

* compile

* adjust settings a bit

* remove duplicate

* remove external login provider placeholder html

* remove unused directives

* regenerate db snapshot model

* Remove dynamic policy

* Provide Pretty descriptions for payment methods from their handlers ()

* small cleanup

* Provide Pretty descriptions for payment methods from their handlers

* remove PrettyMethod()

* integration with trezor

* rough load xpub from trezor

* update deriv scheme trezor

* move ledger import to dialog

* add import from hw wallet dropdown

* Support temporary links for local file system provider ()

* wip

* Support temporary links for local file system provider

* pass base url to file services

* fix test

* do not crash on errors with local filesystem

* remove console

* fix paranthesis

* work on trezor.net integration

* pushed non compiling sign wallet code

* comment out wallet code

* abstract ledger ws in add deriv

* Auto stash before merge of "trezor" and "btcpayserver/master"

* final add changes

* cleanup

* improve connectivity and fix e2e tests

* fix selenium

* add experimental warning for trezor

* move import button to right and convert to text link

* switch to defer and async scripts in add deriv scheme

* make defer not async

* more elaborate import trezor dialog

* Fix small issues

* hide trezor for now
2019-05-25 11:45:36 +09:00
512ee16620 Refactor invoice entity to not have to inject the NetworkProvider () 2019-05-24 22:22:38 +09:00
15dc0d60db Split projects () 2019-05-24 18:42:22 +09:00
d86cc9192e Support temporary links for local file system provider ()
* wip

* Support temporary links for local file system provider

* pass base url to file services

* fix test

* do not crash on errors with local filesystem

* remove console

* fix paranthesis
2019-05-24 15:44:23 +09:00
25b08b21fa Provide Pretty descriptions for payment methods from their handlers ()
* small cleanup

* Provide Pretty descriptions for payment methods from their handlers

* remove PrettyMethod()
2019-05-24 15:38:47 +09:00
ef9c2e8af1 Part2: Openiddict: Init OpenIddict & Database Migration & Auth Policies ()
* Part 1: OpenIddict - Minor Changes & Config prep

* Part 1: OpenIddict - Minor Changes & Config prep

* Part2: Openiddict: Init OpenIddict & Database Migration & Auth Policies

* pr changes

* pr changes

* fix merge

* pr fixes

* remove config for openid -- no need for it for now

* fix compile

* fix compile 

* remove extra ns using

* Update Startup.cs

* compile

* adjust settings a bit

* remove duplicate

* remove external login provider placeholder html

* remove unused directives

* regenerate db snapshot model

* Remove dynamic policy
2019-05-24 15:17:02 +09:00
9bee48c601 small cleanup () 2019-05-24 15:11:38 +09:00
961942ff6a Merge branch 'posroot' 2019-05-24 15:08:49 +09:00
de1c2b0150 Allowing for POS to be displayed at website root ()
* Allowing for POS to be displayed at website root

* Switching to asp attributes for form post action

* Applying default formatting rules on HTML
2019-05-24 15:07:09 +09:00
5a73358bca The destination pays mining fees => Subtract fees from amount 2019-05-24 14:28:09 +09:00
1812ea90b5 Applying default formatting rules on HTML 2019-05-23 10:36:23 -05:00
d98a416ed9 Switching to asp attributes for form post action 2019-05-23 10:35:57 -05:00
b947749382 Allowing for POS to be displayed at website root 2019-05-22 14:30:47 -05:00
c4d0b061c9 bump 2019-05-21 19:06:27 +09:00
3bada5d443 Fix multi send substract fees 2019-05-21 19:04:39 +09:00
06a35787aa Make WalletSend match exactly the design of before without additional destination 2019-05-21 18:44:49 +09:00
88c931ec13 Make wallet able to send to multiple destinations ()
* Make wallet able to send to multiple destinations

* fix tests

* update e2e tests

* fix e2e part 2

* make headless again

* pr changes

* make wallet look exactly as old one when only 1 dest
2019-05-21 17:10:07 +09:00
3d436c3b0e Add Eclair to connection string examples ()
* Add Eclair to connection string examples

* bump LN nuget
2019-05-20 10:13:11 +09:00
b4bb44d3e6 Adding Paid filter, invoice confirmed/paid/complete () 2019-05-20 10:02:57 +09:00
39157e6883 Fix tests 2019-05-20 00:06:03 +09:00
9b6b9e6113 Fix build 2019-05-19 23:33:32 +09:00
87df34e064 Can actually upload PSBT file in PSBT Combine and PSBT view.
Validate transaction before allowing any broadcast and show errors nicely.
2019-05-19 23:27:18 +09:00
55a48ff84a Add some notice in sign with seed 2019-05-17 14:42:28 +09:00
aed98f16bb Show fee rate in transaction detail review 2019-05-16 12:56:06 +09:00
2926865c1b bump 2019-05-15 22:57:14 +09:00
20fb7fc188 Fixing bug induced with server converting UTC times to server local () 2019-05-15 22:02:39 +09:00
461462eafc fix file timezone and isDownload for local files temp urls ()
closes 
2019-05-15 22:02:03 +09:00
7aa6d1a8d7 fix test on Circle CI for selenium 2019-05-15 19:27:30 +09:00
d914fe2f48 Make sure that the accountkey can sign a transaction 2019-05-15 19:00:26 +09:00
e100edce24 Add selenium test for the manual seed signing 2019-05-15 16:00:03 +09:00
a68915d6cf WalletPSBTReady show the summary of the transaction, signing with the seed respect the keypath of the wallet settings 2019-05-15 15:00:09 +09:00
210d680b21 nameofify 2019-05-15 01:07:46 +09:00
8dc4acdc34 Make sure people does not use launchsettings by mistake 2019-05-15 01:06:26 +09:00
eb54a18fcd Wallet & PSBT: Sign with seed or key ()
* Allow signing a PSBT with an extkey/wif or mnemonic seed

* reword things

* small text
2019-05-15 01:03:48 +09:00
cf436e11ae Part 1: OpenIddict - Minor Changes & Config prep ()
* Part 1: OpenIddict - Minor Changes & Config prep

* add missing nuget

* pr changes

* pr fixes

* remove config for openid -- no need for it for now

* remove unused extension

* Add tests

* use pay tester http client

* check redirecturl in tests
2019-05-15 00:46:43 +09:00
e22b7f74c7 Increase test coverage of selenium 2019-05-14 23:33:46 +09:00
f8fca7434c Hack selenium again 2019-05-14 22:29:05 +09:00
66d303c4ba Install chrome driver on alpine 2019-05-14 19:58:28 +09:00
186ed8beb2 Hack selenium 2019-05-14 19:27:26 +09:00
fac546cc0b Print sources if Selenium test fail 2019-05-14 19:19:23 +09:00
9d2d2d0d64 Catch errors in AssertNoErrors 2019-05-14 19:13:55 +09:00
f58043b07f dump logs of selenium before failiing test 2019-05-14 19:09:26 +09:00
289c6fa10e Remove docker-compose update 2019-05-14 18:36:07 +09:00
00e24ab249 Make sure BTCPay is operational before starting tests 2019-05-14 18:35:22 +09:00
7b69e334d7 update docker-compose so selenium tests works 2019-05-14 18:05:16 +09:00
12507b6743 Add some logs related to selenium 2019-05-14 17:34:19 +09:00
3750842833 Show in logs where the btcpay tester is binding 2019-05-14 16:56:03 +09:00
1dcec3e1fb bind to all interface if inside the test container 2019-05-14 16:13:55 +09:00
d8e1edd6d3 bump nbx in tests 2019-05-14 16:07:46 +09:00
a1f1e90626 Make selenium work on CI 2019-05-14 16:06:51 +09:00
522d745883 Update NBXplorer and NBitcoin 2019-05-14 16:06:43 +09:00
8ffb81cdf3 Refactor Selenium tests to properly cleanup resources 2019-05-13 18:42:20 +09:00
ae5254c65e disable selenium test for a while 2019-05-13 18:14:31 +09:00
9d53888524 fix typo 2019-05-13 18:03:41 +09:00
cd6dd78759 Click around in selenium, and do not forget to run the selenium tests on circleCI 2019-05-13 17:59:15 +09:00
27fd49e61c Add --allow-admin-registration, useful for tests 2019-05-13 17:00:58 +09:00
a3a259556f Merge branch 'testcircleci' 2019-05-13 13:48:46 +09:00
803da75636 Only run integrations tests in btcpayserver repository 2019-05-13 13:48:09 +09:00
d1556eb6cd bump 2019-05-13 08:55:26 +09:00
a7edbfe5e9 Remove useless code 2019-05-13 08:23:24 +09:00
663b5beac1 remove useless code 2019-05-13 08:22:29 +09:00
7e164d2ec3 make sure we don't sign same input twice 2019-05-13 08:21:54 +09:00
f9fb0bb477 Simplify logic in LedgerHardwareWalletSerivce by using NBitcoin helper methods. 2019-05-13 08:18:12 +09:00
702c7f2c30 Fix tests 2019-05-13 00:35:06 +09:00
8b348ade75 Can select the signing key in WalletSettings 2019-05-13 00:30:28 +09:00
bf37f44795 Add Wallet settings menu, do not rebase keypaths when create the PSBT 2019-05-13 00:13:55 +09:00
698033b0cf Selenium Chrome Tests 2019-05-12 18:49:28 +09:00
10496363f5 Change button style on WalletPSBTReadyView 2019-05-12 16:19:27 +09:00
77338c6054 [BUG FIX]: Coinswitch exchange with altcoins popup not showing bug fix 2019-05-02 14:49:33 +05:30
658 changed files with 29636 additions and 34809 deletions
.circleci
.github
BTCPayServer.Common
BTCPayServer.Data
BTCPayServer.Rating
BTCPayServer.Tests
BTCPayServer
BTCPayServer.csproj
Configuration
Contracts
Controllers
Currencies.txtCurrencyValue.cs
Data
DerivationSchemeParser.csDerivationSchemeSettings.cs
Events
ExplorerClientProvider.csExtensions.cs
Extensions
Filters
HostedServices
Hosting
IStartupTask.csMigrationStartupTask.cs
Migrations
ModelBinders
Models
PaymentRequest
Payments
Program.cs
Properties
SSH
Security
Services
Storage
U2F
Validation
Views
Account
Apps
AppsPublic
Authorization
Home
Invoice
Manage
MoneroLikeStore
PaymentRequest
PublicLightningNodeInfo
Server
Shared
Stores
UserStores
ViewsRazor.cs
Wallets
_ViewImports.cshtml
WalletId.csWellKnownTempData.csbundleconfig.json
wwwroot
Build
Dockerfile.linuxamd64Nuget.ConfigREADME.mdSECURITY.mdamd64.Dockerfilearm32v7.Dockerfilebtcpayserver.slndocker-entrypoint.shnuget.configpublish-docker.ps1

@ -1,44 +1,60 @@
version: 2
jobs:
build:
machine:
docker_layer_caching: true
steps:
- checkout
test:
fast_tests:
machine:
docker_layer_caching: true
enabled: true
steps:
- checkout
- run:
command: |
cd BTCPayServer.Tests
docker-compose down --v
docker-compose build
TESTS_RUN_EXTERNAL_INTEGRATION="true"
if [ -n "$CIRCLE_PULL_REQUEST" ] || [ -n "$CIRCLE_PR_NUMBER" ]; then
TESTS_RUN_EXTERNAL_INTEGRATION="false"
cd .circleci && ./run-tests.sh "Fast=Fast"
selenium_tests:
machine:
enabled: true
steps:
- checkout
- run:
command: |
cd .circleci && ./run-tests.sh "Selenium=Selenium"
integration_tests:
machine:
enabled: true
steps:
- checkout
- run:
command: |
cd .circleci && ./run-tests.sh "Integration=Integration"
external_tests:
machine:
enabled: true
steps:
- checkout
- run:
command: |
if [ "$CIRCLE_PROJECT_USERNAME" == "btcpayserver" ] && [ "$CIRCLE_PROJECT_REPONAME" == "btcpayserver" ]; then
cd .circleci && ./run-tests.sh "ExternalIntegration=ExternalIntegration"
else
echo "Skipping running ExternalIntegration tests outside of context of main user and repository that have access to secrets"
fi
docker-compose run -e TESTS_RUN_EXTERNAL_INTEGRATION=$TESTS_RUN_EXTERNAL_INTEGRATION tests
# publish jobs require $DOCKERHUB_REPO, $DOCKERHUB_USER, $DOCKERHUB_PASS defined
publish_docker_linuxamd64:
amd64:
machine:
docker_layer_caching: true
enabled: true
steps:
- checkout
- run:
command: |
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
#
sudo docker build --pull -t $DOCKERHUB_REPO:$LATEST_TAG-amd64 -f Dockerfile.linuxamd64 .
sudo docker build --pull -t $DOCKERHUB_REPO:$LATEST_TAG-amd64 -f amd64.Dockerfile .
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-amd64
publish_docker_linuxarm:
arm32v7:
machine:
docker_layer_caching: true
enabled: true
steps:
- checkout
- run:
@ -46,11 +62,11 @@ jobs:
sudo docker run --rm --privileged multiarch/qemu-user-static:register --reset
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
#
sudo docker build --pull -t $DOCKERHUB_REPO:$LATEST_TAG-arm32v7 -f Dockerfile.linuxarm32v7 .
sudo docker build --pull -t $DOCKERHUB_REPO:$LATEST_TAG-arm32v7 -f arm32v7.Dockerfile .
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-arm32v7
publish_docker_multiarch:
multiarch:
machine:
enabled: true
image: circleci/classic:201808-01
@ -73,30 +89,37 @@ workflows:
version: 2
build_and_test:
jobs:
- test
- fast_tests
- selenium_tests
- integration_tests
- external_tests:
filters:
branches:
only: master
publish:
jobs:
- publish_docker_linuxamd64:
- amd64:
filters:
# ignore any commit on any branch by default
branches:
ignore: /.*/
# only act on version tags
# only act on version tags v1.0.0.88
# OR feature tags like vlndseedbackup
tags:
only: /v[1-9]+(\.[0-9]+)*/
- publish_docker_linuxarm:
only: /(v[1-9]+(\.[0-9]+)*)|(v[a-z]+)/
- arm32v7:
filters:
branches:
ignore: /.*/
tags:
only: /v[1-9]+(\.[0-9]+)*/
- publish_docker_multiarch:
only: /(v[1-9]+(\.[0-9]+)*)|(v[a-z]+)/
- multiarch:
requires:
- publish_docker_linuxamd64
- publish_docker_linuxarm
- amd64
- arm32v7
filters:
branches:
ignore: /.*/
tags:
only: /v[1-9]+(\.[0-9]+)*/
only: /(v[1-9]+(\.[0-9]+)*)|(v[a-z]+)/

9
.circleci/run-tests.sh Executable file

@ -0,0 +1,9 @@
#!/bin/sh
set -e
cd ../BTCPayServer.Tests
docker-compose -v
docker-compose down --v
docker-compose pull
docker-compose build
docker-compose run -e "TEST_FILTERS=$1" tests

2
.github/FUNDING.yml vendored Normal file

@ -0,0 +1,2 @@
# These are supported funding model platforms
custom: https://foundation.btcpayserver.org

@ -2,9 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Services.Rates;
using NBitcoin;
using NBitpayClient;
using NBXplorer;
namespace BTCPayServer
@ -18,7 +16,7 @@ namespace BTCPayServer
{
CryptoCode = nbxplorerNetwork.CryptoCode,
DisplayName = "Bitcoin",
BlockExplorerLink = NetworkType == NetworkType.Mainnet ? "https://www.smartbit.com.au/tx/{0}" : "https://testnet.smartbit.com.au/tx/{0}",
BlockExplorerLink = NetworkType == NetworkType.Mainnet ? "https://blockstream.info/tx/{0}" : "https://blockstream.info/testnet/tx/{0}",
NBitcoinNetwork = nbxplorerNetwork.NBitcoinNetwork,
NBXplorerNetwork = nbxplorerNetwork,
UriScheme = "bitcoin",

@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Services.Rates;
using NBitcoin;
using NBXplorer;
@ -21,7 +20,7 @@ namespace BTCPayServer
NBitcoinNetwork = nbxplorerNetwork.NBitcoinNetwork,
NBXplorerNetwork = nbxplorerNetwork,
UriScheme = "bitcoinplus",
DefaultRateRules = new[]
DefaultRateRules = new[]
{
"XBC_X = XBC_BTC * BTC_X",
"XBC_BTC = cryptopia(XBC_BTC)"

@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Services.Rates;
using NBitcoin;
using NBXplorer;

@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Services.Rates;
using NBitcoin;
using NBXplorer;

@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Services.Rates;
using NBitcoin;
using NBXplorer;

@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Services.Rates;
using NBitcoin;
using NBXplorer;

@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Services.Rates;
using NBitcoin;
using NBXplorer;

@ -2,7 +2,6 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Services.Rates;
using NBitcoin;
using NBXplorer;

@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Services.Rates;
using NBitcoin;
using NBXplorer;

@ -2,7 +2,6 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Services.Rates;
using NBitcoin;
using NBXplorer;

@ -3,17 +3,14 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Services.Rates;
using Microsoft.Extensions.Caching.Memory;
using NBitcoin;
using NBitpayClient;
using NBXplorer;
namespace BTCPayServer
{
public partial class BTCPayNetworkProvider
{
Dictionary<string, BTCPayNetwork> _Networks = new Dictionary<string, BTCPayNetwork>();
Dictionary<string, BTCPayNetworkBase> _Networks = new Dictionary<string, BTCPayNetworkBase>();
private readonly NBXplorerNetworkProvider _NBXplorerNetworkProvider;
@ -25,13 +22,14 @@ namespace BTCPayServer
}
}
BTCPayNetworkProvider(BTCPayNetworkProvider filtered, string[] cryptoCodes)
BTCPayNetworkProvider(BTCPayNetworkProvider unfiltered, string[] cryptoCodes)
{
NetworkType = filtered.NetworkType;
_NBXplorerNetworkProvider = new NBXplorerNetworkProvider(filtered.NetworkType);
_Networks = new Dictionary<string, BTCPayNetwork>();
UnfilteredNetworks = unfiltered.UnfilteredNetworks ?? unfiltered;
NetworkType = unfiltered.NetworkType;
_NBXplorerNetworkProvider = new NBXplorerNetworkProvider(unfiltered.NetworkType);
_Networks = new Dictionary<string, BTCPayNetworkBase>();
cryptoCodes = cryptoCodes.Select(c => c.ToUpperInvariant()).ToArray();
foreach (var network in filtered._Networks)
foreach (var network in unfiltered._Networks)
{
if(cryptoCodes.Contains(network.Key))
{
@ -40,9 +38,12 @@ namespace BTCPayServer
}
}
public BTCPayNetworkProvider UnfilteredNetworks { get; }
public NetworkType NetworkType { get; private set; }
public BTCPayNetworkProvider(NetworkType networkType)
{
UnfilteredNetworks = this;
_NBXplorerNetworkProvider = new NBXplorerNetworkProvider(networkType);
NetworkType = networkType;
InitBitcoin();
@ -55,17 +56,18 @@ namespace BTCPayServer
InitFeathercoin();
InitGroestlcoin();
InitViacoin();
InitMonero();
// Assume that electrum mappings are same as BTC if not specified
foreach (var network in _Networks)
foreach (var network in _Networks.Values.OfType<BTCPayNetwork>())
{
if(network.Value.ElectrumMapping.Count == 0)
if(network.ElectrumMapping.Count == 0)
{
network.Value.ElectrumMapping = GetNetwork("BTC").ElectrumMapping;
if (!network.Value.NBitcoinNetwork.Consensus.SupportSegwit)
network.ElectrumMapping = GetNetwork<BTCPayNetwork>("BTC").ElectrumMapping;
if (!network.NBitcoinNetwork.Consensus.SupportSegwit)
{
network.Value.ElectrumMapping =
network.Value.ElectrumMapping
network.ElectrumMapping =
network.ElectrumMapping
.Where(kv => kv.Value == DerivationType.Legacy)
.ToDictionary(k => k.Key, k => k.Value);
}
@ -89,20 +91,14 @@ namespace BTCPayServer
}
[Obsolete("To use only for legacy stuff")]
public BTCPayNetwork BTC
{
get
{
return GetNetwork("BTC");
}
}
public BTCPayNetwork BTC => GetNetwork<BTCPayNetwork>("BTC");
public void Add(BTCPayNetwork network)
public void Add(BTCPayNetworkBase network)
{
_Networks.Add(network.CryptoCode.ToUpperInvariant(), network);
}
public IEnumerable<BTCPayNetwork> GetAll()
public IEnumerable<BTCPayNetworkBase> GetAll()
{
return _Networks.Values.ToArray();
}
@ -111,15 +107,20 @@ namespace BTCPayServer
{
return _Networks.ContainsKey(cryptoCode.ToUpperInvariant());
}
public BTCPayNetwork GetNetwork(string cryptoCode)
public BTCPayNetworkBase GetNetwork(string cryptoCode)
{
if(!_Networks.TryGetValue(cryptoCode.ToUpperInvariant(), out BTCPayNetwork network))
return GetNetwork<BTCPayNetworkBase>(cryptoCode);
}
public T GetNetwork<T>(string cryptoCode) where T: BTCPayNetworkBase
{
if (cryptoCode == null)
throw new ArgumentNullException(nameof(cryptoCode));
if(!_Networks.TryGetValue(cryptoCode.ToUpperInvariant(), out BTCPayNetworkBase network))
{
if (cryptoCode == "XBT")
return GetNetwork("BTC");
return GetNetwork<T>("BTC");
}
return network;
return network as T;
}
}
}

@ -0,0 +1,21 @@
using NBitcoin;
namespace BTCPayServer
{
public partial class BTCPayNetworkProvider
{
public void InitMonero()
{
Add(new MoneroLikeSpecificBtcPayNetwork()
{
CryptoCode = "XMR",
DisplayName = "Monero",
BlockExplorerLink =
NetworkType == NetworkType.Mainnet
? "https://www.exploremonero.com/transaction/{0}"
: "https://testnet.xmrchain.net/tx/{0}",
CryptoImagePath = "/imlegacy/monero.svg"
});
}
}
}

@ -0,0 +1,7 @@
namespace BTCPayServer
{
public class MoneroLikeSpecificBtcPayNetwork : BTCPayNetworkBase
{
public int MaxTrackedConfirmation = 10;
}
}

@ -0,0 +1,121 @@
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
namespace BTCPayServer.Services.Altcoins.Monero.RPC
{
public class JsonRpcClient
{
private readonly Uri _address;
private readonly string _username;
private readonly string _password;
private readonly HttpClient _httpClient;
public JsonRpcClient(Uri address, string username, string password, HttpClient client = null)
{
_address = address;
_username = username;
_password = password;
_httpClient = client ?? new HttpClient();
}
public async Task<TResponse> SendCommandAsync<TRequest, TResponse>(string method, TRequest data,
CancellationToken cts = default(CancellationToken))
{
var jsonSerializer = new JsonSerializerSettings
{
ContractResolver = new CamelCasePropertyNamesContractResolver()
};
var httpRequest = new HttpRequestMessage()
{
Method = HttpMethod.Post,
RequestUri = new Uri(_address, "json_rpc"),
Content = new StringContent(
JsonConvert.SerializeObject(new JsonRpcCommand<TRequest>(method, data), jsonSerializer),
Encoding.UTF8, "application/json")
};
httpRequest.Headers.Accept.Clear();
httpRequest.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
httpRequest.Headers.Authorization = new AuthenticationHeaderValue("Basic",
Convert.ToBase64String(Encoding.Default.GetBytes($"{_username}:{_password}")));
var rawResult = await _httpClient.SendAsync(httpRequest, cts);
var rawJson = await rawResult.Content.ReadAsStringAsync();
rawResult.EnsureSuccessStatusCode();
JsonRpcResult<TResponse> response;
try
{
response = JsonConvert.DeserializeObject<JsonRpcResult<TResponse>>(rawJson, jsonSerializer);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
Console.WriteLine(rawJson);
throw;
}
if (response.Error != null)
{
throw new JsonRpcApiException()
{
Error = response.Error
};
}
return response.Result;
}
public class NoRequestModel
{
public static NoRequestModel Instance = new NoRequestModel();
}
internal class JsonRpcApiException : Exception
{
public JsonRpcResultError Error { get; set; }
public override string Message => Error?.Message;
}
public class JsonRpcResultError
{
[JsonProperty("code")] public int Code { get; set; }
[JsonProperty("message")] public string Message { get; set; }
[JsonProperty("data")] dynamic Data { get; set; }
}
internal class JsonRpcResult<T>
{
[JsonProperty("result")] public T Result { get; set; }
[JsonProperty("error")] public JsonRpcResultError Error { get; set; }
[JsonProperty("id")] public string Id { get; set; }
}
internal class JsonRpcCommand<T>
{
[JsonProperty("jsonRpc")] public string JsonRpc { get; set; } = "2.0";
[JsonProperty("id")] public string Id { get; set; } = Guid.NewGuid().ToString();
[JsonProperty("method")] public string Method { get; set; }
[JsonProperty("params")] public T Parameters { get; set; }
public JsonRpcCommand()
{
}
public JsonRpcCommand(string method, T parameters)
{
Method = method;
Parameters = parameters;
}
}
}
}

@ -0,0 +1,9 @@
using Newtonsoft.Json;
namespace BTCPayServer.Services.Altcoins.Monero.RPC.Models
{
public partial class CreateAccountRequest
{
[JsonProperty("label")] public string Label { get; set; }
}
}

@ -0,0 +1,10 @@
using Newtonsoft.Json;
namespace BTCPayServer.Services.Altcoins.Monero.RPC.Models
{
public partial class CreateAccountResponse
{
[JsonProperty("account_index")] public long AccountIndex { get; set; }
[JsonProperty("address")] public string Address { get; set; }
}
}

@ -0,0 +1,10 @@
using Newtonsoft.Json;
namespace BTCPayServer.Services.Altcoins.Monero.RPC.Models
{
public partial class CreateAddressRequest
{
[JsonProperty("account_index")] public long AccountIndex { get; set; }
[JsonProperty("label")] public string Label { get; set; }
}
}

@ -0,0 +1,10 @@
using Newtonsoft.Json;
namespace BTCPayServer.Services.Altcoins.Monero.RPC.Models
{
public partial class CreateAddressResponse
{
[JsonProperty("address")] public string Address { get; set; }
[JsonProperty("address_index")] public long AddressIndex { get; set; }
}
}

@ -0,0 +1,9 @@
using Newtonsoft.Json;
namespace BTCPayServer.Services.Altcoins.Monero.RPC.Models
{
public partial class GetAccountsRequest
{
[JsonProperty("tag")] public string Tag { get; set; }
}
}

@ -0,0 +1,14 @@
using System.Collections.Generic;
using Newtonsoft.Json;
namespace BTCPayServer.Services.Altcoins.Monero.RPC.Models
{
public partial class GetAccountsResponse
{
[JsonProperty("subaddress_accounts")] public List<SubaddressAccount> SubaddressAccounts { get; set; }
[JsonProperty("total_balance")] public decimal TotalBalance { get; set; }
[JsonProperty("total_unlocked_balance")]
public decimal TotalUnlockedBalance { get; set; }
}
}

@ -0,0 +1,9 @@
using Newtonsoft.Json;
namespace BTCPayServer.Services.Altcoins.Monero.RPC.Models
{
public class GetFeeEstimateRequest
{
[JsonProperty("grace_blocks")] public int? GraceBlocks { get; set; }
}
}

@ -0,0 +1,11 @@
using Newtonsoft.Json;
namespace BTCPayServer.Services.Altcoins.Monero.RPC.Models
{
public class GetFeeEstimateResponse
{
[JsonProperty("fee")] public long Fee { get; set; }
[JsonProperty("status")] public string Status { get; set; }
[JsonProperty("untrusted")] public bool Untrusted { get; set; }
}
}

@ -0,0 +1,9 @@
using Newtonsoft.Json;
namespace BTCPayServer.Services.Altcoins.Monero.RPC.Models
{
public partial class GetHeightResponse
{
[JsonProperty("height")] public long Height { get; set; }
}
}

@ -0,0 +1,11 @@
using Newtonsoft.Json;
namespace BTCPayServer.Services.Altcoins.Monero.RPC.Models
{
public class GetTransferByTransactionIdRequest
{
[JsonProperty("txid")] public string TransactionId { get; set; }
[JsonProperty("account_index")] public long AccountIndex { get; set; }
}
}

@ -0,0 +1,32 @@
using System.Collections.Generic;
using Newtonsoft.Json;
namespace BTCPayServer.Services.Altcoins.Monero.RPC.Models
{
public partial class GetTransferByTransactionIdResponse
{
[JsonProperty("transfer")] public TransferItem Transfer { get; set; }
[JsonProperty("transfers")] public IEnumerable<TransferItem> Transfers { get; set; }
public partial class TransferItem
{
[JsonProperty("address")] public string Address { get; set; }
[JsonProperty("amount")] public long Amount { get; set; }
[JsonProperty("confirmations")] public long Confirmations { get; set; }
[JsonProperty("double_spend_seen")] public bool DoubleSpendSeen { get; set; }
[JsonProperty("fee")] public long Fee { get; set; }
[JsonProperty("height")] public long Height { get; set; }
[JsonProperty("note")] public string Note { get; set; }
[JsonProperty("payment_id")] public string PaymentId { get; set; }
[JsonProperty("subaddr_index")] public SubaddrIndex SubaddrIndex { get; set; }
[JsonProperty("suggested_confirmations_threshold")]
public long SuggestedConfirmationsThreshold { get; set; }
[JsonProperty("timestamp")] public long Timestamp { get; set; }
[JsonProperty("txid")] public string Txid { get; set; }
[JsonProperty("type")] public string Type { get; set; }
[JsonProperty("unlock_time")] public long UnlockTime { get; set; }
}
}
}

@ -0,0 +1,19 @@
using System.Collections.Generic;
using Newtonsoft.Json;
namespace BTCPayServer.Services.Altcoins.Monero.RPC.Models
{
public partial class GetTransfersRequest
{
[JsonProperty("in")] public bool In { get; set; }
[JsonProperty("out")] public bool Out { get; set; }
[JsonProperty("pending")] public bool Pending { get; set; }
[JsonProperty("failed")] public bool Failed { get; set; }
[JsonProperty("pool")] public bool Pool { get; set; }
[JsonProperty("filter_by_height ")] public bool FilterByHeight { get; set; }
[JsonProperty("min_height")] public long MinHeight { get; set; }
[JsonProperty("max_height")] public long MaxHeight { get; set; }
[JsonProperty("account_index")] public long AccountIndex { get; set; }
[JsonProperty("subaddr_indices")] public List<long> SubaddrIndices { get; set; }
}
}

@ -0,0 +1,36 @@
using System.Collections.Generic;
using Newtonsoft.Json;
namespace BTCPayServer.Services.Altcoins.Monero.RPC.Models
{
public partial class GetTransfersResponse
{
[JsonProperty("in")] public List<GetTransfersResponseItem> In { get; set; }
[JsonProperty("out")] public List<GetTransfersResponseItem> Out { get; set; }
[JsonProperty("pending")] public List<GetTransfersResponseItem> Pending { get; set; }
[JsonProperty("failed")] public List<GetTransfersResponseItem> Failed { get; set; }
[JsonProperty("pool")] public List<GetTransfersResponseItem> Pool { get; set; }
public partial class GetTransfersResponseItem
{
[JsonProperty("address")] public string Address { get; set; }
[JsonProperty("amount")] public long Amount { get; set; }
[JsonProperty("confirmations")] public long Confirmations { get; set; }
[JsonProperty("double_spend_seen")] public bool DoubleSpendSeen { get; set; }
[JsonProperty("fee")] public long Fee { get; set; }
[JsonProperty("height")] public long Height { get; set; }
[JsonProperty("note")] public string Note { get; set; }
[JsonProperty("payment_id")] public string PaymentId { get; set; }
[JsonProperty("subaddr_index")] public SubaddrIndex SubaddrIndex { get; set; }
[JsonProperty("suggested_confirmations_threshold")]
public long SuggestedConfirmationsThreshold { get; set; }
[JsonProperty("timestamp")] public long Timestamp { get; set; }
[JsonProperty("txid")] public string Txid { get; set; }
[JsonProperty("type")] public string Type { get; set; }
[JsonProperty("unlock_time")] public long UnlockTime { get; set; }
}
}
}

@ -0,0 +1,33 @@
using Newtonsoft.Json;
namespace BTCPayServer.Services.Altcoins.Monero.RPC.Models
{
public partial class Info
{
[JsonProperty("address")] public string Address { get; set; }
[JsonProperty("avg_download")] public long AvgDownload { get; set; }
[JsonProperty("avg_upload")] public long AvgUpload { get; set; }
[JsonProperty("connection_id")] public string ConnectionId { get; set; }
[JsonProperty("current_download")] public long CurrentDownload { get; set; }
[JsonProperty("current_upload")] public long CurrentUpload { get; set; }
[JsonProperty("height")] public long Height { get; set; }
[JsonProperty("host")] public string Host { get; set; }
[JsonProperty("incoming")] public bool Incoming { get; set; }
[JsonProperty("ip")] public string Ip { get; set; }
[JsonProperty("live_time")] public long LiveTime { get; set; }
[JsonProperty("local_ip")] public bool LocalIp { get; set; }
[JsonProperty("localhost")] public bool Localhost { get; set; }
[JsonProperty("peer_id")] public string PeerId { get; set; }
[JsonProperty("port")]
[JsonConverter(typeof(ParseStringConverter))]
public long Port { get; set; }
[JsonProperty("recv_count")] public long RecvCount { get; set; }
[JsonProperty("recv_idle_time")] public long RecvIdleTime { get; set; }
[JsonProperty("send_count")] public long SendCount { get; set; }
[JsonProperty("send_idle_time")] public long SendIdleTime { get; set; }
[JsonProperty("state")] public string State { get; set; }
[JsonProperty("support_flags")] public long SupportFlags { get; set; }
}
}

@ -0,0 +1,13 @@
using Newtonsoft.Json;
namespace BTCPayServer.Services.Altcoins.Monero.RPC.Models
{
public partial class MakeUriRequest
{
[JsonProperty("address")] public string Address { get; set; }
[JsonProperty("amount")] public long Amount { get; set; }
[JsonProperty("payment_id")] public string PaymentId { get; set; }
[JsonProperty("tx_description")] public string TxDescription { get; set; }
[JsonProperty("recipient_name")] public string RecipientName { get; set; }
}
}

@ -0,0 +1,9 @@
using Newtonsoft.Json;
namespace BTCPayServer.Services.Altcoins.Monero.RPC.Models
{
public partial class MakeUriResponse
{
[JsonProperty("uri")] public string Uri { get; set; }
}
}

@ -0,0 +1,39 @@
using System;
using System.Globalization;
using Newtonsoft.Json;
namespace BTCPayServer.Services.Altcoins.Monero.RPC.Models
{
internal class ParseStringConverter : JsonConverter
{
public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
{
if (reader.TokenType == JsonToken.Null) return null;
var value = serializer.Deserialize<string>(reader);
long l;
if (Int64.TryParse(value, out l))
{
return l;
}
throw new Exception("Cannot unmarshal type long");
}
public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
{
if (untypedValue == null)
{
serializer.Serialize(writer, null);
return;
}
var value = (long)untypedValue;
serializer.Serialize(writer, value.ToString(CultureInfo.InvariantCulture));
return;
}
public static readonly ParseStringConverter Singleton = new ParseStringConverter();
}
}

@ -0,0 +1,9 @@
using Newtonsoft.Json;
namespace BTCPayServer.Services.Altcoins.Monero.RPC.Models
{
public partial class Peer
{
[JsonProperty("info")] public Info Info { get; set; }
}
}

@ -0,0 +1,10 @@
using Newtonsoft.Json;
namespace BTCPayServer.Services.Altcoins.Monero.RPC.Models
{
public partial class SubaddrIndex
{
[JsonProperty("major")] public long Major { get; set; }
[JsonProperty("minor")] public long Minor { get; set; }
}
}

@ -0,0 +1,14 @@
using Newtonsoft.Json;
namespace BTCPayServer.Services.Altcoins.Monero.RPC.Models
{
public partial class SubaddressAccount
{
[JsonProperty("account_index")] public long AccountIndex { get; set; }
[JsonProperty("balance")] public decimal Balance { get; set; }
[JsonProperty("base_address")] public string BaseAddress { get; set; }
[JsonProperty("label")] public string Label { get; set; }
[JsonProperty("tag")] public string Tag { get; set; }
[JsonProperty("unlocked_balance")] public decimal UnlockedBalance { get; set; }
}
}

@ -0,0 +1,13 @@
using System.Collections.Generic;
using Newtonsoft.Json;
namespace BTCPayServer.Services.Altcoins.Monero.RPC.Models
{
public partial class SyncInfoResponse
{
[JsonProperty("height")] public long Height { get; set; }
[JsonProperty("peers")] public List<Peer> Peers { get; set; }
[JsonProperty("status")] public string Status { get; set; }
[JsonProperty("target_height")] public long? TargetHeight { get; set; }
}
}

@ -0,0 +1,20 @@
using System.Globalization;
namespace BTCPayServer.Services.Altcoins.Monero.Utils
{
public class MoneroMoney
{
public static decimal Convert(long piconero)
{
var amt = piconero.ToString(CultureInfo.InvariantCulture).PadLeft(12, '0');
amt = amt.Length == 12 ? $"0.{amt}" : amt.Insert(amt.Length - 12, ".");
return decimal.Parse(amt, CultureInfo.InvariantCulture);
}
public static long Convert(decimal monero)
{
return System.Convert.ToInt64(monero * 1000000000000);
}
}
}

@ -3,10 +3,9 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using BTCPayServer.Services.Invoices;
using BTCPayServer.Services.Rates;
using NBitcoin;
using NBXplorer;
using Newtonsoft.Json;
namespace BTCPayServer
{
@ -44,12 +43,69 @@ namespace BTCPayServer
public string DefaultConfigurationFile { get; set; }
public int DefaultPort { get; set; }
}
public class BTCPayNetwork
public class BTCPayNetwork:BTCPayNetworkBase
{
public Network NBitcoinNetwork { get; set; }
public NBXplorer.NBXplorerNetwork NBXplorerNetwork { get; set; }
public bool SupportRBF { get; internal set; }
public string LightningImagePath { get; set; }
public BTCPayDefaultSettings DefaultSettings { get; set; }
public KeyPath CoinType { get; internal set; }
public Dictionary<uint, DerivationType> ElectrumMapping = new Dictionary<uint, DerivationType>();
public int MaxTrackedConfirmation { get; internal set; } = 6;
public string UriScheme { get; internal set; }
public KeyPath GetRootKeyPath(DerivationType type)
{
KeyPath baseKey;
if (!NBitcoinNetwork.Consensus.SupportSegwit)
{
baseKey = new KeyPath("44'");
}
else
{
switch (type)
{
case DerivationType.Legacy:
baseKey = new KeyPath("44'");
break;
case DerivationType.SegwitP2SH:
baseKey = new KeyPath("49'");
break;
case DerivationType.Segwit:
baseKey = new KeyPath("84'");
break;
default:
throw new ArgumentOutOfRangeException(nameof(type), type, null);
}
}
return baseKey
.Derive(CoinType);
}
public KeyPath GetRootKeyPath()
{
return new KeyPath(NBitcoinNetwork.Consensus.SupportSegwit ? "49'" : "44'")
.Derive(CoinType);
}
public override T ToObject<T>(string json)
{
return NBXplorerNetwork.Serializer.ToObject<T>(json);
}
public override string ToString<T>(T obj)
{
return NBXplorerNetwork.Serializer.ToString(obj);
}
}
public abstract class BTCPayNetworkBase
{
public string CryptoCode { get; internal set; }
public string BlockExplorerLink { get; internal set; }
public string UriScheme { get; internal set; }
public string DisplayName { get; set; }
[Obsolete("Should not be needed")]
@ -62,24 +118,20 @@ namespace BTCPayServer
}
public string CryptoImagePath { get; set; }
public string LightningImagePath { get; set; }
public NBXplorer.NBXplorerNetwork NBXplorerNetwork { get; set; }
public BTCPayDefaultSettings DefaultSettings { get; set; }
public KeyPath CoinType { get; internal set; }
public int MaxTrackedConfirmation { get; internal set; } = 6;
public string[] DefaultRateRules { get; internal set; } = Array.Empty<string>();
public bool SupportRBF { get; internal set; }
public Dictionary<uint, DerivationType> ElectrumMapping = new Dictionary<uint, DerivationType>();
public override string ToString()
{
return CryptoCode;
}
internal KeyPath GetRootKeyPath()
public virtual T ToObject<T>(string json)
{
return new KeyPath(NBitcoinNetwork.Consensus.SupportSegwit ? "49'" : "44'")
.Derive(CoinType);
return JsonConvert.DeserializeObject<T>(json);
}
public virtual string ToString<T>(T obj)
{
return NBitcoin.JsonConverters.Serializer.ToString(obj, null);
}
}
}

@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../Build/Version.csproj" Condition="Exists('../Build/Version.csproj')" />
<Import Project="../Build/Common.csproj" />
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.9" Condition="'$(TargetFramework)' == 'netcoreapp2.1'" />
<FrameworkReference Include="Microsoft.AspNetCore.App" Condition="'$(TargetFramework)' != 'netcoreapp2.1'" />
<PackageReference Include="NBXplorer.Client" Version="2.0.0.26" />
</ItemGroup>
</Project>

@ -7,7 +7,7 @@ using System.Threading.Tasks;
namespace BTCPayServer
{
class CustomThreadPool : IDisposable
public class CustomThreadPool : IDisposable
{
CancellationTokenSource _Cancel = new CancellationTokenSource();
TaskCompletionSource<bool> _Exited;

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace BTCPayServer
{
public static class UtilitiesExtensions
{
public static void AddRange<T>(this HashSet<T> hashSet, IEnumerable<T> items)
{
foreach (var item in items)
{
hashSet.Add(item);
}
}
}
}

@ -4,7 +4,6 @@ using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions.Internal;
using Microsoft.Extensions.Logging.Console;

@ -0,0 +1,259 @@
#if !NETCOREAPP21
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.IO;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using Newtonsoft.Json;
namespace Microsoft.Extensions.Logging.Console.Internal
{
/// <summary>
/// For non-Windows platform consoles which understand the ANSI escape code sequences to represent color
/// </summary>
internal class AnsiLogConsole : IConsole
{
private readonly StringBuilder _outputBuilder;
private readonly IAnsiSystemConsole _systemConsole;
public AnsiLogConsole(IAnsiSystemConsole systemConsole)
{
_outputBuilder = new StringBuilder();
_systemConsole = systemConsole;
}
public void Write(string message, ConsoleColor? background, ConsoleColor? foreground)
{
// Order: backgroundcolor, foregroundcolor, Message, reset foregroundcolor, reset backgroundcolor
if (background.HasValue)
{
_outputBuilder.Append(GetBackgroundColorEscapeCode(background.Value));
}
if (foreground.HasValue)
{
_outputBuilder.Append(GetForegroundColorEscapeCode(foreground.Value));
}
_outputBuilder.Append(message);
if (foreground.HasValue)
{
_outputBuilder.Append("\x1B[39m\x1B[22m"); // reset to default foreground color
}
if (background.HasValue)
{
_outputBuilder.Append("\x1B[49m"); // reset to the background color
}
}
public void WriteLine(string message, ConsoleColor? background, ConsoleColor? foreground)
{
Write(message, background, foreground);
_outputBuilder.AppendLine();
}
public void Flush()
{
_systemConsole.Write(_outputBuilder.ToString());
_outputBuilder.Clear();
}
private static string GetForegroundColorEscapeCode(ConsoleColor color)
{
switch (color)
{
case ConsoleColor.Black:
return "\x1B[30m";
case ConsoleColor.DarkRed:
return "\x1B[31m";
case ConsoleColor.DarkGreen:
return "\x1B[32m";
case ConsoleColor.DarkYellow:
return "\x1B[33m";
case ConsoleColor.DarkBlue:
return "\x1B[34m";
case ConsoleColor.DarkMagenta:
return "\x1B[35m";
case ConsoleColor.DarkCyan:
return "\x1B[36m";
case ConsoleColor.Gray:
return "\x1B[37m";
case ConsoleColor.Red:
return "\x1B[1m\x1B[31m";
case ConsoleColor.Green:
return "\x1B[1m\x1B[32m";
case ConsoleColor.Yellow:
return "\x1B[1m\x1B[33m";
case ConsoleColor.Blue:
return "\x1B[1m\x1B[34m";
case ConsoleColor.Magenta:
return "\x1B[1m\x1B[35m";
case ConsoleColor.Cyan:
return "\x1B[1m\x1B[36m";
case ConsoleColor.White:
return "\x1B[1m\x1B[37m";
default:
return "\x1B[39m\x1B[22m"; // default foreground color
}
}
private static string GetBackgroundColorEscapeCode(ConsoleColor color)
{
switch (color)
{
case ConsoleColor.Black:
return "\x1B[40m";
case ConsoleColor.Red:
return "\x1B[41m";
case ConsoleColor.Green:
return "\x1B[42m";
case ConsoleColor.Yellow:
return "\x1B[43m";
case ConsoleColor.Blue:
return "\x1B[44m";
case ConsoleColor.Magenta:
return "\x1B[45m";
case ConsoleColor.Cyan:
return "\x1B[46m";
case ConsoleColor.White:
return "\x1B[47m";
default:
return "\x1B[49m"; // Use default background color
}
}
}
internal class AnsiSystemConsole : IAnsiSystemConsole
{
private readonly TextWriter _textWriter;
/// <inheritdoc />
public AnsiSystemConsole(bool stdErr = false)
{
_textWriter = stdErr ? System.Console.Error : System.Console.Out;
}
public void Write(string message)
{
_textWriter.Write(message);
}
}
}
namespace Microsoft.Extensions.Logging.Console
{
internal interface IAnsiSystemConsole
{
void Write(string message);
}
public interface IConsole
{
void Write(string message, ConsoleColor? background, ConsoleColor? foreground);
void WriteLine(string message, ConsoleColor? background, ConsoleColor? foreground);
void Flush();
}
internal class WindowsLogConsole : IConsole
{
private readonly TextWriter _textWriter;
/// <inheritdoc />
public WindowsLogConsole(bool stdErr = false)
{
_textWriter = stdErr ? System.Console.Error : System.Console.Out;
}
private bool SetColor(ConsoleColor? background, ConsoleColor? foreground)
{
if (background.HasValue)
{
System.Console.BackgroundColor = background.Value;
}
if (foreground.HasValue)
{
System.Console.ForegroundColor = foreground.Value;
}
return background.HasValue || foreground.HasValue;
}
private void ResetColor()
{
System.Console.ResetColor();
}
public void Write(string message, ConsoleColor? background, ConsoleColor? foreground)
{
var colorChanged = SetColor(background, foreground);
_textWriter.Write(message);
if (colorChanged)
{
ResetColor();
}
}
public void WriteLine(string message, ConsoleColor? background, ConsoleColor? foreground)
{
var colorChanged = SetColor(background, foreground);
_textWriter.WriteLine(message);
if (colorChanged)
{
ResetColor();
}
}
public void Flush()
{
// No action required as for every write, data is sent directly to the console
// output stream
}
}
}
namespace Microsoft.Extensions.Logging.Abstractions.Internal
{
/// <summary>
/// An empty scope without any logic
/// </summary>
internal class NullScope : IDisposable
{
public static NullScope Instance { get; } = new NullScope();
private NullScope()
{
}
/// <inheritdoc />
public void Dispose()
{
}
}
}
#else
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
namespace Microsoft.AspNetCore.Mvc
{
/// <summary>
/// Provides programmatic configuration for JSON formatters using Newtonsoft.JSON.
/// </summary>
public class MvcNewtonsoftJsonOptions
{
IOptions<MvcJsonOptions> jsonOptions;
public MvcNewtonsoftJsonOptions(IOptions<MvcJsonOptions> jsonOptions)
{
this.jsonOptions = jsonOptions;
}
public JsonSerializerSettings SerializerSettings => this.jsonOptions.Value.SerializerSettings;
}
}
#endif

@ -6,7 +6,7 @@ using System.Text;
namespace BTCPayServer
{
class ZipUtils
public class ZipUtils
{
public static byte[] Zip(string unzipped)
{

@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../Build/Version.csproj" Condition="Exists('../Build/Version.csproj')" />
<Import Project="../Build/Common.csproj" />
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.4" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="2.1.2" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="2.1.2" />
<PackageReference Include="OpenIddict.EntityFrameworkCore" Version="3.0.0-alpha1.19515.63" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp2.1'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.0.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.0.1" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="3.0.0-rc1.final" />
<PackageReference Include="OpenIddict.EntityFrameworkCore" Version="3.0.0-alpha1.19515.63" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.0.0" />
</ItemGroup>
</Project>

@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace BTCPayServer.Data
{
public class AddressInvoiceData
{
/// <summary>
/// Some crypto currencies share same address prefix
/// For not having exceptions thrown by two address on different network, we suffix by "#CRYPTOCODE"
/// </summary>
[Obsolete("Use GetHash instead")]
public string Address
{
get; set;
}
public InvoiceData InvoiceData
{
get; set;
}
public string InvoiceDataId
{
get; set;
}
public DateTimeOffset? CreatedTime
{
get; set;
}
}
}

@ -1,11 +1,9 @@
using System.Linq;
using System;
using System.Linq;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using BTCPayServer.Models;
using BTCPayServer.Services.PaymentRequests;
using BTCPayServer.Services.U2F.Models;
using BTCPayServer.Storage.Models;
using Microsoft.EntityFrameworkCore.Infrastructure;
using OpenIddict.EntityFrameworkCore.Models;
namespace BTCPayServer.Data
{
@ -59,6 +57,9 @@ namespace BTCPayServer.Data
get; set;
}
public DbSet<WalletData> Wallets { get; set; }
public DbSet<WalletTransactionData> WalletTransactions { get; set; }
public DbSet<StoreData> Stores
{
get; set;
@ -222,9 +223,27 @@ namespace BTCPayServer.Data
.HasOne(o => o.StoreData)
.WithMany(i => i.PaymentRequests)
.OnDelete(DeleteBehavior.Cascade);
builder.Entity<PaymentRequestData>()
.Property(e => e.Created)
.HasDefaultValue(new DateTimeOffset(1970, 1, 1, 0, 0, 0, TimeSpan.Zero));
builder.Entity<PaymentRequestData>()
.HasIndex(o => o.Status);
builder.Entity<WalletTransactionData>()
.HasKey(o => new
{
o.WalletDataId,
#pragma warning disable CS0618
o.TransactionId
#pragma warning restore CS0618
});
builder.Entity<WalletTransactionData>()
.HasOne(o => o.WalletData)
.WithMany(w => w.WalletTransactions).OnDelete(DeleteBehavior.Cascade);
builder.UseOpenIddict<BTCPayOpenIdClient, BTCPayOpenIdAuthorization, OpenIddictScope<string>, BTCPayOpenIdToken, string>();
}
}

@ -45,7 +45,11 @@ namespace BTCPayServer.Data
class CustomNpgsqlMigrationsSqlGenerator : NpgsqlMigrationsSqlGenerator
{
#if NETCOREAPP21
public CustomNpgsqlMigrationsSqlGenerator(MigrationsSqlGeneratorDependencies dependencies) : base(dependencies)
#else
public CustomNpgsqlMigrationsSqlGenerator(MigrationsSqlGeneratorDependencies dependencies, IMigrationsAnnotationProvider annotations, Npgsql.EntityFrameworkCore.PostgreSQL.Infrastructure.Internal.INpgsqlOptions opts) : base(dependencies, annotations, opts)
#endif
{
}
@ -88,13 +92,13 @@ namespace BTCPayServer.Data
public void ConfigureBuilder(DbContextOptionsBuilder builder)
{
if (_Type == DatabaseType.Sqlite)
builder.UseSqlite(_ConnectionString);
builder.UseSqlite(_ConnectionString, o => o.MigrationsAssembly("BTCPayServer.Data"));
else if (_Type == DatabaseType.Postgres)
builder
.UseNpgsql(_ConnectionString)
.UseNpgsql(_ConnectionString, o => o.MigrationsAssembly("BTCPayServer.Data").EnableRetryOnFailure(10))
.ReplaceService<IMigrationsSqlGenerator, CustomNpgsqlMigrationsSqlGenerator>();
else if (_Type == DatabaseType.MySQL)
builder.UseMySql(_ConnectionString);
builder.UseMySql(_ConnectionString, o => o.MigrationsAssembly("BTCPayServer.Data").EnableRetryOnFailure(10));
}
}
}

@ -4,10 +4,8 @@ using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
using BTCPayServer.Data;
using BTCPayServer.Services.U2F.Models;
using BTCPayServer.Storage.Models;
namespace BTCPayServer.Models
namespace BTCPayServer.Data
{
// Add profile data for application users by adding properties to the ApplicationUser class
public class ApplicationUser : IdentityUser
@ -23,6 +21,8 @@ namespace BTCPayServer.Models
get; set;
}
public List<BTCPayOpenIdClient> OpenIdClients { get; set; }
public List<StoredFile> StoredFiles
{
get;

@ -0,0 +1,6 @@
using OpenIddict.EntityFrameworkCore.Models;
namespace BTCPayServer.Data
{
public class BTCPayOpenIdAuthorization : OpenIddictAuthorization<string, BTCPayOpenIdClient, BTCPayOpenIdToken> { }
}

@ -0,0 +1,10 @@
using OpenIddict.EntityFrameworkCore.Models;
namespace BTCPayServer.Data
{
public class BTCPayOpenIdClient: OpenIddictApplication<string, BTCPayOpenIdAuthorization, BTCPayOpenIdToken>
{
public string ApplicationUserId { get; set; }
public ApplicationUser ApplicationUser { get; set; }
}
}

@ -0,0 +1,6 @@
using OpenIddict.EntityFrameworkCore.Models;
namespace BTCPayServer.Data
{
public class BTCPayOpenIdToken : OpenIddictToken<string, BTCPayOpenIdClient, BTCPayOpenIdAuthorization> { }
}

@ -31,29 +31,6 @@ namespace BTCPayServer.Data
[Obsolete("Use GetCryptoCode instead")]
public string CryptoCode { get; set; }
#pragma warning disable CS0618
public Payments.PaymentMethodId GetPaymentMethodId()
{
return string.IsNullOrEmpty(CryptoCode) ? new Payments.PaymentMethodId("BTC", Payments.PaymentTypes.BTCLike)
: Payments.PaymentMethodId.Parse(CryptoCode);
}
public string GetAddress()
{
if (Address == null)
return null;
var index = Address.IndexOf("#", StringComparison.InvariantCulture);
if (index == -1)
return Address;
return Address.Substring(0, index);
}
public HistoricalAddressInvoiceData SetAddress(string depositAddress, string cryptoCode)
{
Address = depositAddress + "#" + cryptoCode;
CryptoCode = cryptoCode;
return this;
}
#pragma warning restore CS0618
public DateTimeOffset Assigned
{
get; set;

@ -1,5 +1,4 @@
using BTCPayServer.Models;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
@ -81,10 +80,5 @@ namespace BTCPayServer.Data
get; set;
}
public List<PendingInvoiceData> PendingInvoices { get; set; }
public Services.Invoices.InvoiceState GetInvoiceState()
{
return new Services.Invoices.InvoiceState(Status, ExceptionStatus);
}
}
}

@ -15,7 +15,7 @@ namespace BTCPayServer.Data
{
get; set;
}
public string UniqueId { get; internal set; }
public string UniqueId { get; set; }
public DateTimeOffset Timestamp
{
get; set;

@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace BTCPayServer.Data
{
public class PaymentRequestData
{
public string Id { get; set; }
public DateTimeOffset Created
{
get; set;
}
public string StoreDataId { get; set; }
public StoreData StoreData { get; set; }
public PaymentRequestStatus Status { get; set; }
public byte[] Blob { get; set; }
public class PaymentRequestBlob
{
public decimal Amount { get; set; }
public string Currency { get; set; }
public DateTime? ExpiryDate { get; set; }
public string Title { get; set; }
public string Description { get; set; }
public string Email { get; set; }
public string EmbeddedCSS { get; set; }
public string CustomCSSLink { get; set; }
public bool AllowCustomPaymentAmounts { get; set; }
}
public enum PaymentRequestStatus
{
Pending = 0,
Completed = 1,
Expired = 2
}
}
}

@ -0,0 +1,98 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using Newtonsoft.Json.Linq;
using System.Security.Claims;
namespace BTCPayServer.Data
{
public enum SpeedPolicy
{
HighSpeed = 0,
MediumSpeed = 1,
LowSpeed = 2,
LowMediumSpeed = 3
}
public class StoreData
{
public string Id
{
get;
set;
}
public List<UserStore> UserStores
{
get; set;
}
public List<AppData> Apps
{
get; set;
}
public List<PaymentRequestData> PaymentRequests
{
get; set;
}
public List<InvoiceData> Invoices { get; set; }
[Obsolete("Use GetDerivationStrategies instead")]
public string DerivationStrategy
{
get; set;
}
[Obsolete("Use GetDerivationStrategies instead")]
public string DerivationStrategies
{
get;
set;
}
public string StoreName
{
get; set;
}
public SpeedPolicy SpeedPolicy
{
get; set;
}
public string StoreWebsite
{
get; set;
}
public byte[] StoreCertificate
{
get; set;
}
[NotMapped]
public string Role
{
get; set;
}
public byte[] StoreBlob
{
get;
set;
}
[Obsolete("Use GetDefaultPaymentId instead")]
public string DefaultCrypto { get; set; }
public List<PairedSINData> PairedSINs { get; set; }
public IEnumerable<APIKeyData> APIKeys { get; set; }
}
public enum NetworkFeeMode
{
MultiplePaymentsOnly,
Always,
Never
}
}

@ -1,8 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations.Schema;
using BTCPayServer.Models;
namespace BTCPayServer.Storage.Models
namespace BTCPayServer.Data
{
public class StoredFile
{

@ -1,8 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using BTCPayServer.Models;
namespace BTCPayServer.Services.U2F.Models
namespace BTCPayServer.Data
{
public class U2FDevice
{

@ -1,5 +1,4 @@
using BTCPayServer.Models;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

@ -0,0 +1,84 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace BTCPayServer.Data
{
public class WalletData
{
[System.ComponentModel.DataAnnotations.Key]
public string Id { get; set; }
public List<WalletTransactionData> WalletTransactions { get; set; }
public byte[] Blob { get; set; }
}
public class Label
{
public Label(string value, string color)
{
if (value == null)
throw new ArgumentNullException(nameof(value));
if (color == null)
throw new ArgumentNullException(nameof(color));
Value = value;
Color = color;
}
public string Value { get; }
public string Color { get; }
public override bool Equals(object obj)
{
Label item = obj as Label;
if (item == null)
return false;
return Value.Equals(item.Value, StringComparison.OrdinalIgnoreCase);
}
public static bool operator ==(Label a, Label b)
{
if (System.Object.ReferenceEquals(a, b))
return true;
if (((object)a == null) || ((object)b == null))
return false;
return a.Value == b.Value;
}
public static bool operator !=(Label a, Label b)
{
return !(a == b);
}
public override int GetHashCode()
{
return Value.GetHashCode(StringComparison.OrdinalIgnoreCase);
}
}
public class WalletBlobInfo
{
public Dictionary<string, string> LabelColors { get; set; } = new Dictionary<string, string>();
public IEnumerable<Label> GetLabels(WalletTransactionInfo transactionInfo)
{
foreach (var label in transactionInfo.Labels)
{
if (LabelColors.TryGetValue(label, out var color))
{
yield return new Label(label, color);
}
}
}
public IEnumerable<Label> GetLabels()
{
foreach (var kv in LabelColors)
{
yield return new Label(kv.Key, kv.Value);
}
}
}
}

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace BTCPayServer.Data
{
public class WalletTransactionData
{
public string WalletDataId { get; set; }
public WalletData WalletData { get; set; }
public string TransactionId { get; set; }
public string Labels { get; set; }
public byte[] Blob { get; set; }
}
public class WalletTransactionInfo
{
public string Comment { get; set; } = string.Empty;
[JsonIgnore]
public HashSet<string> Labels { get; set; } = new HashSet<string>();
}
}

@ -1,9 +1,13 @@
using Microsoft.EntityFrameworkCore.Migrations;
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20170913143004_Init")]
public partial class Init : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)

@ -1,9 +1,13 @@
using Microsoft.EntityFrameworkCore.Migrations;
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20170926073744_Settings")]
public partial class Settings : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)

@ -1,9 +1,13 @@
using Microsoft.EntityFrameworkCore.Migrations;
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20170926084408_RequiresEmailConfirmation")]
public partial class RequiresEmailConfirmation : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)

@ -1,9 +1,13 @@
using Microsoft.EntityFrameworkCore.Migrations;
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20171006013443_AddressMapping")]
public partial class AddressMapping : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)

@ -1,9 +1,13 @@
using Microsoft.EntityFrameworkCore.Migrations;
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20171010082424_Tokens")]
public partial class Tokens : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)

@ -1,9 +1,13 @@
using Microsoft.EntityFrameworkCore.Migrations;
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20171012020112_PendingInvoices")]
public partial class PendingInvoices : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)

@ -1,9 +1,13 @@
using Microsoft.EntityFrameworkCore.Migrations;
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20171023101754_StoreBlob")]
public partial class StoreBlob : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)

@ -1,9 +1,13 @@
using Microsoft.EntityFrameworkCore.Migrations;
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20171024163354_RenewUsedAddresses")]
public partial class RenewUsedAddresses : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)

@ -1,9 +1,13 @@
using Microsoft.EntityFrameworkCore.Migrations;
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20171105235734_PaymentAccounted")]
public partial class PaymentAccounted : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)

@ -1,9 +1,13 @@
using Microsoft.EntityFrameworkCore.Migrations;
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20171221054550_AltcoinSupport")]
public partial class AltcoinSupport : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)

@ -1,9 +1,13 @@
using Microsoft.EntityFrameworkCore.Migrations;
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20180106095215_DerivationStrategies")]
public partial class DerivationStrategies : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)

@ -1,9 +1,13 @@
using Microsoft.EntityFrameworkCore.Migrations;
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20180109021122_defaultcrypto")]
public partial class defaultcrypto : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)

@ -1,9 +1,13 @@
using Microsoft.EntityFrameworkCore.Migrations;
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20180114123253_events")]
public partial class events : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)

@ -1,9 +1,13 @@
using Microsoft.EntityFrameworkCore.Migrations;
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20180402095640_appdata")]
public partial class appdata : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)

@ -1,9 +1,13 @@
using Microsoft.EntityFrameworkCore.Migrations;
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20180429083930_legacyapikey")]
public partial class legacyapikey : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)

@ -1,7 +1,11 @@
using Microsoft.EntityFrameworkCore.Migrations;
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20180719095626_CanDeleteStores")]
public partial class CanDeleteStores : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)

@ -1,8 +1,12 @@
using System;
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20190121133309_AddPaymentRequests")]
public partial class AddPaymentRequests : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)

@ -1,7 +1,11 @@
using Microsoft.EntityFrameworkCore.Migrations;
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20190219032533_AppsTagging")]
public partial class AppsTagging : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)

@ -0,0 +1,171 @@
using System;
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20190225091644_AddOpenIddict")]
public partial class AddOpenIddict : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "OpenIddictApplications",
columns: table => new
{
ClientId = table.Column<string>(maxLength: 100, nullable: false),
ClientSecret = table.Column<string>(nullable: true),
ConcurrencyToken = table.Column<string>(maxLength: 50, nullable: true),
ConsentType = table.Column<string>(nullable: true),
DisplayName = table.Column<string>(nullable: true),
Id = table.Column<string>(nullable: false),
Permissions = table.Column<string>(nullable: true),
PostLogoutRedirectUris = table.Column<string>(nullable: true),
Properties = table.Column<string>(nullable: true),
RedirectUris = table.Column<string>(nullable: true),
Type = table.Column<string>(maxLength: 25, nullable: false),
ApplicationUserId = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_OpenIddictApplications", x => x.Id);
table.ForeignKey(
name: "FK_OpenIddictApplications_AspNetUsers_ApplicationUserId",
column: x => x.ApplicationUserId,
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "OpenIddictScopes",
columns: table => new
{
ConcurrencyToken = table.Column<string>(maxLength: 50, nullable: true),
Description = table.Column<string>(nullable: true),
DisplayName = table.Column<string>(nullable: true),
Id = table.Column<string>(nullable: false),
Name = table.Column<string>(maxLength: 200, nullable: false),
Properties = table.Column<string>(nullable: true),
Resources = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_OpenIddictScopes", x => x.Id);
});
migrationBuilder.CreateTable(
name: "OpenIddictAuthorizations",
columns: table => new
{
ApplicationId = table.Column<string>(nullable: true),
ConcurrencyToken = table.Column<string>(maxLength: 50, nullable: true),
Id = table.Column<string>(nullable: false),
Properties = table.Column<string>(nullable: true),
Scopes = table.Column<string>(nullable: true),
Status = table.Column<string>(maxLength: 25, nullable: false),
Subject = table.Column<string>(maxLength: 450, nullable: false),
Type = table.Column<string>(maxLength: 25, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_OpenIddictAuthorizations", x => x.Id);
table.ForeignKey(
name: "FK_OpenIddictAuthorizations_OpenIddictApplications_ApplicationId",
column: x => x.ApplicationId,
principalTable: "OpenIddictApplications",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "OpenIddictTokens",
columns: table => new
{
ApplicationId = table.Column<string>(nullable: true),
AuthorizationId = table.Column<string>(nullable: true),
ConcurrencyToken = table.Column<string>(maxLength: 50, nullable: true),
CreationDate = table.Column<DateTimeOffset>(nullable: true),
ExpirationDate = table.Column<DateTimeOffset>(nullable: true),
Id = table.Column<string>(nullable: false),
Payload = table.Column<string>(nullable: true),
Properties = table.Column<string>(nullable: true),
ReferenceId = table.Column<string>(maxLength: 100, nullable: true),
Status = table.Column<string>(maxLength: 25, nullable: false),
Subject = table.Column<string>(maxLength: 450, nullable: false),
Type = table.Column<string>(maxLength: 25, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_OpenIddictTokens", x => x.Id);
table.ForeignKey(
name: "FK_OpenIddictTokens_OpenIddictApplications_ApplicationId",
column: x => x.ApplicationId,
principalTable: "OpenIddictApplications",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_OpenIddictTokens_OpenIddictAuthorizations_AuthorizationId",
column: x => x.AuthorizationId,
principalTable: "OpenIddictAuthorizations",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_OpenIddictApplications_ApplicationUserId",
table: "OpenIddictApplications",
column: "ApplicationUserId");
migrationBuilder.CreateIndex(
name: "IX_OpenIddictApplications_ClientId",
table: "OpenIddictApplications",
column: "ClientId",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_OpenIddictAuthorizations_ApplicationId_Status_Subject_Type",
table: "OpenIddictAuthorizations",
columns: new[] { "ApplicationId", "Status", "Subject", "Type" });
migrationBuilder.CreateIndex(
name: "IX_OpenIddictScopes_Name",
table: "OpenIddictScopes",
column: "Name",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_OpenIddictTokens_AuthorizationId",
table: "OpenIddictTokens",
column: "AuthorizationId");
migrationBuilder.CreateIndex(
name: "IX_OpenIddictTokens_ReferenceId",
table: "OpenIddictTokens",
column: "ReferenceId",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_OpenIddictTokens_ApplicationId_Status_Subject_Type",
table: "OpenIddictTokens",
columns: new[] { "ApplicationId", "Status", "Subject", "Type" });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "OpenIddictScopes");
migrationBuilder.DropTable(
name: "OpenIddictTokens");
migrationBuilder.DropTable(
name: "OpenIddictAuthorizations");
migrationBuilder.DropTable(
name: "OpenIddictApplications");
}
}
}

@ -1,8 +1,12 @@
using System;
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20190324141717_AddFiles")]
public partial class AddFiles : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)

@ -1,8 +1,12 @@
using System;
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20190425081749_AddU2fDevices")]
public partial class AddU2fDevices : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)

@ -0,0 +1,28 @@
using System;
using BTCPayServer.Data;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
namespace BTCPayServer.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20190701082105_sort_paymentrequests")]
public partial class sort_paymentrequests : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<DateTimeOffset>(
name: "Created",
table: "PaymentRequests",
nullable: false,
defaultValue: new DateTimeOffset(new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)));
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Created",
table: "PaymentRequests");
}
}
}

Some files were not shown because too many files have changed in this diff Show More