Compare commits

...

1188 Commits

Author SHA1 Message Date
f09d6618c9 Make the Metadata JToken, do not crash if posData has duplicate fields 2021-04-12 14:28:13 +09:00
b12c4c5fa0 Improve and unify page headers (#2412)
* Improve and unify page headers

* Altcoin test fixes

* Update BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Update BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Fix missing store name in pairing view

* Fix CanUsePairing test

* Bump header navigation font size

* Use partial tag instead of Html.PartialAsync in views

As suggested by @nicolasdorier. These are equivalent, see details [here](https://docs.microsoft.com/en-us/aspnet/core/mvc/views/partial?view=aspnetcore-3.1#partial-tag-helper).

* Fix docs link

As in #2432.

* Update BTCPayServer/Views/Wallets/SignWithSeed.cshtml

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>

* Update BTCPayServer/Views/Wallets/WalletSendVault.cshtml

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>

* Update BTCPayServer/Views/Wallets/WalletTransactions.cshtml

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
2021-04-08 22:32:42 +09:00
6473da7114 Merge pull request #2444 from bolatovumar/increase-landing-page-copy-contrast
Increase landing page masthead text contrast
2021-04-08 13:38:44 +02:00
bb78ae59d4 Merge pull request #2432 from dennisreimann/fix-hot-wallet-docs-link
Fix hot wallet docs link
2021-04-08 12:21:11 +02:00
459f3c4a93 Document and handle Invoice Metadata better (#2401)
* Document and handle Invoice Metadata better

PosData would crash in certain scenarios when created via API. Invoice metadata known fields were not completely documented

* Fix value setter when null

* fix swagger conformity

* make all swagger invoice metadata optional looking in json
2021-04-08 16:42:18 +09:00
e014b30915 Remove on code warning 2021-04-08 14:33:58 +09:00
cc5a388106 Properly escape script inputs for shopify integration 2021-04-08 13:44:51 +09:00
5de93f8cc4 Abstract Store integrations (#2384)
* Decouple Shopify from Store

* Decouple shopify from store blob

* Update BTCPayServer.Tests.csproj

* Make sure shopify obj is set

* make shopify a system plugin
2021-04-08 13:37:05 +09:00
ad1b708da5 Provide more data through OnChain Wallet API (#2420)
Provides unconf/conf balanaces, keypath + address + timestamp of utxos
2021-04-08 12:43:51 +09:00
c7ff36b314 Increase landing page masthead text contrast 2021-04-07 19:37:35 -07:00
f367480857 GreenField: Add FeeRate To Wallets API (#2375)
* GreenField: Add FeeRate To Wallets API

closes #1846

* make dedicated endpoint for fee rate

* remove unused call
2021-04-07 15:16:17 +09:00
475809b1a0 Make Invoice Create Faster And Fix Gap Limit Issue (#1843)
* Make Invoice Create Faster And Fix Gap Limit Issue

This make address reserve only when user "activate" paymet method in ui. optional setting in store checkout ui.

* Fix swagger documentation around Lazy payment methods

* fix changed code signature

* Add missing GreenField API for activate feature

* Fix checkout experience styling for activate feature

* Fix issue with Checkout activate button

* Make lightning also work with activation

* Make sure PreparePaymentModel is still called on payment handlers even when unactivated

* Make payment  link return empty if not activated

* Add activate payment method method to client and add test

* remove debugger

* add e2e test

* Rearranging lazy payments position in UI to be near dependent Unified QR code

* fix rebase conflicts

* Make lazy payment method mode activate on UI load.

Co-authored-by: Kukks <evilkukka@gmail.com>
Co-authored-by: rockstardev <rockstardev@users.noreply.github.com>
Co-authored-by: Andrew Camilleri <kukks@btcpayserver.org>
2021-04-07 13:08:42 +09:00
fce7fdb3b7 Update link 2021-04-06 16:32:04 +02:00
b2c72f1d75 Merge pull request #2435 from bolatovumar/fix/2434
Set new store hints consistently for API and GUI
2021-04-06 14:50:11 +02:00
f0ac7d2c16 Set new store hints consistently for API and GUI
closes #2434
2021-04-05 21:24:34 -07:00
7099a3b394 Fix hot wallet docs link
# Conflicts:
#	BTCPayServer/Views/Server/Policies.cshtml
2021-04-05 21:29:41 +02:00
3e985d8554 Fix crash when sat is negative (liquid only) (#2418) 2021-04-05 12:39:37 +09:00
f94e8c9719 Fix typo in PoS cart view (#2428)
Noticed by @MaxHillebrand 👀
2021-04-05 12:39:02 +09:00
bbe1442c28 Merge pull request #2422 from kristapsk/explorer.bc-2.jp
Fix block explorer links for signet
2021-04-03 12:47:01 +02:00
3a248d7707 Fix block explorer links for signet 2021-04-03 09:19:36 +03:00
0bb1f16d2a Merge pull request #2416 from g33kme/patch-1
Update swagger.template.stores-wallet.on-chain.json
2021-04-01 13:59:45 +02:00
0837756152 Update swagger.template.stores-wallet.on-chain.json 2021-04-01 13:48:06 +02:00
23236c96cb Remove internal setters in BTCPayNetwork 2021-04-01 08:56:22 +02:00
6ead5c3800 Plugin FailSafe (#2351)
This introduces the concept of plugins being disabled in the case of an unrecoverable runtime error caused by a plugin.
2021-04-01 12:27:22 +09:00
64db865e1e Changelog 2021-04-01 12:16:23 +09:00
1b2399745d Remove stable and latest branch 2021-04-01 12:06:29 +09:00
94acf60100 Properly show browser date 2021-04-01 11:55:43 +09:00
a4298e8c19 Ensure root app mapping works (#2415)
close #2414
2021-04-01 11:49:46 +09:00
76985838c4 Improve Lightning setup page (#2348)
* Redesign Lightning setup page

* Improve Lightning setup page

Closes #1811.

* Test fix

* Fix LightningNetworkPaymentMethodAPITests

* Bootstrap customization fix
2021-03-31 20:23:36 +09:00
d24964e900 Merge pull request #2378 from dennisreimann/ui-improvements
UI: Header and navigation improvements
2021-03-31 16:08:37 +09:00
f4fde8f5f7 Merge pull request #2386 from btcpayserver/feat/lnd-v0.12.1-beta
Bumping LND to v0.12.1
2021-03-31 12:35:39 +09:00
3461dd6464 Changelog for 1.0.7.1 2021-03-30 23:54:43 +09:00
560671b57f Remove autocorrect and autocapitalize for seed input 2021-03-30 19:21:29 +09:00
abf3962d91 Remove old styles 2021-03-30 11:38:04 +02:00
f53a85fcd1 Bootstrap customization fix 2021-03-30 11:38:03 +02:00
73730355b8 Add active indicator for main navigation 2021-03-30 11:38:02 +02:00
8827721605 Layout: Update header and navigation 2021-03-30 11:38:01 +02:00
2497413c60 Fix test 2021-03-30 17:15:03 +09:00
a6537ef282 Update lightning charge 2021-03-30 17:08:58 +09:00
c92adc36c6 Remove useless file 2021-03-30 15:23:36 +09:00
a64f71f186 Add user email search and sort (#2305)
* Add user sort by email

* Add user search by email
2021-03-30 14:32:44 +09:00
0c766a2714 Merge pull request #2287 from bumbummen99/patch-3
Fix payment request template
2021-03-30 14:30:56 +09:00
6b7c49431a Merge pull request #2339 from AlexGidge/1725-pull-payments-display-date
Changed display date format on View Pull Payments screen
2021-03-30 14:29:46 +09:00
4b37121b75 Updated "required" form input styling (#2373) 2021-03-30 14:27:42 +09:00
120c7b9730 Ensure submitting empty currency does not break update PoS page (#2376) 2021-03-30 14:26:33 +09:00
1aa233ca47 Order files list by descending timestamp (#2374)
closes #2273
2021-03-30 14:26:02 +09:00
14e6e492dd Refactor domain mapping (#2407) 2021-03-30 11:47:03 +09:00
17bdf55bcc Remove misleading title from hint icon (#2393)
Brought up by @Zaxounette [on Mattermost](https://chat.btcpayserver.org/btcpayserver/pl/yrxqodfswbby5qj69zhpojuefc).
2021-03-30 11:18:24 +09:00
1ae6508a43 Make dates/timespan swagger docs more clear (#2399)
* Make dates/tiemspan swagger docs more clear

* fix schema conformity
2021-03-30 11:18:00 +09:00
b7b6cef880 Fix ratelimiter for forgotpassword 2021-03-28 20:56:46 +09:00
52b5c56da9 Bumping LND to use the latest docker image 2021-03-26 08:52:17 -05:00
85ba9e96a0 Rate limit password forgot 2021-03-26 18:01:59 +09:00
b4e15cb27f Fix Pay-Button url preview (#2397)
* Fix #2396

Adresses #2396 by creating a new element and setting the url as text rather as html.

* Fix closing tag
2021-03-26 16:37:15 +09:00
068cfe5e3e Decrease command timeout for selenium 2021-03-26 14:31:36 +09:00
c0449a633d Revert "Fix docker-compose for arm64 dev env"
This reverts commit 7dfce5e3061d5e0ada87ede81960f0a50d86615d.
2021-03-26 13:22:54 +09:00
7dfce5e306 Fix docker-compose for arm64 dev env 2021-03-26 12:44:55 +09:00
fd53f7476e Fix flaky test (#2392) 2021-03-24 21:33:49 +09:00
ceb541ad8a Upgrade to Bootstrap v4.6 (#2379)
Also upgrades jQuery from v3.2.1 to v3.6.0
2021-03-24 18:47:55 +09:00
d92ced6c6b Make CanUsePayjoin2 more resilient 2021-03-24 14:18:54 +09:00
0847088391 Make CanUsePayjoin2 more resilient 2021-03-24 13:55:46 +09:00
a128685b83 If an input already used in a payjoin is reused in another, we should not attempt to broadcast the original transaction. 2021-03-24 13:48:33 +09:00
749d26fafa Revert "Fix Payjoin test randomly crashing"
This reverts commit 485faf014183321420da8ae7babf5eb9e2668034.
2021-03-23 23:59:26 +09:00
485faf0141 Fix Payjoin test randomly crashing 2021-03-23 18:34:34 +09:00
af9d896510 Do not use Random 2021-03-23 17:53:23 +09:00
1fc114fec7 Check the authentication cookie every 5 min rather than 30min 2021-03-23 17:43:13 +09:00
e6938cef6f Merge pull request #2389 from pavlenex/supportercc
Add new supporter to readme
2021-03-22 17:17:42 +01:00
ffafd291ee replace the svg with an improved one 2021-03-22 17:05:46 +01:00
f532759543 add Coincards supporter to readme 2021-03-22 11:28:04 +01:00
db3ba6db3c Merge pull request #2385 from AryanJ-NYC/fix-swag-docs
fix swagger docs missing query param
2021-03-21 16:44:06 +01:00
0a333f8476 Merge pull request #2383 from bolatovumar/fix/2382
Update Swagger for "/api/v1/stores/{storeId}/payment-methods/LightningNetwork"
2021-03-21 10:50:11 +01:00
738aaeed12 Update Swagger for "/api/v1/stores/{storeId}/payment-methods/LightningNetwork" 2021-03-20 19:53:03 -07:00
ce6c9c91fc Make sure payment method uppercase logic only happens for BTC 2021-03-20 06:52:18 +01:00
7035b71ccd Fix POS item newline break (#2366)
* Fix POS item newline break

fixes #2365

* Update TemplateEditor.cshtml

* fix template editor with "

* apply sanitize on save
2021-03-19 23:25:04 +09:00
923a567822 Make cookies secure 2021-03-19 20:54:30 +09:00
9b24e9378f Explicitely disallow \ for in filename 2021-03-19 20:22:24 +09:00
779f21a1ca Make sure cookie are HttpOnly 2021-03-19 20:09:55 +09:00
73d70aa5e5 Better validate file names 2021-03-19 18:55:21 +09:00
fc78eacf8f Merge pull request #2329 from btcpayserver/addbettermenu
Make main menu show text instead of icons when on small screens
2021-03-18 19:16:21 +01:00
006af636e6 Merge pull request #2372 from nosovk/patch-1
turn of autocomplete for PrivKey input
2021-03-16 17:29:25 +01:00
4575fda10a turn of autocomplete for "BIP39 Seed (12/24 word mnemonic phrase) or HD private key" input
autocomplete not pretend to be safe store for your wallet key
2021-03-16 16:05:16 +02:00
6c960628c2 Update pull payment template 2021-03-15 13:27:14 +01:00
00aa7deaae Fix payment request template
Fix payment request template body/page height and footer style.
2021-03-15 13:25:20 +01:00
f722956864 Merge pull request #2341 from britttttk/improve-sign-seed-copy
Fix typos on wallet sign with seed page
2021-03-15 09:14:54 +01:00
8f520bff12 Merge pull request #2350 from btcpayserver/fix/selenium-tests
Attempting selenium test fix for CanUseLightningSatsFeature
2021-03-14 18:57:41 -05:00
8398534fa0 Attempting selenium test fix for CanUseLightningSatsFeature
Swithcing to using WaitForElement and simplifying finding of alert message
2021-03-14 18:43:16 -05:00
e1fed90b71 bump versions 2021-03-11 22:48:40 +09:00
5ba6e53379 Changelog for 1.0.7.0 2021-03-11 22:45:47 +09:00
d33bdfd50c Make CanUseCoinSelection less flaky 2021-03-11 22:20:25 +09:00
4f5392eb74 Fix test 2021-03-11 22:18:02 +09:00
064087a7c0 fix test 2021-03-11 22:08:36 +09:00
e13821ba49 Fix view-seed 2021-03-11 21:58:20 +09:00
c2b85779c3 Rewrite the CanUseHotWallet, check if the derivationscheme is actually a hotwallet, before retrieving the seed 2021-03-11 21:46:32 +09:00
cdfdad3e3d GreenField API: Wallet API (#2246)
* GreenField: Wallet API

* more work

* wip

* rough fiunish of transaction sending api

* Allow to create tx without broadcasting and small fixes

* Refactor Wallet Receive feature ad add greenfield api for address reserve for wallet

* add wallet api client

* add docs

* fix json converter tags

* fixes and add wallet tests

* fix tests

* fix rebase

* fixes

* just pass the tests already

* ugggh

* small cleanup

* revert int support in numeric string converter and make block id as native number in json

* fix LN endpoint

* try fix flaky test

* Revert "try fix flaky test"

This reverts commit 2e0d256325b892f7741325dcbab01196f74d182a.

* try fix other flaky test

* return proepr error if fee rate could not be fetched

* try fix test again

* reduce fee related logic for wallet api

* try reduce code changes for pr scope

* change auth logic for initial release of wallet api
2021-03-11 21:34:52 +09:00
1f7992e5da Remove some code duplication 2021-03-11 21:29:13 +09:00
4bad7d7c52 Fix issue with store payment methods after having payment method that is no longer supported (#2349) 2021-03-10 19:51:51 +09:00
1fcf39d4ab Fix new store incorrectly showing lightning enabled even if not 2021-03-09 17:56:17 +09:00
a64e304d16 Fix new store showing incorrectly being paired to internal node 2021-03-09 17:54:38 +09:00
30c7cbba96 Fix issue around new bech uppercase + vault supported flag (#2337) 2021-03-09 12:45:56 +09:00
a7d324901d Reverted "Last Refreshed" back to "Last Updated"
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-03-08 08:45:16 +00:00
15c87dc0b6 Fix typos on wallet sign with seed page 2021-03-07 23:30:40 -07:00
0d2de4c421 #1725 - Changed to display in user's local date time format 2021-03-07 23:19:39 +00:00
da95bd6127 #1725 - Added start date & changed display timezone 2021-03-07 22:51:50 +00:00
e31b5529b0 Fixed a typo in README.md. (#2331) 2021-03-07 20:54:36 +09:00
0836df6974 Update invoice log row styling (#2334)
closes #2328
2021-03-07 20:50:55 +09:00
de4cd55adf Update coingecko exchanges 2021-03-06 13:58:02 +09:00
6b156f2144 Reenabling uppercase BECH32 in QR codes (#2181)
* Reenabling uppercase BECH32 in QR codes

* Fixing the test now that we're uppercasing BECH32 address

* Implementing Nicolas' feedback

Co-authored-by: rockstardev <rockstardev@users.noreply.github.com>
2021-03-06 13:52:25 +09:00
2b1efd9347 Merge pull request #2296 from dennisreimann/wallet-setup-finetuning
Wallet setup finetuning
2021-03-06 13:51:01 +09:00
97dd10edc0 Fix some NRE in the FileService 2021-03-06 13:36:36 +09:00
cc4e46d212 Fix NRE if invoice not found 2021-03-06 13:25:40 +09:00
dc0671942d Make main menu show text instead of icons when on small screens 2021-03-05 08:48:15 +01:00
f79c8ab641 Xpub import: Toggle multi-sig examples 2021-03-04 11:07:05 +01:00
314fda7877 Update import wallet cells 2021-03-03 22:27:39 +01:00
aaf77515fc Update icons 2021-03-03 21:29:03 +01:00
b5f7b1aad4 Hover and active states for wizard navigation 2021-03-03 21:17:25 +01:00
d36974a47e Fix test 2021-03-02 12:26:19 +01:00
5bd16f990c Add replace confirmation; distinguish wallet types 2021-03-02 12:26:18 +01:00
28d7924077 Fix AltcoinTests 2021-03-02 12:26:17 +01:00
89ecba961c Remove old AddDerivationSchemes views 2021-03-02 12:26:16 +01:00
3481a5fd19 Fix wording 2021-03-02 12:26:15 +01:00
70a21c5136 Refactoring: Move checking condition up 2021-03-02 12:26:15 +01:00
2e2c9764f3 Remove old Stores.BTCLike controller 2021-03-02 12:26:14 +01:00
bd447b6c79 Fix test 2021-03-02 11:50:01 +09:00
4f6ec3aa32 Merge pull request #2325 from btcpayserver/fix/nextnetworkfee-null
Returning 0 for NextNetworkFee if it's null
2021-03-02 11:19:43 +09:00
e37b3179ba Reactivate CanGetRateCryptoCurrenciesByDefault for DSH 2021-03-02 11:14:52 +09:00
808214f973 Fix Rates Test (Dash rate source switched to bitfinex) (#2324)
fixes #2323
2021-03-02 11:13:05 +09:00
7e714f1ef8 Refactor how we handle and validate LN ConnectionStrings (#2314)
* Refactor how we handle and validate LN ConnectionStrings

* Migrate existing connection string to Internal Node if they are the same. Cleanup some obsolete fields

* Fix typos, remove duplicated method

* Add a InternalNodeRef to LightningSupportedPaymentMethod
2021-03-02 11:11:58 +09:00
e65e46f664 NextNetworkFee is not directly initialized, falling back to null check 2021-03-01 09:56:57 -06:00
5e7eb6635f Initializing NextNetworkFee values if GetFee returns null 2021-03-01 09:33:02 -06:00
49ae62b02e Use library for Payjoin Sender (#2158)
* Use library for Payjoin Sender

* update payjoin sender to use new package and reduce code

* fix using statements
2021-03-01 22:44:53 +09:00
c9cfe5cc6e Fix direct URL for local storage with custom root path (#2318)
* Fix direct URL for local storage with custom root path

* Remove "Context.Request.PathBase" when generating file URL display string
2021-03-01 22:43:57 +09:00
e8df010449 Add redirectAutomatically to GreenField Invoice API (#2321) 2021-03-01 22:34:07 +09:00
949136b161 GreenField API: Configure Store Lightning Payment Method v2 (#2208)
* GreenField API: Configure Store Lightning Payment Method

* Remove internal ln node endpoint and use Auth service to check internal node usage

* fix test
2021-02-26 11:58:51 +09:00
1e00c63146 Merge pull request #2308 from dennisreimann/policies-ui
Improve policies structure and wordings
2021-02-26 11:49:00 +09:00
6d9b93a407 Merge pull request #2299 from dennisreimann/pos-item-button-text
PoS: Custom buy button text per product
2021-02-26 11:45:44 +09:00
37c39ad587 Merge pull request #2309 from btcpayserver/invoice-status-marker
Allow invoice to be marked even when new
2021-02-26 11:26:09 +09:00
e3e65878aa Allow invoice to be marked even when new
fixes #2019
2021-02-26 11:17:03 +09:00
6843b0eaab Merge pull request #2301 from btcpayserver/gf/paymenttypeparse
Make payment type parsing more dynamic
2021-02-26 11:00:27 +09:00
e25f76753a Update BTCPayServer.Tests/README.md
Co-authored-by: Max Hillebrand <30683012+MaxHillebrand@users.noreply.github.com>
2021-02-24 17:16:27 +01:00
75c2fabd7f Make Selenium test more robust
Fixes an issue similar to what we fixed in #2293.
2021-02-24 15:10:05 +01:00
35aeb19fcd Controller cleanups 2021-02-24 15:10:04 +01:00
5a00f6a4fc Fix missing view name 2021-02-24 15:10:03 +01:00
3a9fc52b8c Add "vertical-align: middle;" to pay button image CSS (#2312)
closes #2311
2021-02-24 15:10:02 +01:00
64a8de938b Update BTCPayServer.Tests/README.md
Co-authored-by: Pavlenex <pavle@pavle.org>
2021-02-24 15:09:45 +01:00
605cf407a8 Update README.md
Update README.md #2210
2021-02-24 15:06:16 +01:00
9ed5297e91 Update README.md
Using Polar to test Lightning payments.
2021-02-24 15:06:15 +01:00
07da404a23 Merge pull request #2310 from dennisreimann/webhooks-controller
Webhooks controller fix and cleanup
2021-02-24 22:03:01 +09:00
21467ef65d Add "vertical-align: middle;" to pay button image CSS (#2312)
closes #2311
2021-02-24 22:01:05 +09:00
4d5b2c4033 Make Selenium test more robust
Fixes an issue similar to what we fixed in #2293.
2021-02-23 16:57:21 +01:00
5e7836b293 Controller cleanups 2021-02-23 16:51:58 +01:00
a6fe61d508 Fix missing view name 2021-02-23 16:51:11 +01:00
c0aa320f0a Improve policies structure and wordings
Closes #2307.
2021-02-23 10:39:26 +01:00
4bcc18fb41 JavaScript formatting fixes 2021-02-23 09:51:25 +01:00
32370545cb Fix variable assignment in yaml parsing loop 2021-02-23 09:50:54 +01:00
2fd8c831c0 Merge pull request #2210 from radWorx/dev-with-polar
Update README.md
2021-02-22 10:22:16 +01:00
5b4877c402 PoS: Custom buy button text for custom price 2021-02-22 08:59:59 +01:00
71c11b34f4 Make payment type parsing more dynamic
fixes bug described in #2297
2021-02-19 08:23:55 +01:00
3123718166 Crowdfund: Add custom buy button text 2021-02-18 12:32:43 +01:00
dfbec71906 PoS: Add test for custom buy button text 2021-02-18 12:20:27 +01:00
757c087afd PoS: Custom buy button text per product
Closes #2232.
2021-02-18 10:54:06 +01:00
b30aa968b0 Merge pull request #2293 from dennisreimann/flaky-selenium
Tame flaky Selenium tests
2021-02-18 09:39:28 +01:00
1e902c8dee Tests: Toggle advanced settings via JS instead 2021-02-17 15:54:05 +01:00
db5f64432e Tests: Wait for advanced settings closing animation 2021-02-17 12:34:58 +01:00
6c9c463da9 Fix plugin projects reference in solution (#2292)
Fixes #2262.
2021-02-17 10:56:48 +01:00
c73878ccca Fix missing hot wallet option on seed import (#2284)
* Fix missing hot wallet option on seed import

Thanks @kukks for spotting!

* Tests: Wait for button to be ready for interaction

* Camelcase test selectors

* Tests: Remove general ImplicitWait

* Tests: Add WaitForAndClick helper

* Tests: Refactor SetCheckbox

* Tests: Add WaitForElement helper

* Tests: Refactor and use wait.UntilJsIsReady helper

* Fix missing helper in ethereum tests

* Tests: Some more refactorings
2021-02-17 12:14:29 +09:00
41e453306d Merge pull request #2288 from bumbummen99/patch-4
Fix view payment request loading spinner alignment
2021-02-17 12:10:18 +09:00
626c6007fd Merge pull request #2286 from btcpayserver/remove-upload-limit
Remove Max body request size
2021-02-16 10:40:43 +09:00
deb88032cb Update README.md
added missing space,
moved below Using the test lightning-cli
2021-02-15 15:15:38 -05:00
eca317b3c4 Fix view payment request loading spinner alignment 2021-02-15 16:37:38 +01:00
9300326483 Remove Max body request size
Upload limit by kestrel restricts plugin upload of 30mb+. this removes that limit
2021-02-15 13:42:08 +01:00
ebc46eb7d2 fix swagger docs missing query param
fixes #2268
2021-02-15 10:05:54 +01:00
cb83669802 Merge pull request #2283 from bumbummen99/patch-2
Fix cart pay button loading spinner vertical alignment
2021-02-15 11:17:57 +09:00
f6f616a21d Fix cart pay button loading spinner vertical alignment 2021-02-14 21:05:26 +01:00
62d50c0189 Profile email change should check email's availability (#2281) 2021-02-12 16:48:43 +09:00
dd5b143c13 Update BTCPayServer/Controllers/ManageController.cs
Co-authored-by: d11n <mail@dennisreimann.de>
2021-02-12 16:48:26 +09:00
2e864c32fa Profile email change should check email's availability 2021-02-12 12:48:05 +09:00
f4fa7c927c Wallet setup redesign (#2164)
* Prepare existing layouts and views

* Add icon view component and sprite svg

* Add wallet setup basics

* Add import method view basics

* Use external sprite file instead of inline svg

* Refactor hardware wallet setup flow

* Manually enter an xpub

* Prepare other views

* Update views and models

* Finalize wallet setup flow

* Updat tests, part 1

* Update tests, part 2

* Vaul: Fix missing retry button

* Add better Scan QR subtext

Still tbd.

* Make wallet account an advanced setting

* Prevent empty xpub

* Use textarea for seed input

* Remove redundant error message for missing file upload

* Confirm store updates after generating a new wallet

* Update wording

* Modify existing wallets

* Fix proposed method name

* Suggest using ColdCard Electrum export option only

Advise the user to use the electrum export of the coldcard instead of saying either electrum or wasabi export file … the electurm one contains more info, e.g. the wasabi one doesn't include the account key path.

* More concise WalletSetupMethod setting

* Test fix

* Update wallet removal code

* Fix back navigation quirk in change wallet case

* Fix behaviour on wallet enable/disable

* Fix initial wallet setup

* Improve modify view and messages

* Test fixes

* Seed import fix

Uses the correct form url for confirming addresses

* Quickfixes from design meeting

* Add enable toggle switch on modify page

* Confirm wallet removal

* Update setup view

* Update import view

* Icon finetuning

* Improve import options page

* Refactor QR code scanner

Allow for usage with and without modal

* Update copy and instructions on import pages

* Split generate options: Hot wallet and watch-only

* Implement hot wallet options correctly

* Minor test changes

* Navbar improvements

* Fix tables

* Fix badge color

* Routing related updates

Thanks @kukks for the suggestions!

* Wording updates

Thanks @kukks for the suggestions!

* Extend address types table for xpub import

Thanks @kukks for the suggestions!

* Rename controller

* Unify precondition checks

* Improve removal warning for hot wallets

* Add tooltip on why seed import is not recommended

* Add tooltip icon

* Add Specter import info
2021-02-11 19:48:54 +09:00
3736cbc107 Merge pull request #2252 from dennisreimann/specter-wallet-file
Add Specter wallet file import
2021-02-10 23:02:26 +09:00
776825cc66 Merge pull request #2240 from dennisreimann/onchain-symbol
Invoices list: Remove icon indicator for onchain
2021-02-10 22:48:34 +09:00
5cb647e57f Merge pull request #2248 from bolatovumar/fix-2247
Ensure "No" selection is maintained for custom price in POS app
2021-02-10 22:42:55 +09:00
9c5f826bb4 Merge pull request #2256 from bumbummen99/patch-1
Fix current version
2021-02-10 22:35:34 +09:00
6b1803629d Merge pull request #2258 from dennisreimann/tabindex
Login: Improve tab navigation for input fields
2021-02-10 22:35:09 +09:00
5cea0571e3 Merge pull request #2265 from dennisreimann/checkout-tabs
Checkout: Fix scan/copy tab sizes with varying content
2021-02-10 22:34:24 +09:00
95c8afd5ba Merge pull request #2261 from ketominer/fix-mysql-2021
fixed mysql support
2021-02-10 18:26:20 +09:00
ecc9a34359 Checkout: Fix scan/copy tab sizes with varying content
Fixes #2264.
2021-02-08 17:54:40 +01:00
1fed7fb5af fix for sqlite 2021-02-07 21:14:31 +01:00
93d1ded4c2 fixed mysql support 2021-02-07 20:57:48 +01:00
f199775437 Register: Autofocus email field on page load 2021-02-05 13:04:21 +01:00
40271f420d Login: Improve tab navigation for input fields
Improves the tab indexes so that keyboard navigation goes: Email > Password > Sign in > Create account > Forgot password.

Also autofocuses the email field so that you can start typing right away.

Closes #2257.
2021-02-05 13:01:55 +01:00
9e71c02eb9 Merge pull request #2239 from pavlenex/readme-improvements
Readme overhaul
2021-02-05 11:29:16 +01:00
c9cbfe630d Fix current version 2021-02-05 03:02:15 +01:00
bf9331b147 Merge pull request #2251 from dennisreimann/api-lightning
Fix empty GetLightningClient return value
2021-02-04 11:26:15 +09:00
f223d2e00c Add Specter wallet file import
Closes #2223.
2021-02-03 16:36:45 +01:00
5246e7f035 Fix empty GetLightningClient return value 2021-02-03 11:19:35 +01:00
42de0803c9 Ensure "No" selection is maintained for custom price in POS app 2021-02-02 20:13:39 -08:00
242f9c6197 Merge pull request #2241 from btcpayserver/feat/lnd-0.12.0-beta
Updating development LND to v0.12.0-beta
2021-02-02 12:56:29 +09:00
5288198474 Updating connection to merchant_lnd for tests 2021-02-01 01:37:58 -06:00
b21353c4f9 Updating LND in altcoins docker file as well 2021-02-01 01:37:12 -06:00
65a0c6a4b3 Updating development LND to v0.12.0-beta 2021-02-01 00:55:13 -06:00
af5bd89f34 Invoices list: Remove icon indicator for onchain
As [discussed on the chat](https://chat.btcpayserver.org/btcpayserver/pl/tcjy5ornhbd8i8jm4yj9y3maie) the icon feels unnecessary and isn't clear to users. Leaving it off and only indicating Lightning transactions avoids confusion.
2021-01-30 18:53:21 +01:00
73aeffd13c Apply suggestions from code review
Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
2021-01-30 10:58:48 +01:00
03d2f6c017 Merge pull request #2209 from btcpayserver/invoice-metadata-test
Improve test on Greenfield Inoice metadata update
2021-01-30 11:17:11 +09:00
7e1481c43f Apply suggestions from code review
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-01-29 18:31:41 +01:00
8a1069bf70 Apply suggestions from code review
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-01-29 18:30:57 +01:00
6097ab5d12 Update README.md
Co-authored-by: d11n <mail@dennisreimann.de>
2021-01-29 14:04:35 +01:00
d951575f80 Merge branch 'readme-improvements' of https://github.com/pavlenex/btcpayserver into readme-improvements 2021-01-29 12:38:47 +01:00
d887546e58 remove chat 2021-01-29 12:37:59 +01:00
ec3b80cec9 Apply suggestions from code review
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2021-01-29 12:36:12 +01:00
2ef442cf83 Improve readme 2021-01-29 12:19:51 +01:00
6e5a4a7546 Update changelog.md 2021-01-29 18:36:26 +09:00
e0d46002cb Changelog 1.0.6.8 2021-01-29 18:31:40 +09:00
739f13b7a3 Merge pull request #2234 from dennisreimann/safe-browsing
Safe browsing quick fixes
2021-01-29 18:24:11 +09:00
34af74b288 Apply URL changes from code review
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

Update BTCPayServer/Controllers/AccountController.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

Update BTCPayServer/Controllers/AccountController.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

Update BTCPayServer/Controllers/AccountController.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

Update BTCPayServer/Controllers/AccountController.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

Update BTCPayServer/Controllers/AccountController.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

Update BTCPayServer/Controllers/AccountController.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2021-01-28 12:33:12 +01:00
4ee0cc8145 Remove clipboard code from main-bundle
See https://github.com/btcpayserver/btcpayserver/issues/2139#issuecomment-768216462
2021-01-28 10:48:06 +01:00
4984674b1d Remove Tor URL from login and register page
Brave and Tor Browser now show availaibility of Tor automatically in the url box of the browser.
2021-01-28 10:47:28 +01:00
f5ee67aafb Remove allowtransparency from checkout overlay 2021-01-28 10:34:34 +01:00
98a1b0da71 Update public account URLs
- /Account/Login -> /login
- /Account/Register -> /register
- /Account/ForgotPassword -> /forgot-password
2021-01-28 10:08:22 +01:00
074ff76d49 Merge pull request #2221 from dennisreimann/selenium-tests
Selenium tests: Remove hacks, make them more reliable
2021-01-27 17:50:57 +09:00
b75409a6bf Remove Firefox as option for Selenium tests 2021-01-27 09:35:14 +01:00
94abda6e3e bump lightning libs 2021-01-27 17:21:18 +09:00
68419a9510 Improve password reset email copy (#2211)
* Reset password email copy unified and updated

* Grammar fix for reset email copy

* Email strings added to facilitate html and style and call to action

* First pass html. Saving for later

* Compacted the html and inline styles and removed logo

Co-authored-by: Salie Hendricks <salie@safarinow.com>
2021-01-27 08:42:47 +01:00
db0854f203 Update NBitcoin, NetworkType => ChainName, signet support (#2224) 2021-01-27 14:39:38 +09:00
994301ea4c Bump Bitcoin Core and NBXPlorer (#2222) 2021-01-26 21:01:32 +09:00
5e344b9be7 Fix missing user secrets code 2021-01-26 10:22:17 +01:00
66d3da8ac9 Remove function checks as they didn't help 2021-01-26 09:40:31 +01:00
71bb876c9e Configure browser settings with user secrets
Default to headless Chrome
2021-01-25 17:23:08 +01:00
1e029f3290 Fix EthereumTests 2021-01-25 16:49:20 +01:00
7926b689fd Default to headless, add Firefox, update Chrome 2021-01-25 15:01:53 +01:00
4638f781f9 Fix JS error 2021-01-25 14:11:11 +01:00
8bea1505dd Cleanups, remove WaitForPageLoad hack 2021-01-25 14:10:40 +01:00
e567f7a80c Refactor tests
Remove the hacky `ScrollTo`, `ForceClick` and `WaitForElement`.
Add the hacky `WaitForPageLoad`.
2021-01-25 13:04:58 +01:00
3774e8dc51 Merge pull request #2207 from btcpayserver/feat/new-error-pages
New Error Pages
2021-01-24 23:49:36 -06:00
dc27ffa6ba Http error page 406 for our dear man Jack
Yes, acceptable
2021-01-24 13:41:30 -06:00
ca25eedfbc Extracting common layout for Error Pages 2021-01-24 13:33:34 -06:00
1627c05224 Fixing typos and grammar
Co-authored-by: Umar Bolatov <bolatovumar@gmail.com>
2021-01-24 13:19:26 -06:00
f65ca04507 Http error 502, Miles page 2021-01-24 13:19:26 -06:00
a662b6ef6a Http error 417, page for Pavlenex 2021-01-24 13:19:26 -06:00
bd6d38b3b0 Tests: Move extension method 2021-01-22 12:57:46 +01:00
a890d5300b Update BTCPayServer.Tests/README.md
Co-authored-by: Pavlenex <pavle@pavle.org>
2021-01-19 13:30:45 -05:00
eb8411611a Update README.md
Update README.md #2210
2021-01-19 13:07:19 -05:00
9360ddf294 Merge branch 'dev-with-polar' of https://github.com/radworx/btcpayserver into dev-with-polar 2021-01-19 13:04:32 -05:00
e3c138fa98 Update README.md
Update README.md #2210
2021-01-19 13:02:26 -05:00
7147dadb2a Remove dependency to DBriize 2021-01-19 17:19:32 +09:00
8d03738a50 Update BTCPayServer.Tests/README.md
Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
2021-01-18 22:52:21 -05:00
e5540ee79f Update BTCPayServer.Tests/README.md
Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
2021-01-18 22:52:09 -05:00
2ccbb6d6a7 Update BTCPayServer.Tests/README.md
Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
2021-01-18 22:51:59 -05:00
3dce7e7e9f Update README.md
Using Polar to test Lightning payments.
2021-01-18 22:15:52 -05:00
79e8ce9226 Improve test on Greenfield Inoice metadata update 2021-01-18 14:24:38 +01:00
89857ca77c Merge pull request #2202 from btcpayserver/fix/error-pages
Improving styling of error pages in preparation for adding new ones
2021-01-17 10:10:02 -06:00
5ce60be78a Update BTCPayServer/Views/Shared/_BTCPaySupporters.cshtml
Co-authored-by: d11n <mail@dennisreimann.de>
2021-01-17 10:09:50 -06:00
600cc20423 changelog 2021-01-17 21:50:02 +09:00
987d09041d bump 2021-01-17 21:45:54 +09:00
df52d01a1d Revert "GreenField API: Configure Store Lightning Payment Method"
This reverts commit b40095f6039dbce20ee92b2da8cd4530c7b8b486.
2021-01-17 21:40:16 +09:00
07de4af581 Revert "Apply suggestions from code review"
This reverts commit 48b2e682bf758ad76b8a50ddcc4473a19f5b0836.
2021-01-17 21:39:20 +09:00
95c50dcc0d Changelog and new release (#2204)
* Changelog and new release

* Update Changelog.md
2021-01-17 19:14:36 +09:00
71a192d0ba Fix SQLite COnnection string setter 2021-01-17 10:02:59 +01:00
9acb8c2ba2 Restoring project name in partial 2021-01-16 16:26:35 -06:00
307f7b6bd7 Improving styling of error pages in preparation for adding new ones 2021-01-16 14:55:31 -06:00
83dd80ae86 Prevent access to wallet features if derivation scheme isn't set (#2196) 2021-01-16 19:48:05 +09:00
ccfa85b5e0 fix compile errors 2021-01-16 09:22:07 +01:00
e59821caa1 GetInvoiceRaw used its own dbContext while calling code used a different one which causes the calling context not to track changes - thus nothing is saved. (#2197)
Co-authored-by: Salie Hendricks <salie@safarinow.com>
2021-01-16 09:00:19 +01:00
2215e5e069 Merge pull request #2194 from btcpayserver/gf/ln-payment-emthod
GreenField API: Configure Store Lightning Payment Method
2021-01-14 10:07:00 +01:00
48b2e682bf Apply suggestions from code review
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-01-14 09:19:16 +01:00
5750da574a Add info on how to run the altcoin docker-compose (#2193) 2021-01-13 19:26:53 +01:00
b40095f603 GreenField API: Configure Store Lightning Payment Method 2021-01-12 09:25:35 +01:00
ec11585223 Update Changelog 2021-01-11 23:46:17 +09:00
eedf189d44 Improve logs of the invoice text search import 2021-01-11 23:41:05 +09:00
f027d36db8 Do not spam logs for inventory events 2021-01-11 23:33:21 +09:00
0c79474e0c Do not index metadata 2021-01-11 23:32:32 +09:00
610f9e2b22 Log text search migration progress 2021-01-11 23:06:59 +09:00
4db4b28369 Fix crash if DerivationSchemeSettings.Parse parse a 2-of scheme 2021-01-11 22:47:32 +09:00
18464f5cd5 bump 2021-01-11 19:12:48 +09:00
cf24c1307a Changelog 1.0.6.5 (#2192)
* Changelog 1.0.6.5

* Update Changelog.md

Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>

Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-01-11 19:12:00 +09:00
35e870a8e7 Revert "Remove tests of chaincoin default rate provider (#2189)"
This reverts commit 56daf347b914cf60a99128b96fdca94072af95a5.
2021-01-11 12:11:25 +09:00
01be74b219 Add Bitcoin Output descriptor support (#2169)
* Add Output descriptor support

* Fix exception message and fix Parse Deriv Scheme Settings when electrum

* fix test
2021-01-11 11:22:42 +09:00
b8da6847b9 Plugins flexibility PR (#2129)
* Plugins flexibility PR

* Makes the BTCPayServerOptions.LoadArgs async to support Plugin hooks and actions
* relax the private set modifiers in the BTCPayNetwork
* Separate IPluginHookService from PluginService to reduce dependencies on DI
* fix some small bugs around image path
* Fix bug with new dbreeze migration where data dir was incorrect

* Update BTCPayServer/Plugins/PluginHookService.cs

Co-authored-by: rockstardev <5191402+rockstardev@users.noreply.github.com>

* Update BTCPayServer/Plugins/PluginHookService.cs

Co-authored-by: rockstardev <5191402+rockstardev@users.noreply.github.com>

Co-authored-by: rockstardev <5191402+rockstardev@users.noreply.github.com>
2021-01-07 14:49:53 +01:00
e2e37a0db4 Make sure that the invoice currency is normalized to uppercase (Fix #2146) 2021-01-07 22:30:57 +09:00
56daf347b9 Remove tests of chaincoin default rate provider (#2189) 2021-01-07 22:11:14 +09:00
5098f63175 Merge pull request #2188 from dennisreimann/patch-1
UI: Wrap notification text
2021-01-07 14:01:21 +01:00
d9b12a6927 UI: Wrap notification text
Fixes #2187.
2021-01-07 13:58:23 +01:00
fe4ffcfc62 Update notification dropdown styling (#2167)
* Update notification dropdown strings

* Update notification dropdown styling

address #2131

* Update border color

* Update notification hover color

* Revert "was confirmed paid" to "has been paid" change

* Move styles to site.css

* Update style="border-bottom: 0;" to border-bottom-0

* Update heading

* Add icon sprite

* Add default icon styles

* Use "currentColor" instead of specific color for icon

* Update icon color definition

* Adjust dropdown position

* Update h4 to h5
2021-01-07 18:07:42 +09:00
64a68b95b0 Add API Key QR scan + click to reveal api key in List view (#2174) 2021-01-07 17:56:35 +09:00
58d01738ab More Options refactoring (#2179)
* More Options refactoring

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

* Move COnfigure logic for Options to the Startup
2021-01-06 23:51:13 +09:00
a18dae6d04 Merge pull request #2185 from btcpayserver/fix/deleting-dbriize
Deleting DBriize database folder if present
2021-01-06 10:59:24 +09:00
b2959e583a Use default color for label if the color of a label is not set 2021-01-05 16:33:24 +09:00
a38a4d6f69 Merge pull request #2180 from btcpayserver/attempt-onion-modal-fix
Do not tell tor browser to redirect if invoice is loaded as a modal
2021-01-05 14:04:14 +09:00
0a6ea59254 Rewrite the condition to show Onion-Location in a more readable way 2021-01-05 13:44:08 +09:00
04984a51e6 Fixing bug when MigratedInvoiceTextSearchPages is null 2021-01-04 22:40:50 -06:00
8947f13dbe Deleting legacy DBriize database if present 2021-01-04 22:35:00 -06:00
c0549d872c Bump HtmlSanitizer from 4.0.217 to 5.0.372 in /BTCPayServer (#2183)
Bumps [HtmlSanitizer](https://github.com/mganss/HtmlSanitizer) from 4.0.217 to 5.0.372.
- [Release notes](https://github.com/mganss/HtmlSanitizer/releases)
- [Commits](https://github.com/mganss/HtmlSanitizer/compare/v4.0.217...v5.0.372)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-05 13:22:39 +09:00
adcd5f0737 Update year (#2184) 2021-01-05 12:38:30 +09:00
0929857b12 Attempt to solve webhooks disappearing (#2178) 2021-01-05 12:38:12 +09:00
7d21b39534 Do not tell browser to redirect if invoice is loaded as a modal
fixes #2089
2021-01-03 14:29:19 +01:00
aaf85216eb Split Options in BTCPayOptions (#2175)
* Split Options in BTCPayOptions

* fix spacing
2021-01-02 13:44:28 +01:00
2c87100ffb Restoring tracking of selected objects so updates work as expected 2021-01-01 02:01:33 -06:00
6c22546577 Merge pull request #2172 from btcpayserver/fix/db-refactoring
Refactoring db entities to follow conventions
2021-01-01 01:58:52 -06:00
24177ffc46 Removing partial class since Emperor requested it 2020-12-31 14:08:58 -06:00
8ae4315d43 Database Migration: Removing migration with wrong table name and refreshing 2020-12-31 14:08:58 -06:00
a588c72e6c Database Migration: Renaming InvoiceSearches table to follow convention 2020-12-31 14:08:58 -06:00
a656f86003 Refactoring ApplicationDbContext to order tables and OnModelCreating calls 2020-12-31 14:08:58 -06:00
c9dc60be7b Refactoring Data entities to fit one standard convention 2020-12-31 14:08:57 -06:00
91cb9129ab FGreenField: Add DefaultPaymentMethod to Stores API (#2171) 2020-12-29 18:33:44 +09:00
ae32fdeea7 Introduce Additional Data to Store Blob and move obsolete props to migration (#2065)
* Introduce Additional Data to Store Blob and move obsolete props to migration

* Fixes and tests

* Small adjustements to prevent tracking too many objects

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2020-12-29 17:58:35 +09:00
5803512820 Remove Default from OnChainPayment Method (#2170)
Makes more sense to do it on the Store endpoint after thinking about it.
2020-12-29 17:38:31 +09:00
553b1f139b Updating links to Zap wallet now that domain moved 2020-12-28 17:18:12 -06:00
623347bc48 Add Label and accountKeyPath to the on chain payment methods (#2166) 2020-12-28 13:59:01 +01:00
f64f86fbb6 Make sure the invoice migration loop can be interrupted 2020-12-28 19:13:00 +09:00
39b5462809 Remove only dependency on Dbriize (TextSearch in new invoice column) (#2029)
* Remove only dependency on Dbriize (TextSearch in new invoice column)

* Switch to table for invoice text search

* Adding missing using after rebase

* Removing database migration in preparation for refresh

* Database Migration: Adding InvoiceSearchData

* Refactoring InvoicesRepository to make AddToTextSearch static and non-async

Operation as async is too expensive for simple filtering and AddRange

* Renaming InvoiceQuery property to Take

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

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

* Adding DbMigrationsHostedService that performs long running data migrations

* Commenting special placing of MigrationStartupTask

* Simplifying code and leaving comment on expected flow

* Resolving problems after merge

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

Co-authored-by: rockstardev <rockstardev@users.noreply.github.com>
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2020-12-28 19:10:53 +09:00
a6ee64ea63 Remove DB and Directory settings out of the BTCPayServerOptions (#2168) 2020-12-27 22:06:00 +09:00
0dcd834535 Improve error checks 2020-12-23 14:10:53 +09:00
f0fc0441bd Remove useless constant 2020-12-23 14:07:24 +09:00
69eaaef963 GreenField: Store OnChain Payment Method (#2157)
* GreenField: Store set payment methods

* add swagger docs

* fix swagger
2020-12-23 14:00:38 +09:00
9dbfe22171 add greenfield authorize UI docs and fix small issues (#2156)
* add greenfield authorize UI docs and fix small issues

* Update ManageController.APIKeys.cs

* Apply suggestions from code review

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

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2020-12-23 13:19:38 +09:00
5ca4e71c34 Introduce QR Code View component (#2125)
* Introduce QR Code View component

* more cleanup

* fix js clipboard

* Fix clipboard confirmation width calculation

* fix tests

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2020-12-22 11:18:51 +09:00
26b04e70b1 Fix for classic theme header CSS (#2159)
Fixes #2155.
2020-12-21 14:43:33 +01:00
ad2430496d UI improvements (#2151)
* UI: Consistent spacing on maintenance view

* UI: Empty states for apps, stores and wallets

* UI: Empty state for file storage

* UI: Toggle invoice selection in list on row click

* Update ChromeDriver

* Fix selector in payjoin test
2020-12-21 12:26:43 +01:00
d4ecfa79d6 rename UIExtensionPoint folder (#2154)
Rename to avoid build crashes on Ubuntu
2020-12-21 05:32:41 +01:00
8f4cd929cd Changelog 1.0.6.4 2020-12-18 12:22:11 +09:00
fb213b0e0f Fix Coin selection label filtering 2020-12-17 16:24:49 +01:00
e48d18279c API: Fix behaviour after first admin signup (#2150)
Without updating the `FirstRun` setting it is not possible to login after signing up via the API. Otherwise the `HomeController.Index` action always redirects to the Registration page.
2020-12-17 12:27:01 +01:00
5f46b48d45 API: Fix for invoice not found (#2148)
In case the invoice ID was invalid, this resulted in an exception instead of a 404.
2020-12-17 06:43:43 +01:00
0cc24c8076 UI: Improve invoice view (#2144)
* UI: Improve invoice view

- General improvements for the spacings on the page
- Hides rows of data in case they aren't present
- Improved the PoS data view so that it renders complex objects nicely and adds links for URLs

TDB: For the last row "Links" there's now a special `_urls` property, which renders a list of urls with the key being the title and the value being the URL.

* Update BTCPayServer/Views/Invoice/Invoice.cshtml

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* UI: Handle arrays in PosData view

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2020-12-16 09:15:33 +01:00
2738c749dc Attempt to fix bug of broken Mark as Seen button on deployed instances 2020-12-15 15:44:36 +09:00
a7b178b844 API Keys: Add usage examples link to docs (#2140) 2020-12-15 14:35:18 +09:00
69c44b19d4 Merge pull request #2133 from pavlenex/master
Re-structure issue template
2020-12-14 10:12:33 +01:00
e6abce8022 Apply Kukk's suggestions from code review
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2020-12-13 13:20:52 +01:00
ab64bbc3b0 bump version 2020-12-13 20:40:17 +09:00
5da83e9945 Changelog for 1.0.6.3 (#2135) 2020-12-13 20:39:22 +09:00
0e6a8cc33e improve bug report template
- Add emoji
- Add hidden text to avoid repetition when people file an issue
- add more blank space so it's clear where people need to type
- formatting and better context
2020-12-12 17:52:51 +01:00
2e2ea657ef delete feature request template
Feature request shouldn't be in the issues unless accepted by the community.
2020-12-12 17:40:37 +01:00
e5fb9e2d31 update config yml template 2020-12-12 17:37:00 +01:00
1386f205fd DateTime.Now.ToUniversalTime -> DateTime.UtcNow 2020-12-12 15:25:08 +09:00
a294ad41cb Ensure campaign status is shown correctly in minimal crowdfund app (#2062) 2020-12-12 15:23:59 +09:00
ed497cab99 Hide pagination & page size when not necessary (#2122)
* UI: Hide pagination and page size when not necessary

* UI: Use pager component for notifications list

* UI: Use pager component for wallet transactions list

* UI: Improve pager component

* Fix from code review
2020-12-12 15:21:37 +09:00
282d0abb62 Remove bitpay translator (#2130) 2020-12-12 15:17:44 +09:00
034b732e7c GreenField: Update invoice metadata (#2095)
* GreenField: Update invoice metadata

* add swagger

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2020-12-12 15:15:34 +09:00
b1e9c005b7 Add "Mark all as seen" button to notification dropdown (#2101) 2020-12-12 14:14:50 +09:00
0d144d088e Refactor label implementation (Fix #2090) (#2123) 2020-12-12 14:10:47 +09:00
b2855e74ef Document miscallenous features in the swagger doc (#2128) 2020-12-12 14:07:25 +09:00
0652e30c30 GreenField: Notifications API (#2055)
* GreenField: Notifications API

This refactors notifications so that we dont have a bunch of duplicated direct access to db contexts in controllers and then introduces new endpoints to fetch/toggle seen/remove  notifications of the current user.

* add tests + docs

* fix test

* pr changes

* fix permission json
2020-12-11 23:11:08 +09:00
1c58fabc30 Merge pull request #2127 from NicolasDorier/doclinks
Add links to API documentation for better discovery
2020-12-11 22:52:27 +09:00
262ba6ee1e Add links to API documentation for better discovery 2020-12-11 22:48:53 +09:00
e0534577d1 Make tests a big stronger 2020-12-11 13:41:39 +09:00
c12423f28b update languages 2020-12-11 12:58:13 +09:00
3dd6577b32 Use the FindBestMatch of LanguageService to fetch the checkout lang 2020-12-11 12:56:13 +09:00
a638b4fb28 Merge pull request #2124 from NicolasDorier/checkoutlink
Add checkoutLink and defaultLang to GreenField invoice
2020-12-11 12:28:17 +09:00
798cf66e3f Add checkoutLink and defaultLanguage to GreenField invoice 2020-12-11 12:04:18 +09:00
6cf29123f3 Merge pull request #2119 from btcpayserver/greenfield/redirectURL
Add redirectURL to create invoice on Greenfield
2020-12-10 22:33:43 +09:00
e65d42bd61 Add redirectURL to create invoice on Greenfield 2020-12-09 23:20:13 +09:00
febf8ac5b3 Fix doc for create invoice request 2020-12-09 22:55:00 +09:00
c8a9b66694 Merge pull request #2113 from bolatovumar/feat/add-pull-payment-css
Add ability to add custom CSS to pull payments
2020-12-09 21:33:16 +09:00
9c185f1081 Merge pull request #2118 from dennisreimann/store-setup-mobile
UI: Improve mobile store setup view
2020-12-09 18:43:49 +09:00
0a444508f8 UI: Improve mobile store setup view
According to [this comment](https://github.com/btcpayserver/btcpayserver/pull/2117#issuecomment-741255465).
2020-12-09 09:45:45 +01:00
1d00ee41c4 Merge pull request #2086 from dennisreimann/u2f-update
U2F: Update lib and improve error display
2020-12-09 17:33:22 +09:00
266434fe7b Merge pull request #2116 from btcpayserver/testfixer
Attempt to fix flaky tests
2020-12-09 16:44:46 +09:00
7c88333060 Merge pull request #2106 from btcpayserver/email-spam-protect
Introduce Spam protection
2020-12-09 16:43:49 +09:00
e0b561b12a Update new pull payment page heading 2020-12-08 18:25:59 -08:00
16e5e2d757 Add ability to associate custom CSS with a pull payment 2020-12-08 18:25:58 -08:00
8a07c62603 Merge pull request #2117 from dennisreimann/store-setup-mobile
UI: Improve mobile store setup view
2020-12-09 00:02:24 +09:00
4df847bc10 UI: Improve mobile store setup view
According to [this comment](https://github.com/btcpayserver/btcpayserver/pull/2087#issuecomment-737672180).
2020-12-08 15:33:20 +01:00
b5df44ce8e Merge pull request #2115 from btcpayserver/pay-button-app-fix
FIx Pay Button Link preview when app mode chosen
2020-12-08 22:54:42 +09:00
716952cd58 Attempt to fix flaky tests 2020-12-08 10:02:03 +01:00
7b9b418e93 FIx Pay Button Link preview when app mode chosen
Apps cannot have a link as they only have a POST action.
2020-12-08 09:49:51 +01:00
dfd7c6d4a6 add tests and reword setting 2020-12-08 08:12:29 +01:00
920caaa524 Pull language updates 2020-12-08 15:23:15 +09:00
13f10657b8 Fix bug: When creating API Key for non-admin, some checked permissions were not included (Fix #2107 and Fix #2002) 2020-12-08 15:20:59 +09:00
dd5fd2e5bb Make sure checkout is not null in createinvoice 2020-12-08 14:54:24 +09:00
97b00053c4 Do not crash on invocie creation error for greenfield (Fix #2111) 2020-12-08 14:47:20 +09:00
76e46d2fa7 Fix performance issues on query over orderId (fix #2114) 2020-12-08 14:43:39 +09:00
4c62c5dc22 Merge pull request #2104 from btcpayserver/fix/qr-fail-import
do not crash when importing a non-json based QR code
2020-12-06 12:03:57 +09:00
c7209df7e2 Fix swagger docs for pull payments (#2105)
* Fix swagger docs for pull payments

fixes #2097

* Update BTCPayServer/wwwroot/swagger/v1/swagger.template.pull-payments.json

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

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2020-12-04 12:03:27 +01:00
c17b8e4d9e Introduce Spam protection
fixes #1958

Adds 2 new options:
* Do not allow stores to use the email settings of the server. Instead, they would need to fill in the email settings in their own store
* Do not allow user creation through the API unless you are an admin.

Both are opt-in and turned off by default.
2020-12-04 08:08:05 +01:00
0ab33b704c do not crash when importing a non-json based QR code
fixes #2098
2020-12-04 07:41:02 +01:00
ba027de3f7 Merge pull request #2103 from btcpayserver/fix/uppercase-qrcode-2
Lowercasing the protocol in QR code because it's not widely supported
2020-12-04 14:43:59 +09:00
3ac257bfda Lowercasing the protocol in QR code because it's not widely supported
https://github.com/btcpayserver/btcpayserver/issues/2099#issuecomment-738550565
2020-12-03 23:39:18 -06:00
ec495ea4d1 bump 2020-12-04 14:15:18 +09:00
3b035158a2 Merge pull request #2100 from btcpayserver/fix/uppercase-qrcode
Reverting uppercasing of Bech32 addresses in QR code
2020-12-04 13:00:47 +09:00
36582a2741 Reverting uppercasing of Bech32 addresses in QR code 2020-12-03 17:30:14 -06:00
450d3cb7d2 bump 2020-12-03 23:30:34 +09:00
8d157ac5ca Merge pull request #2093 from btcpayserver/fix-sync
Fix sync not showing
2020-12-03 15:49:22 +09:00
89dc379761 Removing word Bitcoin from forks to satisfy Roger (#2091)
Co-authored-by: rockstardev <rockstardev@users.noreply.github.com>
2020-12-03 06:34:38 +01:00
3e800e7e53 Update classic theme for payment requests (#2096)
Fixes #2084.
2020-12-02 15:21:03 +01:00
b12c6289d0 Fix link for webhooks 2020-12-02 20:37:38 +09:00
7e50267cb0 UI: Store setup finetuning (#2087)
* UI: Store setup finetuning

Incorporate @dstrukt's improvement feedback from [this comment](https://github.com/btcpayserver/btcpayserver/pull/2011#issuecomment-735909927).

* Clean up and fix test
2020-12-02 07:45:00 +01:00
6714eb9f7f Fix bug with already used colors being used first for new tx labels (#2077)
* Extend list of available tx label colors

* Ensure unknown label colors are given the least priority

closes #2072

* Remove new label colors
2020-12-02 07:38:05 +01:00
f1d6f0b2a6 Fix sync not showing
fixes #2092
2020-12-02 07:19:48 +01:00
445606e2b1 Wait for content to be loaded before U2F actions 2020-12-01 14:31:42 +01:00
ad05f479a8 U2F: Update lib and improve error display
The [previously used U2F library](https://github.com/fido-alliance/google-u2f-ref-code/) has been deprecated. The new one does not override the browsers `window.u2f` functionality if it is natively supported. It also displays the appropriate errors and falls back nicely in case the browser does not support U2F.
2020-11-30 12:43:15 +01:00
a78c1c8278 Update tx label dropdown position (#2081)
close #2078
2020-11-26 08:57:40 +01:00
06d6d15441 Bump version 2020-11-26 00:15:40 +09:00
87676ece18 Merge pull request #2080 from NicolasDorier/changelog/1.0.5.10
Changelog 1.0.6.0
2020-11-26 00:14:52 +09:00
acfd3f1002 Changelog 1.0.5.10 2020-11-26 00:07:29 +09:00
d5cbe66b0e fix monero condition 2020-11-25 06:25:33 +01:00
88aa34747b Automatically generate permissions docs for GreenField (#2043)
* Automatically generate permissions docs for GreenField

* Do a test instead
2020-11-24 10:10:32 +01:00
cc8dcade49 Fix QR code wallet import when not electrum format 2020-11-24 09:54:17 +01:00
a64dd9af16 remove hack #2070 2020-11-23 19:39:53 +09:00
8405ce6369 Merge pull request #2079 from NicolasDorier/state-renaming
[Greenfield BREAKING CHANGE] Rename invoice states and payment states
2020-11-23 19:27:41 +09:00
18e68d04f9 Rename invoice states and payment states 2020-11-23 18:28:35 +09:00
f3010f622c fix test 2020-11-23 17:13:29 +09:00
ff87319a74 API: Handle lightning invoice creation errors (#2070)
Catches LightningClient exceptions and responds with a detailed API error (400) instead of a generic server failure (503).
2020-11-23 06:40:13 +01:00
fa517417ed Ensure tx labels display correctly when there are many (#2076)
fix #2075
2020-11-23 06:34:34 +01:00
f9b86a6b2e Merge pull request #1901 from btcpayserver/api/invoice-extras
GreenField: Add Invoice Payment methods endpoints
2020-11-20 10:25:00 +09:00
8a21dfa93f Merge pull request #2051 from Kukks/separate-ln-bitcoin-checkout-part2
Separate ln bitcoin checkout part2
2020-11-19 21:04:46 +09:00
c88ae2d7fe Merge pull request #2069 from Kukks/monero-fix
Fix monero sync height check
2020-11-19 21:03:46 +09:00
25e979687f Fix monero sync height check
based on issue at https://github.com/monero-project/monero/issues/7029
2020-11-19 12:27:05 +01:00
af866939f4 fix merge 2020-11-19 07:34:22 +01:00
e72becdfcb Merge branch 'master' into separate-ln-bitcoin-checkout-part2 2020-11-19 12:44:01 +09:00
4bd97eecc9 Merge pull request #2050 from Kukks/separate-btc-ln-checkout
Separate views of Bitcoin and LN
2020-11-19 12:42:17 +09:00
8ffe6dcfa0 Fix build 2020-11-19 12:40:07 +09:00
23002ac70d Merge pull request #2068 from Kukks/plugins-db
Plugins: Allow creation of independent DbContexts
2020-11-19 12:39:26 +09:00
1262ad3cd4 Fix warnings 2020-11-19 12:34:56 +09:00
d8f145c4dc Merge branch 'master' into plugins-db 2020-11-19 12:19:17 +09:00
9c5fd1b478 Merge pull request #2058 from NicolasDorier/webhook2
Add Webhooks in store's settings
2020-11-19 12:17:34 +09:00
24f3285003 Let migration assembly resolve from itself 2020-11-18 13:22:05 +01:00
179520a211 Plugins: Allow creation of independent DbContexts
This allows plugins to create custom dbcontexts, which would be namespaced in the scheme with a prefix. Migrations are supported too and the table would be prefixed too
2020-11-18 12:27:26 +01:00
ec31a4fe17 Improve Lightning node info view (#2066)
* Cleanups

* Add store name

* Unify js/non-js HTML
2020-11-17 08:57:14 +01:00
ab780485b2 Center pay button content (#2042)
close #1999
2020-11-17 08:18:50 +01:00
07c5c2972d Add callback doc 2020-11-16 12:13:27 +09:00
af593117e4 Merge pull request #2064 from Kukks/plugins-hooks-actions
Plugins: Hook System
2020-11-16 10:51:50 +09:00
931505d135 Plugins: Hook System
Almost an exact replica of https://developer.wordpress.org/plugins/hooks/
This will allow plugins to extend specific points in business logic, such as validation, invoice payload changes, etc
2020-11-15 14:39:21 +01:00
6c7433b2f1 Merge pull request #2060 from btcpayserver/feat/unified-qr
Unified QR code, BIP21 with lightning fallback
2020-11-14 12:11:26 -06:00
38ca0accde Removing section separators 2020-11-14 12:07:11 -06:00
df79c2cf48 Improve tests of webhooks 2020-11-14 13:39:44 +09:00
94bcbeb604 Add Greenfield API 2020-11-13 14:15:03 +09:00
35e45333b1 Uppercasing destination address in QR code if it's Bech32 2020-11-09 23:57:48 -06:00
f17a6f13a4 Adding uppercasing of BITCOIN: scheme 2020-11-09 23:46:31 -06:00
1bff7bdc47 Adding validation to ensure unified QR code works as expected 2020-11-09 23:41:29 -06:00
13cb2c695f Adding onChainWithLnInvoiceFallback parameter to swagger doc 2020-11-09 23:08:07 -06:00
c581b80132 ToUpper for lightning invoice part of unified QR code
Ref: https://github.com/btcpayserver/btcpayserver/pull/2060#issuecomment-723828348
2020-11-09 02:05:17 -06:00
4dd0ae8bdc UnitTest1.cs code reformatting 2020-11-09 01:48:45 -06:00
4db67e5bc5 Adding slight delay to make test less flaky
Ref:
https://app.circleci.com/pipelines/github/btcpayserver/btcpayserver/4181/workflows/101d7b31-e267-4f5a-9892-2abb7b6cb687/jobs/11557
2020-11-09 01:48:12 -06:00
6aa9122160 By convention ln invoices are usually lowercase 2020-11-09 01:14:28 -06:00
f84f2dca64 Adding option for unified onchain QR code to Checkout Experience 2020-11-09 01:11:03 -06:00
3c6992e910 Adding lightning invoice fallback to onchain bitcoin url if enabled 2020-11-09 00:23:09 -06:00
7f79d16f02 Code cleanup of used classes 2020-11-08 23:56:39 -06:00
790c386ba8 Renaming class for enabled text to be consistent between wallet and lightning 2020-11-08 23:33:49 -06:00
ee72badf21 Fixing HTML tag typo 2020-11-08 23:15:21 -06:00
c9c4453660 Fix-up links which ignore custom root path (#2059)
address #2057
2020-11-08 09:39:10 +01:00
f3611ac693 Add Webhooks in store's settings 2020-11-08 15:57:24 +09:00
cc6fe24e82 Show significant letters in the derivation scheme in store settings 2020-11-08 11:29:36 +09:00
5a7730951a Fix create token button 2020-11-08 11:26:23 +09:00
eef729b5f9 API: Fix open channel validation condition (#2054) 2020-11-06 16:52:58 +01:00
0bb0a38649 Merge pull request #2053 from NicolasDorier/eventsaver
Decouple event saving from InvoiceNotificationManager
2020-11-06 22:52:19 +09:00
39029adcd8 Merge pull request #2011 from dennisreimann/store-setup
Store setup restructuring
2020-11-06 22:28:20 +09:00
c967f91abb Move some code out of InvoiceNotificationManager into InvoiceEventSaverService 2020-11-06 22:24:02 +09:00
1ba0685596 API Docs: Fix lightning invoice for store payload (#2052) 2020-11-06 14:00:10 +01:00
f2daa6a150 Improve store setup display 2020-11-06 11:14:00 +01:00
e021d42551 Ensure that there is no LN/Bitcoin specific logic in the Invoice UI endpoint 2020-11-06 11:09:17 +01:00
13509e31ca Don't warn, but hint 2020-11-06 10:50:23 +01:00
b9af805ac1 Store UI: Improve wallet status display 2020-11-06 10:50:22 +01:00
378d2bc8ba Store settings: Improve wallet display 2020-11-06 10:50:21 +01:00
b73aa55a75 Store setup: Restructuring basics 2020-11-06 10:50:20 +01:00
a729dd1380 Separate views of Bitcoin and LN 2020-11-06 09:35:26 +01:00
09335e2cf1 Plugins UI improvements (#2048)
* Improve dependencies display

* Improve version information toggling
2020-11-06 08:06:37 +01:00
31738c465d Plugins: Load plugins by order, aesthetic plugin dependency system (#2020)
* Plugins: Load plugins by order, aesthetic plugin dependency system

Introduces plugins loading in order of installation, BTCPay itself shows up as a system plugin, and that plugins can define other plugins as dependencies.

* use a proper type for plugin dependencies

* rebase fixes

* message when cannot install
2020-11-05 15:43:14 +01:00
38fb64130d Plugins: Recommended plugins and github Remote config options (#2045)
This allows external integrations ( btcpay docker fragments) to highlight specific plugins as recommended to be installed. Also moved the remote option to  a config option instead of a url query param to avoid messy situations where users could get deceived with a generated url. The dockerfiles also have an additional csproj to build and the plugin dir was renamed correctly from extensions to plugins
2020-11-05 10:21:09 +01:00
493b10393b Add warning for zero-conf accept option (#2038)
* Add warning for zero-conf accept option

close #2003

* Explicitly get element by id
2020-11-03 06:55:45 +01:00
b406f52670 Add warning to configure e-mail server (#2024)
Adds a warning to configure the e-mail server before "Requires a confirmation mail for registering" checkbox can be checked if e-mail server is not configured.

close #1889
2020-11-03 06:53:49 +01:00
ef3f314754 Remove QuadrigaCX references (#2021)
* Remove QuadrigaCX references

Quadriga has been dead for years. I've removed the references to them and replaced them with a different Canadian exchange (ndax) for example. 

The whole set of instructions could probably use an overhaul, but for now, at least let's get rid of Gerry's presence.

* Remove Quadriga from tests too

Co-authored-by: Kukks <evilkukka@gmail.com>
2020-11-02 13:10:55 +01:00
d2910686cd Fix link from app label (#2028) 2020-11-02 12:26:11 +01:00
793b1b56d9 Fix exception when saving checkout experience on new store (#2033) 2020-10-31 11:34:40 +01:00
d8f9075e2a Fix NRE 2020-10-30 00:19:23 +09:00
1199d4ead9 Merge pull request #2031 from bkiac/master
Fix failing generateaddress when address contains escape sequences in docker-bitcoin-generate.sh
2020-10-29 23:58:00 +09:00
4520e1bb3e Fix potential NRE in polling 2020-10-29 23:17:46 +09:00
afece8193e Fix possibly dirty generated bitcoin address 2020-10-29 14:16:23 +01:00
3b14585d1a Merge pull request #2027 from btcpayserver/missing-cs
Fix missing altcoins tab
2020-10-29 16:28:49 +09:00
9cd32a908f Fix missing altcoins tab 2020-10-28 18:04:19 +01:00
b9ca02088d Make a batch query for all pending invoice (Fix #2022) 2020-10-28 23:21:46 +09:00
440ce0221a Revert "Add thread limit for updating payment states for payment invoices in NBXplorerListener"
This reverts commit 5d9827fb6032a2716eb87ecdc3ce62d53c74e055.
2020-10-28 23:07:30 +09:00
caff7eda9f Revert "Add missing async/await keywords"
This reverts commit 8d0260b64490018c907f996d62f10b54c509dbc8.
2020-10-28 23:07:27 +09:00
aef1cefc18 changelog 1.0.5.9 2020-10-28 19:24:24 +09:00
1385c7cc9b Merge pull request #2023 from Rheopyrin/master
Add thread limit for updating payment states for payment invoices in NBXplorerListener
2020-10-28 18:43:50 +09:00
8d0260b644 Add missing async/await keywords 2020-10-27 21:17:56 +02:00
5d9827fb60 Add thread limit for updating payment states for payment invoices in NBXplorerListener 2020-10-27 21:09:53 +02:00
256d711fde fix 2020-10-27 11:01:22 +01:00
1d82c3779b Remove AwaitingConfirmation 2020-10-27 09:49:35 +01:00
abc9d07977 fix swagger format for dates 2020-10-27 09:47:22 +01:00
40d95acfb9 Apply suggestions from code review
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2020-10-27 09:47:22 +01:00
9a92bc05db fix json types 2020-10-27 09:47:22 +01:00
8962bf00f6 GreenField: Add Invoice Payment methods endpoints
lets you fetch all active payment methods data + payments made
2020-10-27 09:47:21 +01:00
2083954aa5 add comment 2020-10-27 08:19:41 +01:00
66af258876 fix tests 2020-10-27 08:00:34 +01:00
4ba04031ef Fix specter image 2020-10-27 14:59:07 +09:00
a30456a92d Fix warnings 2020-10-26 14:19:05 +09:00
c8dd13577e Add nuget publishing for plugin packaer and abstractions (#2018) 2020-10-25 00:21:50 +09:00
fac35b46bb Display link for Pay button (#2017)
fixes #635
2020-10-24 23:52:39 +09:00
748cb778e0 Fix redirect when in modal (#2015)
fixes #2012
2020-10-24 23:47:05 +09:00
bbcca24bcc Fix typos and improve wording & formatting (#2013) 2020-10-24 23:46:35 +09:00
b8c52b1120 fix decimal entry in payment requests (#2016)
fixes #2014
2020-10-24 12:25:50 +02:00
b1b3ce48ee Toast messages in payment request (#2010)
* Hide toast messages in print

Fixes #2009.

* Optimize payment request toast messages
2020-10-24 10:20:19 +02:00
da864f4c6c bump nbx and nbitcoin 2020-10-24 15:27:48 +09:00
758f627e12 Partially paid invoices should be reused in payment requests. Cleanup the code. (#2008) 2020-10-23 21:00:23 +09:00
20322c6ab8 Improve payment print styles (#1977)
* Improve payment print styles

Allows for export as invoice PDF to be used in accounting. Closes #1957.

* Change Transaction ID wording

* Minor payment request UI improvements

* Add amount paid, rate and colorize payment status

* Display rate at invoice level

* Inherit text color in print

* Show full date in print view

* Rearrange payment details

* Add received date for payments

* Fix amount calculation

* Fix validInvoice assignment
2020-10-23 17:37:28 +09:00
7a711f0690 Merge pull request #1983 from Kukks/fix-email-search
fix email not included in textsearch
2020-10-23 17:26:10 +09:00
067b977ec8 Do not include maxadditionalfeecontribution if there is no change. (#2007) 2020-10-23 11:57:06 +09:00
58f0ca3d8a Improve plugins UI (#2005) 2020-10-22 10:58:22 +02:00
4176f3659b Add QR code scan/show for PSBT + Import wallet via QR (#1931)
* Add PSBT QR code scan/show

This PR introduces support to show and read PSBTs in BC-UR format via animated QR codes.  This allows you to use BTCPay with HW devices such as Cobo Vault and Blue wallet to sign transactions without ever exposing the keys outside of that device.
Spec: https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-005-ur.md
I've also bumped the QR code library we sue as it had a bug with large datasets.

* Reuse same code for all and allow wallet import via QR code scan

* remove unecessary js vendor files

* Allow export wallet from settings via QR

* formatting

* bundle

* fix wallet receive bundle
2020-10-21 14:03:11 +02:00
5979fe5eef BTCPay Extensions Part 2 (#2001)
* BTCPay Extensions Part 2

This PR cleans up the extension system a bit in that:
 * It renames the test extension to a more uniform name
 * Allows yo uto have system extensions, which are extensions but bundled by default with the release (and cannot be removed)
 * Adds a tool to help you generate an extension package from a csproj
 * Refactors the UI extension points to a view component
 * Moves some more interfaces to the Abstractions csproj

* Rename to plugins
2020-10-21 14:02:20 +02:00
362ba21567 fix unclosed div 2020-10-21 10:45:24 +02:00
71894ba245 Override Block Explorer Links (#2000)
* Override Block Explorer Links

closes #1953

* load overrides after save as well

* fix js
2020-10-21 09:53:05 +02:00
2b19e0fbc6 Remove SQLite as default option (#1987)
* Remove SQLite as default option

IF MERGED, STORES WITH NO DB CONFIG WILL NOT START UNTIL CONFIG IS UPDATED WITH `sqlitefile=sqlite.db`

* remove sqlite conn string option

* toggle between abs path or relative for sqlite db

* Update DefaultConfiguration.cs
2020-10-20 13:12:10 +02:00
4d0b402e8b Allow disabling notifications per user and disabling specific notifications per user (#1991)
* Allow disabling notifications per user and disabling specific notifications per use

closes #1974

* Add disable notifs for all users

* fix term generator for notifications

* sow checkboxes instead of multiselect when js is enabled

* remove js dependency

* fix notif conditions
2020-10-20 13:09:09 +02:00
933e0c30bf Remove empty box on post redirect (#1995)
In case JS is enabled the post redirect page showed an empty box. This box contains the explanation text for the non-JS text.

This changes it to only show the modal box in casee JS is disabled, because the page – even though only visible briefly –  looks weird for users with JS enabled.
2020-10-18 11:10:51 +02:00
b430afe3e1 Merge pull request #1990 from btcpayserver/feat/store-hints
Store hints/warnings
2020-10-18 03:11:36 -05:00
2f25f1790e Trying to prevent ocassional chrome crashes
Error: The process started from chrome location /usr/bin/chromium is no longer running, so ChromeDriver is assuming that Chrome has crashed.
2020-10-18 03:11:17 -05:00
d90fcf15bd Verifying presence of wallet warning on store list 2020-10-18 03:11:17 -05:00
be9cc41957 Dismissing lightning hint when connection is setup 2020-10-18 03:11:17 -05:00
ef99eeb300 Adding selenium test for store hints 2020-10-18 03:11:17 -05:00
1646241dfb Switch to POST for dismissing hints 2020-10-18 03:11:17 -05:00
543e628a8b Removing rates hint 2020-10-18 03:11:17 -05:00
36269cbed6 Consistent styling for Back to List 2020-10-18 03:11:17 -05:00
75dcdc72d2 Showing warning hint on stores listing page 2020-10-18 03:11:17 -05:00
f5c90bebdc Support for dismissing hints 2020-10-18 03:11:17 -05:00
15af66de55 Setting hints during store creation and update 2020-10-18 03:11:17 -05:00
17c8ac8248 Moving general store settings in same section 2020-10-18 03:11:17 -05:00
e5c6b9a979 Rearranging store sections and providing warnings for new stores 2020-10-18 03:11:17 -05:00
753849cedd Merge pull request #1994 from btcpayserver/forgotpassword
fix forgot password
2020-10-18 11:54:55 +09:00
b81e4c01ec clean altcoins docker compose 2020-10-17 16:09:34 +02:00
2a32b05df1 fix forgot password
If Email verification is turned off but you requested a forgot password form, it would ignore the request internally. Seems like it has been this way since the beginning
2020-10-17 09:25:48 +02:00
e3a0fe88c1 Fix LN invoices (#1955)
* Fix LN invoices

This commit adds more to the previous LN fix in the case of a partial payment to an invoice. While it generated a new LN invoice after 1 partial payment was made, there were some new issues uncovered:
* Any other subsequent partial payments was not listened to  and did not generate an invoice ( fixed by listeneing to received payment event and makng sure that the status was already set `to partialPaid`)
* Any other subsequent partial payments caused a DbConcurrency error and did not generate an invoice ( Fixed in `MarkUnassigned`)
2020-10-17 08:57:21 +02:00
ee3aa49eee Merge pull request #1993 from dennisreimann/api-keys-ui
API Keys UI: Properly align form items
2020-10-17 14:38:14 +09:00
dd27ad79bd API Keys UI: Properly align form items 2020-10-16 22:31:09 +02:00
cfd0f556a5 Update changelog 2020-10-16 20:44:41 +09:00
347e70f4ea bump 2020-10-16 20:44:32 +09:00
828aae35ce Revert "The send wallet, by default, include the previous transaction"
This reverts commit 0f743cec4132c7f97a2e94263c044ddefbdccf9b.
2020-10-16 20:29:29 +09:00
2f56783b7e fix domain mapping bug (#1992)
fixes #1988
2020-10-16 19:59:01 +09:00
dc4ecdaa38 better handling on remote being down 2020-10-15 15:04:11 +02:00
1440e8c55d BTCPay Server Extensions (#1925)
* BTCPay Server Extensions

![demo](https://i.imgur.com/2S00aL2.gif)

* cleanup

* fix

* Polish UI a bit,detect when docker deployment
2020-10-15 21:28:09 +09:00
51a072808f If a password fail to be reset by mail, show proper error (fix #1986) 2020-10-15 15:36:42 +09:00
0a8c2926ea reword review step for vault 2020-10-14 19:57:27 +09:00
5e79f567a7 Merge pull request #1982 from Kukks/hide-conn-string
Do not log the database connection string
2020-10-14 19:23:04 +09:00
e2eb26eb93 Use base65 instead of hex for BIP78 (#1985)
fixes #1984
2020-10-14 12:01:21 +02:00
740a50a26d fix email not included in textsearch
fixes #1979
2020-10-14 09:16:31 +02:00
be3f248a5a Do not log the database connection string
fixes #1980
2020-10-14 09:06:50 +02:00
f2870caed2 Payment redesign (#1967)
* Payment redesign

Guess who's back!

This reverts commit 4174fa648d994e098d8555bca0a5b3a255541cb5.

* Refactor PullPayment state string

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

* Use unified copy to clipboard function

* Refactor status text class to helper function
2020-10-13 09:58:46 +02:00
ad22d3fd91 Custom redirect_url for PoS (#1924) 2020-10-13 09:51:28 +02:00
9dcd8b6edf Checkout: Overlay improvement and markup fixes (#1968)
* Checkout: Markup fixes

* Checkout: Less translucent overlay

More focus, as discussed in #1930: https://github.com/btcpayserver/btcpayserver/pull/1930#issuecomment-701298441
2020-10-12 17:52:21 +02:00
9607e0e55d Update PayButtonEnable.cshtml (#1952)
* Update PayButtonEnable.cshtml

Edit PayButton Title

* Update BTCPayServer/Views/Stores/PayButtonEnable.cshtml

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

* Apply suggestions from code review

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2020-10-11 17:46:11 +02:00
ad221eaaa2 bump 2020-10-08 17:51:38 +09:00
74a1a5262d Merge pull request #1966 from NicolasDorier/changelog/1.0.5.7
Changelog 1.0.5.7
2020-10-08 17:50:38 +09:00
32ae82d4da Update Changelog.md
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2020-10-08 17:03:46 +09:00
9c6c8d4f8f Changelog 1.0.5.7 2020-10-08 16:55:15 +09:00
45fbe6972b Merge pull request #1965 from NicolasDorier/walletsend
Fix: 1 DOGE "absurdly high" fee was trapping DOGE.
2020-10-08 16:38:08 +09:00
c262132a2f Do not check feerate in walletsend model 2020-10-08 16:33:48 +09:00
911a7ef6b5 Merge pull request #1964 from btcpayserver/decouple-icon-from-invoice
Decouple payment type icon from UI
2020-10-08 16:30:07 +09:00
8cb3757f5c Decouple payment type icon from UI
We should put an effort to not couple payment methods/types together after spending so much time decoupling things.
2020-10-08 09:19:50 +02:00
10bf914d78 Merge pull request #1937 from NicolasDorier/retry-vault
Add Retry button if a BTCPay Vault operation fails
2020-10-08 16:17:10 +09:00
684177ee44 Merge pull request #1963 from btcpayserver/invoice-ui-status-show
fix invoice exception status not displaying in list
2020-10-08 15:55:48 +09:00
b2052ca308 fix invoice exception status not displaying in list
fixes #1960
2020-10-08 08:42:45 +02:00
4174fa648d Revert "Payment redesign" (#1962) 2020-10-08 08:37:18 +02:00
182d67881d Add specter to the list of RPC compatible wallet 2020-10-08 15:16:59 +09:00
9284ac7461 Merge pull request #1930 from dennisreimann/payment-redesign
Payment redesign
2020-10-08 12:10:28 +09:00
55eec06e77 Merge pull request #1934 from btcpayserver/better-users
Add Created date to user, add verified column in list and make user l…
2020-10-08 12:08:16 +09:00
069acf0297 Add Retry button if a BTCPay Vault operation fails 2020-10-08 12:05:03 +09:00
d9d2c7d213 Merge pull request #1938 from NicolasDorier/email-pwd
Do not show password in clear text in email configuration (Fix #1790)
2020-10-08 12:01:21 +09:00
83b28e0b00 Merge pull request #1950 from btcpayserver/fixu2f-cascade
Make U2F devices cascade delete
2020-10-08 12:00:30 +09:00
c2d52fd48f Merge pull request #1961 from dennisreimann/notifications-dropdown
Improve notifications dropdown
2020-10-08 11:58:32 +09:00
32e6643303 Do not ignore IsAdmin settings when creating a new user via the Users page (Fix #1954) 2020-10-08 11:57:25 +09:00
5faf6be02d Improve notifications dropdown
Minor changes to the spacing, first of all this fixed the notifications dropdown in dark mode.
2020-10-07 22:50:34 +02:00
9ff93ac2d5 add migration 2020-10-07 11:08:11 +02:00
5131d8d328 Fix onion location not always working (#1947)
closes #1881
2020-10-07 10:21:18 +02:00
2147f8ec8b Make U2F devices cascade delete
fixes #1949
2020-10-06 17:57:16 +02:00
cfa568a230 Fix modal overlay (#1946)
* Fix modal overlay

fixes #1941

* fix speed
2020-10-06 09:30:16 +02:00
ace904cf16 Fix sync modal styles (#1945)
Do not overlap the footer. Also removed the underline for the toggle button in chrome. Fixes #1941.
2020-10-06 09:01:31 +02:00
cb337f4a65 Merge pull request #1944 from btcpayserver/fix/new-version-string
Fixing returned version string, trimming leading v
2020-10-06 13:23:07 +09:00
9df78946c5 Merge pull request #1943 from btcpayserver/fix/shopify-event-confirmed
Mark Shopify orders paid on invoice payment confirmed
2020-10-06 13:22:44 +09:00
e47359129e Fixing returned version string, trimming leading v 2020-10-05 23:09:05 -05:00
4187e0f94c Mark Shopify orders paid on invoice payment confirmed 2020-10-05 16:23:21 -05:00
b2899529c3 fix build 2020-10-05 13:00:26 +02:00
3d2b4cbfa8 Add Created date to user, add verified column in list and make user list use same model as modern lists 2020-10-05 13:00:15 +02:00
9daa424afd Merge pull request #1939 from btcpayserver/fix/updateurl_ux
Showing CheckForNewVersions checkbox only if BTCPAY_UPDATEURL is set
2020-10-05 19:37:03 +09:00
aa04951081 Showing CheckForNewVersions checkbox only if BTCPAY_UPDATEURL is set 2020-10-05 04:26:11 -05:00
d8da8023c2 Add tests 2020-10-05 18:09:00 +09:00
60cadb8b6d Do not show password in clear text in email configuration (Fix #1790) 2020-10-05 17:57:50 +09:00
dcf8783c2e Add copy link confirmation 2020-10-03 17:04:36 +02:00
eb9dc95c58 Payment UI: Increase horizontal padding for currency 2020-10-01 21:23:49 +02:00
f94fb4f65e Payment UI: Light background for progress bar 2020-10-01 21:23:48 +02:00
e0aff2cf9d Payment UI: Right align totals 2020-10-01 21:23:47 +02:00
d2369f45ce UI: Custom margins for status message 2020-10-01 21:23:46 +02:00
7b718ada63 Pull Payment UI: Test fix 2020-10-01 21:23:45 +02:00
652604a36f Pull Payment UI: Redesign 2020-10-01 21:23:44 +02:00
8a4834dd2b Checkout UI: Decrease overlay opacity 2020-10-01 21:23:43 +02:00
6d49093620 Checkout UI: HTML fixes 2020-10-01 21:23:42 +02:00
489ce0bebc Payment Request UI: Finetuning 2020-10-01 21:23:41 +02:00
58922c23a6 Payment Request UI: Fix if 2020-10-01 21:23:40 +02:00
be3183fc45 Payment Request UI: Status and Payment Details 2020-10-01 21:23:39 +02:00
38b4812eb3 Payment Request UI: Print adaptions 2020-10-01 21:23:38 +02:00
69fdc2d821 UI: Add bootstrap responsive helper for dev env 2020-10-01 21:23:37 +02:00
9104b0f974 Payment Request UI: Main part
fix

fix

fix
2020-10-01 21:23:36 +02:00
6ec7373a1a # This is a combination of 2 commits.
# This is the 1st commit message:

UI: Move noscript styles to header include

Reusability

# This is the commit message #2:

fix
2020-10-01 21:23:35 +02:00
39be605459 UI: Move noscript styles to header include
Reusability
2020-10-01 21:23:34 +02:00
4d4459fa4e Payment Request UI: Layout and header 2020-10-01 21:23:33 +02:00
2a3dbaa7b4 bump 2020-10-01 22:08:57 +09:00
6069e8f083 Fix test fail and warnings 2020-10-01 20:17:20 +09:00
30ea223d09 Merge pull request #1927 from NicolasDorier/changelog/1.0.5.6
Changelog 1.0.5.6
2020-10-01 20:06:37 +09:00
0a957d7097 Credits for BTCPay Logo in the bottom 2020-09-30 21:01:43 +09:00
f28a898053 Fix building error 2020-09-30 20:54:17 +09:00
8921d4fac8 Changelog 1.0.5.6 2020-09-30 20:42:37 +09:00
a66578c46d Merge pull request #1871 from xpayserver/feat/payment-method-criteria
Add Value Criteria For Payment Method
2020-09-30 20:40:31 +09:00
e45dcf61c4 Merge pull request #1831 from btcpayserver/add-btc-index
Show index of payment address for onchain payments
2020-09-30 18:35:51 +09:00
40bfc9b368 Merge pull request #1768 from sotblad/MonetaryUnit
Add MonetaryUnit (MUE) support
2020-09-30 18:33:41 +09:00
73684d11c8 Merge pull request #1908 from btcpayserver/feat/shopify-mark-paid
Shopify registering paid transactions, marking orders paid, finishing integration
2020-09-30 11:23:56 +09:00
0d4ca4520b Ensuring matching of keywords only on first transaction 2020-09-29 17:23:42 -05:00
f1c1846c66 Restoring BtcPay keywords 2020-09-29 16:54:33 -05:00
d59295688e Handle edge cases around partial payments and when txs are not registered on Shopify because of unexpected outage 2020-09-29 16:52:17 -05:00
c1808164f2 Log Shopify registration better 2020-09-29 16:51:22 -05:00
8f8562705a Pass due amount from shopify UI in case of partial payments 2020-09-29 16:51:00 -05:00
6da6723c72 Be sure to match transaction gateway in Shopify registration 2020-09-29 16:50:17 -05:00
0a726d598c Make sure shopify var is set in the UI 2020-09-29 16:47:54 -05:00
4ffd2265ea Reduce unused branching in UI 2020-09-29 16:47:29 -05:00
3ce6269212 Remove unused imports 2020-09-29 16:47:18 -05:00
dc0cf26f51 Fix build 2020-09-29 16:47:14 -05:00
713a1f03e9 Fix warnings 2020-09-29 16:47:05 -05:00
c07952629c Commenting OrderTransactionRegisterLogic 2020-09-29 16:46:28 -05:00
d958b1808c Make Sync Modal remember collapsed state (#1929)
* Make Sync Modal remeber collapsed state

This makes the sync modal use the bootstrap collapse component instead of animatecss. It also removed animatecss as it seemed to be only used there.  Also, it will now remember if you collapsed it between page loads which since the new eth stuff keeps asking to configure it on my dev env.

* Sync modal improvements

- Use chevron icon and indicate toggle state
- Smooth opening animation by toggling element without padding
- Better modal content padding
- Run JS immediately to prevent flickering

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2020-09-29 14:13:39 +02:00
4a596c7373 Remove leftover shopify API calls and script creation 2020-09-28 07:58:49 +02:00
bf7c8d5a5c Bugfixing references to shop, correcting them to be dynamic 2020-09-26 13:27:18 -05:00
84f9ee3765 Word breaking on all chars for better display of additional script 2020-09-26 13:17:11 -05:00
c22536ce67 Tweaking display order and style of alerts 2020-09-26 12:55:26 -05:00
c14fd69a0e Disabling automatic creation of Script in Shopify 2020-09-26 12:51:29 -05:00
0812596929 Adding another string for integration check 2020-09-26 12:22:16 -05:00
d33a449332 Changing page title during before and after payment 2020-09-25 16:55:42 -05:00
02b99d2b06 Injecting payment button, wasn't displaying when invoice already present
Also button was not getting refresh on modal close
2020-09-25 16:55:28 -05:00
b4f0cf510d Ensuring that elements on page are refreshed as soon as possible
Waiting on `load` is way too long, results in bad UX
2020-09-25 16:06:29 -05:00
eb6b1b431c Removing duplicate FromServices import 2020-09-25 14:13:57 -05:00
e955ddb9f1 Changing button text to better signal operation 2020-09-25 13:58:52 -05:00
48acd101a5 Handling errors with registering store script 2020-09-25 13:55:34 -05:00
694cedb89a Handling scenario where user provides invalid Shopify credentials 2020-09-25 13:50:23 -05:00
47e9f820e4 Switching the flow to exclusively use Example Url 2020-09-25 13:50:04 -05:00
a7d7b5abc3 set order id of shopify invoice and serch by order id + storeId 2020-09-24 18:18:17 +02:00
03d6c86899 Revert "Make Invoices save internal tags in the text search"
This reverts commit f352399428f5aacfaa237061488771f023c7f7fd.
2020-09-24 17:33:15 +02:00
e9bd1bad67 Removing reference to Nethereum, Bitcoin only build 2020-09-24 16:25:36 +02:00
c9f0295516 Make Shopify transaction register system handle marked payments slightly more 2020-09-24 16:25:36 +02:00
42df6d58b1 Simplify Shopify integration
Added dedicated endpoint that generates an invoice or returns an existing one as needed for a shopify order
Added rate limiter to shopify endpoint to prevent abuse
Reduce shopify js to a small file
Use events from btcpay modal to reduce constant pinging to btcpay server
Register invoice payment failures on the shopify backend.
2020-09-24 16:25:35 +02:00
078a2d7e39 Reduce Shopify integration steps and make sure checks work. 2020-09-24 16:25:35 +02:00
f352399428 Make Invoices save internal tags in the text search 2020-09-24 16:25:35 +02:00
0b2f115b73 Fix issue with new Invoice API ignoring internal tags 2020-09-24 16:25:35 +02:00
9aed4b0e87 Allow receiving events from the BTCPay modal library 2020-09-24 16:25:35 +02:00
3054f91fe7 Fix typo in Invoice method param 2020-09-24 16:25:35 +02:00
91da129abc Include missing Shopify API models 2020-09-24 16:25:35 +02:00
f77c27ca71 Make BTCPay Modal refer to mattermost instead of slack 2020-09-24 16:25:35 +02:00
19cc93daae Reduce steps to 1 when integrating Shopify and start adding more API calls for Shopify to reduce JS logic 2020-09-24 16:25:35 +02:00
4516bbdadd Fix and Cache Shopify JS 2020-09-24 16:25:35 +02:00
0cf9b20328 Kukks Shopify Enhancement Suite Commit 2020-09-24 16:25:35 +02:00
1c510d45f0 Commenting code to elaborate on decisions made 2020-09-24 16:25:34 +02:00
5b958d7ff6 Ensuring that Shopify transaction registrations are not done in parallel 2020-09-24 16:25:34 +02:00
d9872bc94d Making sure we don't register same invoice multiple times 2020-09-24 16:25:34 +02:00
f177a39b96 Removing dynamic variables from Shopify api interactions 2020-09-24 16:25:34 +02:00
0e53ead14e Adding another state for detection of invoice paid 2020-09-24 16:25:34 +02:00
9b0fb9ecdc Adding links to other integrations per @pavlenex suggestion 2020-09-24 16:25:34 +02:00
fa08c52f74 Bugfixing detection of invoice paid in shopify modal 2020-09-24 16:25:34 +02:00
ce15eed343 Fixing javascript variable typo 2020-09-24 16:25:34 +02:00
b993da9751 Ensuring that Shopify.Password values is present 2020-09-24 16:25:34 +02:00
a93e3be197 Initializing modal apiPrefix url, needed for bundling 2020-09-24 16:25:34 +02:00
858d56d20c Bugfixing problem with currency comparison 2020-09-24 16:25:34 +02:00
0818abe233 Prefixing Shopify invoices, passing real orderId 2020-09-24 16:25:34 +02:00
c39138e3ba Not displaying Shopify Api Password 2020-09-24 16:25:34 +02:00
98c530cada Using bundled javascript for Shopify 2020-09-24 16:25:33 +02:00
e4f3c1ae94 Tweaking UI for Shopify integration 2020-09-24 16:25:33 +02:00
05b45f8cf5 Shopify credentials clearing that stops order marking 2020-09-24 16:25:33 +02:00
d530059e7e Tweaking Shopify integrations page for better display 2020-09-24 16:25:33 +02:00
7a04be0f30 Registering ShopifyOrderMarkerHostedService 2020-09-24 16:25:33 +02:00
c3d8c8d4b0 Checking that order exists on Shopify before registering transaction 2020-09-24 16:25:33 +02:00
0af4be3d99 Importing hosted service that will register transactions on Shopify 2020-09-24 16:25:33 +02:00
8a68e1b49d Importing UI for registering and verifying Shopify credentials 2020-09-24 16:25:33 +02:00
cf99f0fca0 Importing ShopifyApiClient for interactions with Shopify Api 2020-09-24 16:25:33 +02:00
31e335792f Update PSBT should include non witness utxo 2020-09-24 21:43:25 +09:00
d1efddd312 Make sure lightning listener is listening to new bolt11 invoices for partially paid btcpay invoices and that all payments are registered to the invoice. 2020-09-24 12:18:19 +02:00
dbe1579fc4 fix pos app test 2020-09-24 09:43:39 +02:00
2de20937ac Add fallbackfee for tests 2020-09-24 15:38:51 +09:00
10f5967e41 bump bitcoind 2020-09-24 15:26:40 +09:00
0f743cec41 The send wallet, by default, include the previous transaction 2020-09-24 12:21:42 +09:00
f371c47be5 Merge pull request #1913 from Kukks/ln-gen-new-partial
Ensure new bolt11 invoice on partial payment to btcpay invoice
2020-09-22 20:56:56 +09:00
d334eed9bb improve test 2020-09-22 11:30:18 +02:00
0819df3d26 Ensure new bolt11 invoice on partial payment to btcpay invoice 2020-09-22 11:30:18 +02:00
e276443d2d Add Value Criteria For Payment Method
I upgrade lightning max/bitcoin min to support better control in store. Now can have setting only enable specific payment method only if value high/low I think make code simple more too and backward compatible
2020-09-22 11:20:44 +02:00
0fc862bac3 Fix inventory handling in PoS (#1922) 2020-09-22 10:29:06 +02:00
c640289f4f App: Light PoS on top of the existing PoS (#1909)
* Initial commit

* review fixes

* Fix padding of logo, readjust display font size when clearing numbers

Co-authored-by: Kukks <evilkukka@gmail.com>
2020-09-21 08:06:31 +02:00
8891111b2c Adjust invoice badge styling (#1906) 2020-09-20 09:33:29 +02:00
abd0ba49ca Merge pull request #1875 from dennisreimann/invoice-notification-email
Invoice notification email improvements
2020-09-19 11:16:49 +09:00
62f00fa970 Merge pull request #1886 from Kukks/invite-link
Allow admins to invite new users
2020-09-19 11:15:38 +09:00
f6252b73f1 Merge pull request #1916 from Kukks/morelabels
Add more labels (payment requests, apps, better payout label)
2020-09-19 11:14:21 +09:00
0dbed93454 Merge pull request #1917 from xpayserver/removedonation
remove eth donation
2020-09-19 11:13:15 +09:00
1cf60acb29 remove donation 2020-09-18 12:30:13 +02:00
44889a3826 fix payout test 2020-09-18 08:51:23 +02:00
8a3c751c10 Add more labels (payment requests, apps, better payout label) 2020-09-17 16:39:55 +02:00
f14ad8be58 Merge branch 'master' into MonetaryUnit 2020-09-17 11:43:31 +02:00
4463d2408c fix 2020-09-17 11:39:34 +02:00
7e60328cff Greenfield: Rename API key redirect params; switch to POST body (#1898)
* Rename user param to userId in API key redirect

This way it is clearer what to expect and it also make the parameteer easier to consume.

* Post redirect: Allow form url and prettify page

- Form URL as alternative to controller/action for external URLs
- Making it look nice and add explanation for non-JS case

* APIKeys: Minor view updates

fix

* APIKeys: Use POST redirect for confirmation

fix

* UI: Minor update to confirm view

Tidies it up and adapts to the newly added ConfirmAPIKeys view.

* APIKeys: Update delete view

Structures the information in title and description better.

* APIKeys: Distinguish authorize and confirm (reuse)

* Upgrade ChromeDriver

* Test fixes

* Clean up PostRedirect view

By adding missing forgery token

* Re-add tests for callback post values

* Rename key param to apiKey in API key redirect

* Update BTCPayServer/wwwroot/swagger/v1/swagger.template.authorization.json

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Use DEBUG conditional for postredirect-callback-test route

* Remove unnecessary ChromeDriver references

* Add debug flag

* Remove debug flags

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2020-09-17 11:37:49 +02:00
45ba4675fc Fix async void usage
https://github.com/davidfowl/AspNetCoreDiagnosticScenarios/blob/master/AsyncGuidance.md#async-void
2020-09-16 14:25:48 +02:00
79c685c99b Invoice notification email improvements 2020-09-16 14:25:47 +02:00
1c5567225c Don't send mail for expired invoices 2020-09-16 14:25:46 +02:00
8ba852084e Users API: Add roles (#1914)
* API: Fix create user response model

* API: Add roles to user data
2020-09-16 14:17:33 +02:00
9365706777 Add test 2020-09-16 11:49:47 +02:00
8e8415515d Show index of payment address for onchain payments 2020-09-16 11:49:37 +02:00
eb9fe7c401 add tests 2020-09-16 08:54:51 +02:00
371b33a2e1 Allow admins to invite new users
* This refactors the email sending so that all the logic related to users and emails are now contained in one location.
* The Reset password screen has been updated from its ugly plain self to use the same layout as the login.
* An admin can now create a new account without specifying a password. A link is generated that can be given to the intended user to configure the password. If emails are configured, it also sends an email
* An admin can now create accounts that still require the user to verify their if the setting is enabled from the server settings. A link is generated that can be given to the intended user to configure the password. If emails are configured, it also sends an email.
* The above features can be used in conjunction: An email will have to verify their email through a link. Once verified, the user is redirected to setting the password.
* When an email has been verified OR a password has been set, users are now redirected to the login page with the email filled in and a success status message shown instead of a dedicated thank you page.
2020-09-16 08:54:24 +02:00
2711f2cb2f Fix CI 2020-09-15 16:26:10 +02:00
25dd38af5c Merge pull request #1730 from xpayserver/feat/eth
Add Ethereum & ERC20 Support
2020-09-15 19:51:55 +09:00
0545f6b74d Adjust logs section styling (#1907)
close #1905
2020-09-14 15:45:50 +02:00
e7b8220bac Merge pull request #1895 from Kukks/rename-expostpsbt-option
Rename "Export as PSBT" to "View PSBT"
2020-09-14 12:53:13 +09:00
9a0adcf9ed Merge pull request #1627 from btcpayserver/gf-dev-docs
Create GreenField Api Development Docs
2020-09-14 12:46:36 +09:00
0a8fb1b835 Merge pull request #1857 from Kukks/fix-greenfield-roles
Set roles when authenticating via greenfield
2020-09-11 22:16:18 +09:00
92a8d864d3 Merge pull request #1900 from btcpayserver/remove-changelly
Remove Changelly
2020-09-11 22:05:58 +09:00
fa46252c65 Allow entry in wallet send via fiat (#1891)
* Allow entry in wallet send via fiat

closes #1890
https://i.imgur.com/RUrSqD7.gif

* fix min amount in wallet send

* Add divisibility when setting amount from fiat
2020-09-11 09:23:08 +02:00
e051581c39 Update AddDerivationSchemes_HardwareWalletDialogs.cshtml (#1870)
Minor change for Electrum where menu choice is `Save backup`, not `Save Copy`
2020-09-11 08:31:15 +02:00
50a9772388 Remove Changelly 2020-09-10 10:30:53 +02:00
75fdb8f2e4 Rename "Export as PSBT" to "View PSBT" 2020-09-09 10:05:12 +02:00
de755ac0bb Add Ethereum & ERC20 Support
Add Tests
Add Index, XPub to payment data
Add Note on local ETH node
Fix Sync Summary and Race Condition
2020-09-09 08:19:10 +02:00
7ca0a8c56c Merge pull request #1888 from maltokyo/maltokyo
Wording/UX Fix on Wallet Tx Page
2020-09-08 19:21:21 +09:00
1cb3e5f98c Set roles when authenticating via greenfield
fixes #1855
2020-09-08 11:22:32 +02:00
f507452a37 Merge pull request #1882 from Kukks/partial-refund
Add custom refund option
2020-09-07 15:30:46 +09:00
083a213e74 Merge pull request #1889 from bolatovumar/fix/1880
Add "allow insecure" check
2020-09-07 15:27:15 +09:00
8f17d373a3 Merge pull request #1876 from btcpayserver/feat/lnd-0.11.0-beta
Update LND to 0.11.0-beta
2020-09-07 01:24:43 -05:00
5e6cc4f55a Bumping docker-compose.altcoins.yml as well 2020-09-07 01:24:05 -05:00
d8550f6cca Update LND to 0.11.0-beta 2020-09-07 01:24:05 -05:00
e70753df5e Add "allow insecure" check
Check if "allow insecure" is set for ligthning node connection string before throwing error for http connection.

fix #1880
2020-09-06 15:20:19 -07:00
Mal
0744e23ca6 Update WalletTransactions.cshtml 2020-09-05 23:41:40 +02:00
Mal
fcd4f223f8 Wording/UX Fix on Wallet Tx Page
Change Balance Column title to "Transaction Amount" to fix https://github.com/btcpayserver/btcpayserver/issues/1887
2020-09-05 23:23:03 +02:00
39beacf884 Split mnemonics correctly 2020-09-03 23:59:54 +09:00
69c2400ec7 [Bug fix] If error while signing with hot wallet, do not white page crash 2020-09-03 23:59:54 +09:00
81561c6f3d Merge pull request #1800 from btcpayserver/apikeys/redirect
Add API Keys Application identifier + Redirect
2020-09-03 21:27:12 +09:00
85d393fec3 Merge pull request #1872 from Kukks/invoie-severity
Add invoice event severity
2020-09-03 21:24:20 +09:00
0d8e2f0d4a Fix bug: The wallet was sending only round amount of sat per byte 2020-09-03 17:27:51 +09:00
13b9a7bf6e fix typo in monero 2020-09-02 13:15:09 +02:00
f6aeee2b70 UI: Primary color checkmark (#1873) 2020-09-02 12:11:38 +02:00
86e7b7bdb3 fix monero crash (#1884)
fixes #1883
2020-09-02 12:10:27 +02:00
735995954f Add custom refund option
Allows you to specify an alternative refund amount and currency. This allows partial refunds and other negotiated terms
closes #1874
2020-09-02 11:24:18 +02:00
98c4b658c4 Add invoice event severity
closes #1681
https://i.imgur.com/eyMO9M3.png
2020-09-01 18:19:49 +02:00
3c3e2f80da Push only one tag 2020-09-01 11:51:11 +09:00
eba0778045 Nugetify the BTCPayServer.Client 2020-09-01 11:49:10 +09:00
4055498921 Merge pull request #1856 from Kukks/mysql-fix
attempt mysql fix
2020-08-28 20:19:18 +09:00
811fd98a39 Add MaxLength and remove destination maxlength 2020-08-28 09:39:25 +02:00
47930035a7 attempt mysql fix
fixes #1836
2020-08-28 09:39:25 +02:00
6a8dbf49da clean and remove hack 2020-08-28 09:15:08 +02:00
0e07fcc706 fixes and adapt 2020-08-28 09:00:14 +02:00
dbe7f464bd permission check for auth 2020-08-28 09:00:13 +02:00
7ca74aeea7 Add API Keys Application identifier
This lets the authorize api key screen redirect to the defined url  and provide it with the user id, permissions granted and the key.

This also allows apps to match existing api keys generated for it specifically using the application identifier, and if matched, presented with a confirmation page before redirection.
2020-08-28 09:00:13 +02:00
cf7c5102fc Merge pull request #1760 from btcpayserver/api/invoice
GreenField: Invoice API
2020-08-27 19:50:14 +09:00
b71eb12e23 Add store sort (#1861)
close #1837
2020-08-27 17:31:33 +09:00
709b06baa3 Remove invoices/email for this PR 2020-08-27 11:00:04 +09:00
f900d520da Add InvoiceTime, Expiration and monitoring to Invoice greenfield API 2020-08-26 21:36:32 +09:00
f2e94e6819 Use nicer representation of payment methods in the Greenfield API 2020-08-26 21:36:32 +09:00
be21e7d253 Remove PaymentMethodData from invoice entity 2020-08-26 21:36:32 +09:00
8f0cc9de03 Update swagger 2020-08-26 21:36:32 +09:00
67b04473b5 Decouple the CreateInvoiceCore from BitpayCreateInvoice, remove some features from greenfield invoice for now 2020-08-26 21:36:32 +09:00
b2ff041ec0 Create Metadata property for InvoiceEntity, migrate all data without logic there 2020-08-26 21:36:31 +09:00
8dea7df82a make individual action items 2020-08-26 21:36:31 +09:00
5f6f54db36 Remove old props 2020-08-26 21:36:31 +09:00
41bebfedc4 add swagger docs 2020-08-26 21:36:31 +09:00
4917f32574 Update BTCPayServer/Controllers/GreenField/InvoiceController.cs
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2020-08-26 21:36:30 +09:00
8f4f87cd8f Update BTCPayServer.Client/Models/InvoiceData.cs
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2020-08-26 21:36:30 +09:00
7ca2df9fcc rename converter 2020-08-26 21:36:30 +09:00
d96bd15b3b add status and refactor 2020-08-26 21:36:30 +09:00
cb5601c68b unarchive endpoint + formatting 2020-08-26 21:36:29 +09:00
34e76494e3 GreenField: Invoice API 2020-08-26 21:36:29 +09:00
81bba8c829 Fix invoice action responsiveness (#1854) 2020-08-26 15:19:40 +09:00
9ac5011bed Merge pull request #1868 from pavlenex/master
Add new supporter, re-arrange old one
2020-08-25 12:28:33 +02:00
6c055ff9ef Add new supporter, re-arrange old one 2020-08-25 11:43:11 +02:00
db89754a26 Add text break to alerts (#1865) 2020-08-25 14:55:34 +09:00
8239fd7e0e InvoiceEntity blob should not be indented when saved into DB 2020-08-25 14:53:18 +09:00
e7ea8ac40f Improve invoices list view (#1815)
* Improve invoices list view

* Pager: Only show options that make sense

* ListInvoices formatting

* Add separator for dropdown toggle split

* Minor ListInvoices improvement

* Improve payment requests list view

* Distinguish empty and filtered lists

* Properly align invoice details

* Add payment symbols to invoices list

* Improve payment symbols in invoices list

* Always display search on list pages

* Inline variable

* Move display logic to pager

e5040ede55 (commitcomment-41698272)
2020-08-24 13:57:07 +09:00
a249a164f7 Fix HitBTC again 2020-08-20 13:15:35 +09:00
44896559c6 Merge pull request #1853 from Kukks/not-if-test-func
Add debug notifications
2020-08-20 13:00:33 +09:00
112495323e Merge pull request #1852 from Kukks/notif-del-bug-fix
fix notification page issue
2020-08-20 12:59:53 +09:00
2767fca5d6 Update Currencies.json 2020-08-19 16:38:36 +03:00
b5b32cacfc Merge branch 'master' into MonetaryUnit 2020-08-19 15:33:02 +03:00
98a74a15f7 Update BTCPayServer.Common.csproj 2020-08-19 15:31:49 +03:00
68686cd249 Add debug notifications
This adds a test notif only available in debug mode + endpoint `/Notifications/GenerateJunk` that generates x amount of notifications.
2020-08-19 13:31:28 +02:00
565dbd88ff fix notification page issue
fixes #1820
2020-08-19 13:21:05 +02:00
c4d2ece9c7 Merge pull request #1849 from NicolasDorier/removetorlink
Remove Tor link from navbar
2020-08-18 16:00:02 +09:00
59f00ea3df Remove Tor link from navbar 2020-08-18 13:03:26 +09:00
00f4691f38 Bump lightning lib 2020-08-17 12:02:24 +09:00
a578857806 bump clightning 2020-08-17 11:54:23 +09:00
80e46db48a typo 2020-08-16 23:27:52 +09:00
f4ad04ec2e Fix HitBTC provider 2020-08-16 23:12:21 +09:00
66d01aecc3 bump lightning lib 2020-08-16 22:46:53 +09:00
b176b972b6 Fix tests 2020-08-16 22:09:10 +09:00
90ccf88d4b Bump libraries and version and changelog 2020-08-16 21:47:03 +09:00
12b5c88acf Merge pull request #1829 from btcpayserver/bitcoin-only-fixes
Do not crash UI and background services after switching to BItcoin Only when you had altcoin payments
2020-08-16 21:39:30 +09:00
3024ace641 Merge branch 'master' into bitcoin-only-fixes 2020-08-14 17:50:36 +02:00
d907010e1d Merge pull request #1830 from btcpayserver/feat/shopify
Shopify integration
2020-08-13 17:59:17 +09:00
bc5068ac7b Merge pull request #1842 from NicolasDorier/components
Use razor component to encapsulate UI logic
2020-08-13 17:44:22 +09:00
68482732f7 Fix CSV export incorrectly formated (fix #1844) 2020-08-13 17:06:16 +09:00
d05f914841 Fix crash if impossible to get the network of a payment 2020-08-13 16:29:59 +09:00
f323d06f5c fix format that works with github templates 2020-08-12 10:14:57 +02:00
0aad14dcfe Merge pull request #1840 from pavlenex/configyml
add config yaml to issue templates
2020-08-12 10:11:38 +02:00
b812c7493a Update issue templates
Add issues templates
2020-08-12 10:10:21 +02:00
f244170f7b Merge pull request #1839 from pavlenex/issue-template-delete
Delete issue template folder
2020-08-12 10:00:36 +02:00
5c9d0fd40a Use razor component to encapsulate UI logic 2020-08-12 16:48:14 +09:00
10d6e44a38 Docker: Add Lightning channel setup/teardown scripts (#1835)
An alternative for establishing the customer-merchant channel connection.
2020-08-11 14:25:12 +02:00
a7a793088d add config yaml
- add support chat link
- disable blank issues
2020-08-11 13:28:52 +02:00
18ce6c83c4 Delete issue template folder 2020-08-11 13:20:05 +02:00
768f335a3c Merge pull request #1833 from dennisreimann/login-mobile
UI: Improve mobile login views
2020-08-10 22:41:41 +09:00
56ed583bff Merge pull request #1825 from Zaxounette/PullPayments-claim
Pull payments claim & payout notification rewording
2020-08-10 22:41:20 +09:00
901f3c4f7a Merge pull request #1822 from dennisreimann/fix-1816
UI: Fix custom-select glitch
2020-08-10 22:40:33 +09:00
d12e6a0465 Merge pull request #1821 from dennisreimann/fonts
Self-host webfonts
2020-08-10 22:39:34 +09:00
ef5a05d051 Merge pull request #1818 from xpayserver/feat/vertags
Add Better Feature Build Support
2020-08-10 22:39:14 +09:00
111cdbd4dc Merge pull request #1814 from dennisreimann/seed-confirm-setting
Remove confirm option for seed from wallet settings
2020-08-10 22:37:44 +09:00
4e70f5b8f1 UI: Improve mobile login views 2020-08-10 09:46:01 +02:00
26aac6c45d Do not crash UI and background services after switching to BItcoin Only when you have altcoin payments 2020-08-09 16:17:16 +02:00
0de8cbfd45 Final tweaking of UI for first version 2020-08-09 07:50:06 -05:00
c6d72f0487 Hiding pay button after click 2020-08-09 07:18:00 -05:00
c79e79a5b6 Making js variables easier to select with double click 2020-08-08 11:22:59 -05:00
f73c912945 Simplifying script by getting variables from Shopify object 2020-08-08 11:14:45 -05:00
37cb49d785 Adding Shopify scripts with extracted variables 2020-08-08 10:11:08 -05:00
ea9836a701 Subtle term change in Awaiting-payout-notification 2020-08-08 12:50:55 +02:00
3dbb8a0cc1 Rewording of the success-claim-message for clarity 2020-08-08 12:47:28 +02:00
0e1818f535 Swap webfonts on load 2020-08-07 11:41:18 +02:00
e1947c0077 UI: Fix custom-select glitch
Fixes #1816.
2020-08-06 22:32:28 +02:00
7c349b12b2 Self-host webfonts
This inlines all webfonts we are using throughout the app, instead of loading them from Google Fonts. There are several benefits to this approach:
- Better performance
- We don't have any problems in regards to potential Google Fonts downtimes
- It protects our users privacy, as they don't have to request those fonts from a third-party

It sets up individual css files per font-face, so that they are easier to include and require on a per use-case basis.
2020-08-06 22:18:26 +02:00
d758bedaed Add Better Version Build Support
This allow you to build specific builds based on feature for specific version such as `v1.0.0.88-lndseedbackup-1` (good for forks with custom features)
2020-08-06 08:43:16 +02:00
a80146e894 fix typo name 2020-08-06 00:51:12 +09:00
68d13b8724 bump 2020-08-06 00:07:12 +09:00
f974e1b6cd update lang 2020-08-06 00:06:15 +09:00
50d3a53e4f Merge pull request #1794 from NicolasDorier/changelog/1.0.5.4
Add changelog for 1.0.5.4
2020-08-06 00:05:08 +09:00
53be80a26d Moving new version notification to new feature, linking issues 2020-08-06 00:03:47 +09:00
2d608621d9 Remove confirm option for seed from wallet settings
Closes #1813.
2020-08-05 11:20:34 +02:00
ede5aceeeb Merge pull request #1812 from britttttk/wallet-typo
Fix typo in generate wallet
2020-08-05 16:47:06 +09:00
b6959bdfd4 Typo in generate wallet 2020-08-05 01:42:08 -06:00
eb0dee07d8 Merge pull request #1808 from bolatovumar/issue/1804
Add pointer cursor to wallet transaction comment and tag icons
2020-08-05 12:12:48 +09:00
067a42d400 Add pointer cursor to wallet transaction comment and tag icons
close #1804
2020-08-04 18:51:21 -07:00
f363ebd41d Add changelog for 1.0.5.4 2020-08-04 21:51:35 +09:00
698ae56d82 Merge pull request #1801 from btcpayserver/fixcfinvoice
Fix Crowdfund not counting all invoices when configured to
2020-08-04 21:49:58 +09:00
5a9793a952 Fix Crowdfund not counting all invoices when configured to
fixes #1698
2020-08-04 13:40:00 +02:00
57fffc8ef0 Merge pull request #1798 from dennisreimann/summernote-upgrade
Upgrade summernote rich text editor
2020-08-04 16:52:35 +09:00
78d4bc07d2 Merge pull request #1799 from Kukks/fixpr
Handle multiple new invoices in  payment requests
2020-08-04 16:51:47 +09:00
b381e629f1 Handle multiple new invoices in payment requests 2020-08-04 07:55:13 +02:00
0c7314f771 Upgrade summernote rich text editor
Fixes #1796.
2020-08-04 07:52:05 +02:00
4dca905a91 Merge pull request #1797 from Kukks/fixlq
fix chain loader after unfiltered removed
2020-08-04 14:28:47 +09:00
4ace7e07c9 fix chain loader after unfiltered removed 2020-08-04 07:25:15 +02:00
74c80fa536 Allow RPC access in services when the node is synching (fix #1795) 2020-08-04 14:16:25 +09:00
f2a005eeac HTTP Escape placeholders in callbacks 2020-08-04 14:05:36 +09:00
7f29769352 Bump nbx 2020-08-04 13:22:40 +09:00
ffcc967aef Fix: Spurious Error Message When Saving User With Non-Admin Rights (fix #1793) 2020-08-04 11:30:19 +09:00
23aefccbe9 Construct websocket uri for notification client side 2020-08-04 11:21:41 +09:00
a0d70ea8a4 Merge branch 'master' into MonetaryUnit 2020-08-03 19:18:08 +03:00
db29a31de6 rename to fix conflict 2020-08-03 19:17:15 +03:00
e399815427 Merge pull request #1788 from btcpayserver/feat/new-version-check
Adding HostedService that checks for new BTCPayServer version on GitHub once a day
2020-08-03 23:00:17 +09:00
16eedf4153 Deducing if to perform update check from update url configuration 2020-08-03 03:17:04 -05:00
ce87d2e45c Making use of options to initalize update check on first admin registration 2020-08-03 03:17:04 -05:00
c18167889d Adding update related options and using them in HostedService 2020-08-03 03:17:04 -05:00
adefaf2fa8 Ensuring that only tags that match release format raise notification
Utilizing the same regex used on circleci
2020-08-03 03:17:04 -05:00
c9d830f9ae Logging exceptions and unsuccessful http calls 2020-08-03 03:17:04 -05:00
9e70bb448a Fixes based on feedback 2020-08-03 03:17:04 -05:00
6c7d3ae0bf Adding checkbox for check new version policy 2020-08-03 03:17:04 -05:00
51211dccb0 Adding test to verify new version check 2020-08-03 03:17:04 -05:00
53f9c22fb7 Refactoring to exposing related classes 2020-08-03 03:17:04 -05:00
1b3e40fd70 Fixing typo 2020-08-03 03:17:04 -05:00
dc3c130162 Initializing Cts with class, preventing race condition 2020-08-03 03:17:04 -05:00
ea7231ff26 Adding hosted service that will optionally check for new version once a day 2020-08-03 03:17:04 -05:00
b47b942e97 Wallet UI: Improve views (#1763)
* Improve UpdateStore and DerivationScheme views

fix

* Improve wallet views

CSS fix

* Apply suggestions from code review

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2020-08-03 17:12:21 +09:00
b90ce01e05 Merge pull request #1792 from btcpayserver/invoice-ui-fix
Quickfix for Invoices list
2020-08-03 16:48:12 +09:00
85d61c4c93 Quickfix for Invoices list
https://i.imgur.com/4eDlbxk.gif

original:
https://chat.btcpayserver.org/files/6ocj359nuinftf6ujbnpeszh1o/public?h=MVe3va_TChslDFwdTKhVEkhhJUdIQ6ihwwJ4yOmCC6Q
https://chat.btcpayserver.org/files/gk7mjojfg3faxc6x57gg4pchka/public?h=JGGbhyOiyeazCtr7vAnZY1cPOgHFZ29xJZRwDzSdtgo
2020-08-03 09:37:03 +02:00
ad307e859e Make CircleCI check if bitcoin only build still works 2020-08-03 16:31:35 +09:00
f6801187cb Merge pull request #1791 from dennisreimann/cleanups
Simple layout cleanups
2020-08-03 15:29:37 +09:00
5b929e85cf Simple layout cleanups
Some cleanups related to the recent changes arount the LayoutSimple. We don't use the font montserrat anymore and the col-head class is also obsolete.
Moved the remaining styles to our site.css
2020-08-02 14:33:20 +02:00
8e2728902a Merge pull request #1754 from btcpayserver/feat/prefs-generalization
Cookie Preferences Generalization, applying same style to ListInvoices and Payment Requests
2020-07-31 16:12:10 +09:00
6894a224b6 Remove redundant doc info written in the doc 2020-07-31 10:56:17 +09:00
77f5d0be35 Initializing BasePagingViewModels from cookie 2020-07-30 18:02:59 -05:00
bce1345ccc Add BTCPayServerEnvironment.Altcoins 2020-07-30 22:06:54 +09:00
2c26d55813 Missing files 2020-07-30 22:04:38 +09:00
87f411e5f1 Exclude altcoins files from bitcoin only build 2020-07-30 22:04:13 +09:00
4af3fa4eb2 Fix build 2020-07-30 22:00:25 +09:00
7974633bba Fix EmbeddedCSS being ignored, stripped by sanitizer 2020-07-30 11:36:33 +09:00
1fb75c908b Remove the concept of unfiltered networks 2020-07-30 11:36:02 +09:00
26112a1ed6 Use CsvHelper for generating CSV 2020-07-30 10:01:56 +09:00
17bcfe154c Add coherence test on test time docker compose 2020-07-29 22:12:46 +09:00
3ce16dc9a3 Merge pull request #1782 from xpayserver/btc-only
Add Bitcoin Only Build
2020-07-29 21:58:28 +09:00
f9342b1c92 Run tests on the altcoin build for maximum coverage 2020-07-29 20:49:46 +09:00
39cc420415 Improve build time for dockerfiles 2020-07-29 20:13:35 +09:00
9b7323f9fa Move some altcoins tests 2020-07-29 20:01:51 +09:00
77fff553d1 Activate runtime razor or all debug configs 2020-07-29 19:58:54 +09:00
cfdd1af3a3 Make vscode open the browser automatically 2020-07-29 19:54:52 +09:00
22da4182b1 Separate docker-compose and launch profiles 2020-07-29 19:38:58 +09:00
002f6d3e87 Isolate altcoins tests in their own folder 2020-07-29 19:11:54 +09:00
02998fff49 Add Altcoins-Release and Altcoins-Debug configurations 2020-07-29 18:55:28 +09:00
8156fce81a Merge pull request #1784 from Kukks/paymentlink
Generate Payment link from PaymentType
2020-07-29 17:27:12 +09:00
2d3b0717f8 Merge pull request #1783 from Kukks/numeric-json-converter
Make Decimal json converter work for other number types
2020-07-29 16:44:51 +09:00
e33200058d Generate Payment link from PaymentType 2020-07-29 09:31:47 +02:00
7230a91b4f Make Decimal json converter work for other number types 2020-07-29 08:44:52 +02:00
c06c5d4104 bump NBX 2020-07-29 13:27:04 +09:00
92ae1109d0 Add Bitcoin Only Build 2020-07-28 22:48:51 +02:00
19ffd031ec Refactoring query extraction from cookie into extender methods 2020-07-28 10:28:32 -05:00
466a0c6049 Adding support for dynamic, special meaning date strings 2020-07-28 10:28:32 -05:00
97e5f2e656 Ignoring prefs cookie deserialization errors 2020-07-28 10:28:32 -05:00
bce386bc7a Blobbifying user preferences cookie, to contain all prefs 2020-07-28 10:28:32 -05:00
f47ffd7ed0 Using proper class for 0 left padding
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2020-07-28 10:28:32 -05:00
0b115c3228 Using pull-right class instead of direct float style 2020-07-28 10:28:32 -05:00
a22c12adc9 Applying paging footer to Payment Requests 2020-07-28 10:28:32 -05:00
8f293db29b Extracting grid paging to partial 2020-07-28 10:28:32 -05:00
7bcc559ec7 Generalizing TimezoneOffset field init 2020-07-28 10:28:32 -05:00
e3a8e1a187 Applying conventions from ListInvoice on PaymentRequests 2020-07-28 10:28:32 -05:00
9d9d0461ad Generalizing saving of search, applying it to PaymentRequests grid 2020-07-28 10:28:32 -05:00
6bacddc159 Refactoring ListInvoicePreferences 2020-07-28 10:28:32 -05:00
b7d66efb20 Merge pull request #1753 from bolatovumar/feat/1568
Allow sorting apps by store, name or app type
2020-07-28 15:18:30 +09:00
26480dc602 Merge pull request #1776 from btcpayserver/invoicequeryperf
Improve query performance for invoice listing
2020-07-28 10:36:08 +09:00
ba316d02ca Improve query performance for invoice listing 2020-07-27 13:31:04 +09:00
82582d24ea Merge pull request #1764 from dennisreimann/pull-payment-ui
Improve Pull Payment view
2020-07-27 12:34:45 +09:00
aeaaa2f7d5 Merge pull request #1769 from msafi/check-in-vscode-debug-configurations
Check in VS Code debug configurations
2020-07-27 11:30:46 +09:00
89c39d15de Merge pull request #1773 from bolatovumar/fix/1770
Add margin to "Delete this store" button
2020-07-27 11:30:01 +09:00
2cabc63752 Merge pull request #1774 from Eskyee/patch-10
Update .gitignore all the .DS_Store files
2020-07-27 11:29:39 +09:00
e03311e5ec Add margin to "Delete this store" button
fix #1770
2020-07-25 19:15:46 -07:00
810e12f474 Update .gitignore all the .DS_Store files
.gitignore all the .DS_Store files in every folder and subfolder - improves UX
If you are using macOS, visual studio, visual code, rider, your system appends the .DS_Store file in your directories. It’s not a big issue, but often you need to exclude these files explicitly in your .gitignore file, to prevent any unnecessary files in your commit. 

notice for btcpay Mac dev users..
This will never allow the .DS_Store file to sneak in your git.
But, if it's already there, you can write in your project terminal:

find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
then commit and push the changes to remove the .DS_Store from your remote repo:

git commit -m "Remove .DS_Store from everywhere"

git push origin master
2020-07-26 00:30:34 +01:00
60157eb70c Remove .NET Core Attach debug configurations 2020-07-25 10:11:30 -07:00
1f3f456123 Fix JSON indentations 2020-07-25 10:07:47 -07:00
97b7d920cb Check-in .vscode/extensions.json 2020-07-25 10:07:03 -07:00
3ffd79c279 Merge pull request #1762 from dennisreimann/readmes
Minor README improvements
2020-07-25 14:36:55 +09:00
09c7b2a5e4 Merge pull request #1772 from bolatovumar/feat/1771
Add pagination to wallet transactions page
2020-07-25 14:03:56 +09:00
df1447b917 Add pagination to wallet transactions page
close #1771
2020-07-24 21:39:30 -07:00
22f22c0fa0 Set logging.moduleLoad to false 2020-07-24 12:53:36 -07:00
272de60f9f Edit .gitignore 2020-07-24 10:15:31 -07:00
b40dd46871 Check-in VS Code debug config files 2020-07-24 10:13:34 -07:00
e67d2ee498 Add MonetaryUnit (MUE) support 2020-07-24 18:32:40 +03:00
310f6a385c fix null instance on invoice when using paymentCurrencies (#1766)
fixes #1765
2020-07-24 08:16:41 +02:00
6245684801 Improve Pull Payment view 2020-07-23 17:15:08 +02:00
79f0e5768b README: Use two rows for supporters 2020-07-23 09:47:05 +02:00
967f28542f Minor README improvements 2020-07-23 09:47:04 +02:00
df413d1af0 Merge pull request #1761 from dennisreimann/store-ui
UI updates: Manage store
2020-07-23 16:28:11 +09:00
a3b4ceba50 Improve update store view 2020-07-22 15:31:09 +02:00
2496ec73bf Improve checkout experience view 2020-07-22 15:30:58 +02:00
f84fe82f9b Improve list API tokens view 2020-07-22 15:29:58 +02:00
c5a073cee8 Improve enable paybutton view 2020-07-22 15:29:24 +02:00
ed81a17039 Code formatting 2020-07-22 15:29:03 +02:00
22f8c4b88b Render messages only when present 2020-07-22 15:28:31 +02:00
27d7d03d4c Merge pull request #1745 from dennisreimann/recovery-seed
Recovery seed
2020-07-22 20:55:20 +09:00
ca8d83099f Merge pull request #1752 from dennisreimann/login
Login/register view improvements
2020-07-22 20:53:01 +09:00
3b250dbbd0 Merge pull request #1759 from bolatovumar/fix/1758
Place status message in correct positions for cart and static versions of POS app
2020-07-22 20:47:43 +09:00
bc0215b647 Place status message in correct positions for cart and static versions of POS app
fix #1758
2020-07-20 20:32:26 -07:00
25527ec1dd Use nameof() instead of strings 2020-07-20 20:02:14 -07:00
9e1ac8cd28 Update test 2020-07-20 17:46:25 +02:00
8688334f0d Update views dependent on simple layout 2020-07-20 16:53:49 +02:00
8d6a70ed7b Minor login/register adjustments 2020-07-20 15:20:23 +02:00
36e3eeecaa Allow sorting apps by store, name or app type
close #1568
2020-07-19 15:20:18 -07:00
25d08c1a71 Fix swagger doc for approve payout 2020-07-19 15:56:15 -05:00
7c1d0f2e8f Recovery seed page improvements 2020-07-19 15:52:57 +02:00
0e8cd20533 Login/register/error view updates 2020-07-19 14:28:07 +02:00
6bc5c05cf3 Fix text and test 2020-07-17 18:00:10 +02:00
dbf6676115 Recovery seed page improvements 2020-07-17 18:00:09 +02:00
188774f30a Seed-lookup related test fixes 2020-07-17 18:00:08 +02:00
cfef1f3432 Add separate recovery seed backup view
fix
2020-07-17 18:00:07 +02:00
892ea0e9af Login/register view improvements
Consistently aligned the texts centered and moved the Tor URL button below the form.
2020-07-17 17:51:25 +02:00
f6549cda33 Merge pull request #1749 from btcpayserver/invoicepref
Save the latest search on invoices
2020-07-17 19:16:36 +09:00
9fb83f268b Fixing Unfiltered link to leverage empty string for clear 2020-07-17 04:32:33 -05:00
31d927c93d Merge pull request #1750 from britttttk/rbf-doc
Use BTCPay doc for RBF tooltip
2020-07-17 16:46:51 +09:00
16977009ea Merge pull request #1751 from bolatovumar/feat/1743
Allow selecting all notifications on the page at once
2020-07-17 15:35:05 +09:00
08db3b1613 Allow selecting all notifications on the page at once
close #1743
2020-07-16 21:52:40 -07:00
32c6228dfa Use btcpay doc for rbf tooltip 2020-07-16 22:38:19 -06:00
f3700c39e3 Save the latest search on invoices 2020-07-17 13:24:41 +09:00
7d0aa8d91f Merge pull request #1729 from xpayserver/feat/enhance-monero
Show sync progress for monero and show amount of monero payment
2020-07-17 12:45:22 +09:00
bdfe77dbb5 Merge pull request #1746 from btcpayserver/api/fix-keys-requirement
GreenField: Remove requirement for permissions >= 1 when creating key
2020-07-17 12:44:22 +09:00
2e225a1435 Merge pull request #1712 from dennisreimann/login
Redesign login and register / refactor create user
2020-07-17 12:39:08 +09:00
c2a4bc2603 GreenField: Remove requirement for permissions >= 1 when creating key
Sometimes you just want to have an api key to verify a user still exists periodically on a server and do not need any permissions
2020-07-16 10:26:04 +02:00
561caf966a bump 2020-07-16 12:34:39 +09:00
33eb5f8117 Merge pull request #1742 from bolatovumar/feat/1709
Allow mass-archiving of invoices
2020-07-15 12:27:25 +09:00
efa62e72af Merge pull request #1741 from dennisreimann/2fa-view
UI: Minor enhancements to 2FA view
2020-07-15 12:26:11 +09:00
94e8bf4a72 Allow mass-archiving of invoices
closes #1709
2020-07-14 19:58:52 -07:00
391d7b01d1 UI: Minor enhancements to 2FA view
Improve hover highlight for light and dark theme. APply a bit more spacing to the 2FA link cells.

Also fixes table row highlight in light theme.
2020-07-14 13:29:26 +02:00
9d1cd085ea ad psbt base64 file upload test 2020-07-14 09:52:17 +02:00
311972c39f Update changelog 2020-07-14 16:43:48 +09:00
72d4fa6cd0 Merge pull request #1740 from btcpayserver/psbt-decode
streamline decode of uploaded psbt file + fix action button alginment
2020-07-14 16:43:19 +09:00
016bf1d671 add download psbt action 2020-07-14 09:36:58 +02:00
406b06a0be Update changelog 2020-07-14 16:31:01 +09:00
24439f1dc2 Merge pull request #1737 from btcpayserver/payjoin-hw-fix
Fix Payjoin HWW signing
2020-07-14 16:29:11 +09:00
15df2dfb0c Merge pull request #1735 from btcpayserver/2fa-config-screen
Fix 2FA config screens
2020-07-14 16:27:09 +09:00
d393cee732 streamline decode of uploaded psbt file + fix action button alginment 2020-07-14 09:18:40 +02:00
4c175ca340 bump version 2020-07-14 16:05:07 +09:00
5ed21fd740 Update lang 2020-07-14 16:04:58 +09:00
88af6c441f Can refund invalid invoices 2020-07-14 15:42:37 +09:00
5da9bd1784 Minor fixes and improvements for login and register 2020-07-13 21:30:09 +02:00
a122c38666 Add copy tor url button to login and register 2020-07-13 21:29:42 +02:00
e9870a4455 Improve forgot password view 2020-07-13 19:09:59 +02:00
dbb8dae5e2 Login and register as secondary buttons 2020-07-13 19:09:50 +02:00
6f9043b2bc Improve validation message spacing 2020-07-13 19:09:21 +02:00
0235624c64 Unify get and post routes for create user 2020-07-13 19:08:47 +02:00
ea8f121cb0 Rework login and register views 2020-07-13 17:32:19 +02:00
9b9cb83a06 Dissect register and create user 2020-07-13 17:32:18 +02:00
17421497a1 Extract supporter styles from layout 2020-07-13 17:29:47 +02:00
761f6152d0 Unify welcome and error layout to LayoutSimple 2020-07-13 17:29:47 +02:00
eb14635a53 broadcast hww payjopin immediately 2020-07-13 15:02:51 +02:00
37b065ce6a Merge pull request #1736 from btcpayserver/basic-auth-fix
fail auth on incorrect basic auth value
2020-07-13 18:03:26 +09:00
dd0f8faf79 Merge pull request #1707 from Kukks/corsapi
Enable CORS and fix small doc error
2020-07-13 18:01:43 +09:00
006ebf3f15 Fix 2FA config screens 2020-07-13 10:58:53 +02:00
572c7ebbd8 Fix Payjoin HWW signing
fixes #1557
2020-07-13 10:54:39 +02:00
b728cd61ae Merge pull request #1716 from arc3x/pull-payment-view-filter-fix
Fix: Filter payouts by PullPaymentDataId when fetching transactions for a specific pull payment
2020-07-13 17:40:55 +09:00
04f71155b0 Merge pull request #1721 from dennisreimann/ui-updates-account
UI updates: Account section
2020-07-13 17:39:35 +09:00
e45c5ae71e Merge pull request #1724 from bolatovumar/fix-1723
Widen destination address field and make it monospace
2020-07-13 17:39:09 +09:00
632911d28c Merge pull request #1727 from dennisreimann/ui-updates-server
UI updates: Server settings section
2020-07-13 17:38:33 +09:00
5fb72513a0 Merge pull request #1733 from bolatovumar/fix-1732
Improve "Pull payments" table look
2020-07-13 17:37:59 +09:00
4b392ad70a fail auth on incorrect basic auth value
fixes #1713
2020-07-13 08:35:13 +02:00
42f6fbb4e5 Merge pull request #1504 from Argoneum/argoneum
Add Argoneum
2020-07-13 15:00:44 +09:00
afce1682a6 Replace pull payments body copy with a tooltip docs link 2020-07-12 12:45:30 -07:00
9f7af1c7d3 Replace | with - in pull payments table actions column 2020-07-12 12:37:36 -07:00
ca1355f80c Right-align "Actions" column in pull payments table 2020-07-12 12:35:11 -07:00
0d2f35c22f Merge pull request #1731 from btcpayserver/fix/json-indent
Modifying launchSettings.json to follow 2 space indent convention
2020-07-12 07:50:51 -05:00
6c71949888 Improve "Pull payments" table look
fix #1732
2020-07-11 21:03:46 -07:00
91e06d0858 Modifying launchSettings.json to follow 2 space indent convention 2020-07-11 16:45:44 -05:00
fe776edc9e Updating dev LND to 0.10.2-beta 2020-07-11 16:31:38 -05:00
1c7185a574 Show sync progress for monero and show amount of monero payment 2020-07-11 17:44:27 +02:00
8a7825f3bd Improve service settings view 2020-07-09 17:22:28 +02:00
3f23531f20 Improve email settings view 2020-07-09 17:22:22 +02:00
29d95a53a3 Improve users list view 2020-07-09 17:22:06 +02:00
718835255f Improve spacing for status messages 2020-07-09 17:21:29 +02:00
ca1f910d55 Improve maintenance view 2020-07-09 17:20:43 +02:00
0e410af63f Fix spacing for subnavs on mobile 2020-07-09 17:20:08 +02:00
0bbe095f6f General table style improvements 2020-07-09 17:19:25 +02:00
8b1a457312 Widen destination address field and make it monospace
fix #1723
2020-07-08 19:58:57 -07:00
7a46b2fd1b Improve user profile view 2020-07-08 19:20:32 +02:00
bfd25b8a14 Improve API keys list view 2020-07-08 19:20:24 +02:00
dae8163846 Improve change password view 2020-07-08 19:20:11 +02:00
4db6c16068 Improve U2F view 2020-07-08 19:19:55 +02:00
906ecc021b Improve 2FA views 2020-07-08 19:19:29 +02:00
8fc593a73e Improve secondary login view 2020-07-08 19:18:40 +02:00
f8e3b62edf Improve spacing for ordered lists and status messages 2020-07-08 19:18:04 +02:00
3051724ad8 Add Argoneum 2020-07-07 07:44:45 +03:00
b82abb066d Fix typo 2020-07-07 07:43:33 +03:00
ccfb97612e forwarded filter for PullPaymentDataId in GetPayoutInPeriod 2020-07-06 15:49:39 -07:00
6bf3dd96fb Merge pull request #1 from btcpayserver/master
upstream pull
2020-07-01 11:36:58 -07:00
f1e8b4b6e6 fix json 2020-06-30 08:54:57 +02:00
82af723f1f Enable CORS and fix small doc error 2020-06-30 08:26:19 +02:00
aeb90a3674 Merge pull request #1706 from dennisreimann/store-lightning
Improve information structure on Lightning page
2020-06-30 11:06:07 +09:00
64ab8e3fbe Merge pull request #1704 from btcpayserver/fix/code-cleanup-1
Code cleanup
2020-06-30 11:04:49 +09:00
f7474340cd Update BTCPayServer/Views/Stores/AddLightningNode.cshtml
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2020-06-29 22:38:50 +02:00
04acbf6509 Improve information structure on Lightning page 2020-06-29 16:54:07 +02:00
f88c02cccd Removing unused usings, readonly fields where possible 2020-06-28 22:07:48 -05:00
be5e0ea3fd Adding editorconfig reference 2020-06-28 21:48:10 -05:00
b6c7af32de Cleaning up bom from cs files 2020-06-28 21:44:35 -05:00
29294318d0 Specifying utf-8 as default charset for all files 2020-06-28 21:44:09 -05:00
d3325f17c5 Add missing file 2020-06-28 18:00:51 +09:00
51514252b6 Run dotnet format 2020-06-28 17:55:27 +09:00
18abc4913b Move hosting classes in right folder 2020-06-28 17:49:23 +09:00
d2958e1a7d Move extensions methods in specific classes 2020-06-28 17:16:53 +09:00
be44c3f9c2 Isolate OnModelCreating in Data classes (#1702) 2020-06-27 21:55:16 +09:00
72e407b69d Typos in PullPayments.cshtml (#1699)
Fixes typos in Pull Payments UI text.

No related issue, standalone PR.
2020-06-27 12:01:19 +02:00
66b9d0739b Set noindex, nofollow to ViewPullPayment.cshtml (#1700) 2020-06-27 12:00:10 +02:00
3e717ecdbc Set noindex, nofollow to ViewPaymentRequest.cshtml (#1701) 2020-06-27 11:58:55 +02:00
91720a0f34 Add changelog 2020-06-27 15:43:10 +09:00
9d531a385d bump 2020-06-27 15:39:58 +09:00
26137200b9 Do not use Onion-Location for custom domains (Fix #1693) 2020-06-27 15:39:02 +09:00
376b5fc160 Fix warning message when using SQLite (Fix #1695) 2020-06-27 15:35:32 +09:00
dbb2924ccc Fix: Create store could be called with a scoped store's modify apikey (#1696) 2020-06-27 15:34:03 +09:00
d0188f42b7 Fix crowdfound on root 2020-06-27 15:33:34 +09:00
6208706d46 Better error message if permission missing 2020-06-27 14:05:56 +09:00
3288264ca0 Add changelog 2020-06-27 12:23:27 +09:00
16f2ddddf0 Fix Point of Sale with custom domains 2020-06-27 12:21:19 +09:00
783185d99c Fix Point of Sale with custom domains 2020-06-27 12:13:17 +09:00
4ca83de131 changelog (#1669)
* changelog

* Update Changelog.md

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

* Update Changelog.md

* Update Changelog.md

* Update Changelog.md

* Update Changelog.md

* Update Changelog.md

* Update Changelog.md

* Update Changelog.md

* Update Changelog.md

* Apply suggestions from code review

Co-authored-by: Pavlenex <pavlenex@btcpayserver.org>

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: Pavlenex <pavlenex@btcpayserver.org>
2020-06-26 23:07:35 +09:00
f2b986a357 Remove warnings 2020-06-26 20:52:59 +09:00
a0065bc2ba catch cancled task exception in notif 2020-06-26 11:54:18 +02:00
dc43b54892 bump version 2020-06-26 17:09:00 +09:00
603a3dd273 bump NBitcoin 2020-06-26 16:29:40 +09:00
16b5f70e4b Fix permission on store's lightning server 2020-06-26 16:20:34 +09:00
9a989b46cc add supporter 2020-06-26 07:12:22 +02:00
6c64e7c220 Update fi-FI language 2020-06-25 18:03:33 +09:00
d66325a241 fix coin parser for weird networks 2020-06-25 10:51:27 +02:00
bf8190d122 bump nbx docker 2020-06-25 10:33:05 +02:00
23aec25686 Merge pull request #1685 from dennisreimann/broken-links
Check and fix broken anchor links.
2020-06-25 17:25:43 +09:00
405c0c609f Merge pull request #1691 from Eskyee/patch-9
remove unnecessary whitespace
2020-06-25 17:22:15 +09:00
95e0f3378d Merge pull request #1690 from btcpayserver/consolidatetables
Consolidate tables before release
2020-06-25 17:17:57 +09:00
c9850a5e24 remove unnecessary whitespace
cleaning up the unnecessary white space.
2020-06-25 08:33:34 +01:00
3cf7d01f37 Merge pull request #1688 from Kukks/fix-coin-parser
fix ypub/zpub parsing for all alts
2020-06-25 15:45:02 +09:00
ae9fae1f7d Consolidate tables before release 2020-06-25 15:43:45 +09:00
69b423edc8 Merge pull request #1689 from btcpayserver/invoicerefund
Implement invoice refund
2020-06-25 15:32:17 +09:00
5e8b379c50 Add invoice refund 2020-06-25 15:31:46 +09:00
d03124dfba Add an approval state to pull payments 2020-06-25 13:35:10 +09:00
fdc11bba8d Remove old unused refund table 2020-06-25 13:34:25 +09:00
dc5d8a6cb7 Refresh UI notifications automatically on update (#1680)
* Refresh UI notifications automatically on update

* make notif timeago live

* pass cancellation token

* Update InvoiceEventData.cs
2020-06-24 10:23:16 +02:00
2042f59283 fix ypub/zpub parsing for all alts
@gruve-p reported that ypub import was not working and then found this. no ypub/zpub import for any alts worked before lol
2020-06-24 10:18:45 +02:00
8230a408ac Add pull payment feature (#1639) 2020-06-24 10:34:09 +09:00
7805e5cea4 Fix version byte for zpub (#1686) 2020-06-24 10:19:50 +09:00
36868644dc Check and fix broken anchor links.
In addition to #1682.
2020-06-23 17:51:25 +02:00
321b67efd4 remove password type input on passphrase 2020-06-23 16:41:04 +02:00
9ea42dd981 Checkout CSS improvements (#1684)
* Checkout: Hide hidden items

As [reported on Mattermost](https://chat.btcpayserver.org/btcpayserver/pl/4mxado5a3ifnzxyhrszusz4q8e) the old way of hiding does not work well with widescreen displays.

* Checkout: Minor theme improvements
2020-06-23 16:25:43 +02:00
631d97c6b3 Fix 404 link (#1682) 2020-06-23 22:52:19 +09:00
13569fe4a2 Improve notifications UI (#1678)
* Add No JS support for notification seen toggle

* Invalidate cache when user toggles seen/massaction

* mark notif as seen after click

* add additional mass actions

* fix formatting

* add pav changes

* invalidate cache on new notifs
2020-06-23 10:06:02 +09:00
12e2b93ac9 Add invoice notifications (#1674)
* Add invoice notifications

* fixeth le order

* comment-to-code auto commit

* reduce notifications
2020-06-22 16:32:51 +09:00
0dd1b668cd Support wasabi file format input (#1671)
* Support wasabi file format input

This adds support to importing the wasabi file format which seems to be used more for imports by Wasabi,ColdCard,BlueWallet & Cobo Vault (and way better than electrum anyway)

* fixes

* add test
2020-06-22 15:39:29 +09:00
e751be21ea Altcoin - Add Chaincoin (#1636)
* Altcoin - Add Chaincoin

* Image

* Altcoin - Rating CHC

* Altcoin - Chaincoin insertion

* Revert

* Fix large diff

* Unit Test revert
2020-06-22 14:41:20 +09:00
15b8a159f5 Merge pull request #1672 from NicolasDorier/refactor/bip78
Adapt payjoin for BIP78
2020-06-22 13:58:14 +09:00
24a88fcfb5 Adapt payjoin for BIP78 2020-06-22 13:57:42 +09:00
9f842be53a fixed broken URL links (#1677) 2020-06-20 17:08:50 +02:00
c6632fe083 Change generate wallet passphrase to text input to fix autocomplete (#1676) 2020-06-20 16:02:36 +02:00
0b720768b8 Asyncify NotificationManager 2020-06-17 11:26:21 +09:00
9f12fe7e0a Merge pull request #1670 from btcpayserver/refactor/notifications2
Introduce INotificationHandler
2020-06-17 10:12:16 +09:00
cff5b82b06 Introduce INotificationHandler 2020-06-16 23:29:25 +09:00
677cc3bee9 Merge pull request #1666 from NicolasDorier/refactor/notificatoin
Small refactoring of Notifications
2020-06-16 15:46:27 +09:00
aef5cc50d5 Add the StoreScope 2020-06-15 20:52:53 +09:00
d7eeadac41 Do not allow generation of dummy even if regtest 2020-06-15 17:19:03 +09:00
7cdfa7d4c5 Use attribute to map notifcations to their string 2020-06-15 17:19:03 +09:00
9070b475ea Make the NotificationSender more generic 2020-06-15 17:19:02 +09:00
43a99bfef2 fix supporters 2020-06-15 10:08:38 +02:00
18ffd678b7 Bugfixing context factory reference 2020-06-15 01:25:55 -05:00
7566d3dac8 Tweaking date display in notifications 2020-06-15 01:23:55 -05:00
741b93dc04 Removing obsolete NotificationDbSaver hosted service 2020-06-15 01:22:09 -05:00
b19298f633 Merge pull request #1651 from btcpayserver/feat/notifications
Notification system
2020-06-15 00:59:51 -05:00
1954dfd4d7 Removing Generate Test Notification button 2020-06-15 00:58:23 -05:00
31cc966b38 Bugfixing setting of Created, expanding test 2020-06-15 00:57:20 -05:00
261931c8ef Adding list notification test 2020-06-15 00:53:12 -05:00
2c44c25b25 Signaling reference pass, bugfixing reference to deserialized blob 2020-06-15 00:36:50 -05:00
f072ec3a8c Adding paging to notifications grid 2020-06-15 00:00:56 -05:00
113869bd08 Renaming to BaseNotification 2020-06-14 23:49:08 -05:00
0dab96f0a6 Moving Notification to dedicated Service namespace 2020-06-14 23:49:08 -05:00
342f63a625 Directly casting to NotificationEvent, evading null case 2020-06-14 23:49:08 -05:00
f52c6b65ce Switching to using registered IMemoryCache 2020-06-14 23:49:08 -05:00
07efa87fe5 Refactoring conversion of data to view model, switching to FillViewModel 2020-06-14 23:49:08 -05:00
ffa04b625a Changing case for private methods 2020-06-14 23:49:08 -05:00
b9807aac56 Add Notification entity to database in one migration 2020-06-14 23:49:08 -05:00
b973c0ab82 Removing database migrations in preparation for squashing them into one 2020-06-14 23:49:08 -05:00
0d876b9322 Removing csv jquery voodoo and using checkbox viewmodel mapping 2020-06-14 23:49:08 -05:00
09a72f2cfb Cascade delete notifications for user 2020-06-14 23:49:08 -05:00
455ac8786a Explicitly define NotificationType for NewVersionNotification 2020-06-14 23:49:08 -05:00
213e68859e Renaming class file 2020-06-14 23:49:08 -05:00
2f4967a23a Limiting Notification string fields 2020-06-14 23:49:08 -05:00
0c170fc399 Caching of notifications, refactoring NotificationManager into singleton 2020-06-14 23:49:08 -05:00
d1383d78c5 Disconnecting NotificationBase from Event, introducing NotificationSender 2020-06-14 23:49:08 -05:00
8876f1f992 Making NotificationEventBase classes internal to reduce leak 2020-06-14 23:49:08 -05:00
b53cb50a91 Pkzipping Notification blobs to keep with convention 2020-06-14 23:49:08 -05:00
1f35534dfb Providing overridable NotificationType property, direct mapping 2020-06-14 23:49:08 -05:00
294dad01c3 Switching to UserManager for fetching user id 2020-06-14 23:49:08 -05:00
0ec566e6df Removing modal reference that's not needed 2020-06-14 23:49:08 -05:00
536a85eadc Moving Notifications nav item to separate partial 2020-06-14 23:49:08 -05:00
8cdc73c31f Moving layout partial to separate folder 2020-06-14 23:49:08 -05:00
afaabd06d9 Abstracting conversion to ViewModel, requiring implementation on class 2020-06-14 23:49:08 -05:00
bb6f6e7d27 Adding icon to Action link 2020-06-14 23:49:08 -05:00
73588ea22b Generalizing saving to database and registration of NotificationEventBase classes 2020-06-14 23:49:08 -05:00
b6e3ad9325 Refactoring code to extract claim parsing 2020-06-14 23:49:08 -05:00
7e9bf9598d Providing support for mass actions on notifications, delete first 2020-06-14 23:49:08 -05:00
3680e03cdb Moving to structure where click on td is counted as seen 2020-06-14 23:49:08 -05:00
0b89598f39 Marking notification read through js magic 2020-06-14 23:49:08 -05:00
bad4c9dc60 Confirming deleting of notification 2020-06-14 23:49:08 -05:00
95a751c505 Displaying last 5 notifications in Layout 2020-06-14 23:49:08 -05:00
359e761922 Mark read and unread 2020-06-14 23:49:08 -05:00
654bb0c8ca Displaying number of unread messages in _Layout.cshtml 2020-06-14 23:49:08 -05:00
3eb503b13b Tweaking notification display and allowing deletion 2020-06-14 23:49:08 -05:00
31e0bb43e8 Updating migration with our ef core voodoo magic
We're deleting partial designer classes and moving attributes to main class
2020-06-14 23:49:08 -05:00
4bc0fd98ca Saving notifications to database and loading them from there 2020-06-14 23:49:08 -05:00
9206f0cd2e Handling notifications event and rendering them through controller 2020-06-14 23:49:08 -05:00
e834cd7595 Add Notification Entity migration 2020-06-14 23:49:08 -05:00
50e1e2d982 Standardizing DbSet properties, reducing whitespace 2020-06-14 23:49:08 -05:00
6ddb20d022 Foundation for events to propagate notifications 2020-06-14 23:49:08 -05:00
0cacfa140b Renaming Notice to Notification
Longer, but what can we do...
2020-06-14 23:49:08 -05:00
1ab016d21e Foundation for notices grid 2020-06-14 23:49:08 -05:00
6ad7d18c42 Escaping at character in link 2020-06-14 23:31:54 -05:00
a46774c2ee Merge pull request #1663 from Kukks/supporters
Handle Supporters display
2020-06-15 09:15:56 +09:00
58f9b9b0c1 Handle Supporters display
closes #1624
2020-06-14 16:09:36 +02:00
0000257dcc Merge pull request #1659 from Kukks/psbt-fullprev
Add AlwaysIncludeNonWitnessUTXO to Wallet Send
2020-06-14 22:47:57 +09:00
8c3907df82 add info 2020-06-14 15:45:58 +02:00
f7c1dff576 Merge pull request #1660 from woutersamaey/icon-colors-bootstrap-friendly
Colored "check" and "times" icons green or red the bootstrap way
2020-06-14 22:12:20 +09:00
16982dc76a Merge pull request #1662 from bolatovumar/fix-1661
Update "Back to the app list" links to not open in new tab by default
2020-06-14 22:11:57 +09:00
9532db7bae Update "Back to the app list" links to not open in new tab by default
fix #1661
2020-06-13 19:18:38 -07:00
a93062e0f0 Colored "check" and "times" icons green or red the bootstrap way 2020-06-12 15:22:39 +02:00
b7c65b2ba6 Add AlwaysIncludeNonWitnessUTXO to Wallet Send 2020-06-12 13:58:55 +02:00
f40a8853f6 Require Owner role to the store for modifying store via Greenfield 2020-06-12 18:26:20 +09:00
1889c33d80 Merge pull request #1656 from dennisreimann/docs-links
Update and fix documentation links
2020-06-12 14:51:12 +09:00
308ca479df Merge pull request #1655 from pavlenex/utxo-change
Rename "Make sure no UTXO change is created" to "Don't create UTXO change"
2020-06-12 14:50:38 +09:00
0b7d5c839a Merge pull request #1630 from Kukks/public-endpoint-json
Pay endpoint: if JsonResponse is true, send error in json too
2020-06-12 14:50:17 +09:00
9e0d6618b1 Merge pull request #1629 from Kukks/ipnorder
Add order id to IPN
2020-06-12 14:49:51 +09:00
02a2bd92af Merge pull request #1658 from NicolasDorier/thub
Add thunderhub integration
2020-06-12 14:29:11 +09:00
03d90f79ea Add thunderhub integration 2020-06-12 14:28:28 +09:00
b066cfd904 Update and fix documentation links 2020-06-11 16:09:33 +02:00
475d7f01b7 fix broken link 2020-06-11 12:22:33 +02:00
b30597b8f1 Change the seed saved in NBXplorer to hot wallet (#1652)
* Change the seed saved in NBXplorer name

* the hot wallet
2020-06-11 12:19:40 +02:00
1824f03d35 Rename UTXO change 2020-06-11 12:10:51 +02:00
4cd3d167b1 Autofocus 2FA-code input on page load (#1650)
UX improvement that allows you to directly paste the 2FA-code. Useful when you are using e.g. the 1Password browser extension.
2020-06-10 19:40:06 +02:00
4640c63094 Merge pull request #1637 from jad0c/patch-1
fix broken FAQ link in readme
2020-06-10 16:49:59 +09:00
2460012caa Merge pull request #1646 from Kukks/fix/pos-format
Fix possible view exception in pos app
2020-06-10 10:27:37 +09:00
db7768ef57 Fix possible view exception in pos app
Replaced string.format with a simpler replace and also allow `{Price}` instead of `{0}` as it's obscure to non c# devs
2020-06-09 19:56:44 +02:00
74b6aa7353 Merge pull request #1623 from Kukks/telemetry
Opt out from telemetry data in docker
2020-06-09 22:07:51 +09:00
0e0297d650 Merge pull request #1643 from NicolasDorier/fix/ln
Fix lightning implementation, docs and tests
2020-06-09 21:52:45 +09:00
8dd6ecc0b8 Fix lightning implementation, docs and tests 2020-06-09 17:24:34 +09:00
e84d4d3cb5 Merge pull request #1644 from btcpayserver/feat/lnd-0.10.1-beta
Bump LND version to 0.10.1-beta
2020-06-09 16:06:37 +09:00
da54154ae7 Bump LND version 2020-06-08 23:28:45 -05:00
a9dbbe1955 Merge pull request #1640 from btcpayserver/renametoscope
Rename Permission.StoreId to Permission.Scope
2020-06-07 23:27:11 +09:00
3fbe86c286 Rename Permission.StoreId to Permission.Scope 2020-06-07 23:17:48 +09:00
0022e71dd4 Merge pull request #1628 from Kukks/greenfield/consistentreturn
GreenField: Handle status codes, error models consistently
2020-06-07 18:59:22 +09:00
c74121fefc Opt out from telemetry data in docker
https://www.michaelcrump.net/part12-aspnetcore/
https://docs.microsoft.com/en-us/dotnet/core/tools/telemetry
2020-06-07 08:32:00 +02:00
67c3581989 Add order id to IPN
fixes #1598
2020-06-07 08:31:42 +02:00
1d1c1141a3 Pay endpoint: if JsonResponse is true, send error in json too
fixes #1532
2020-06-07 08:30:54 +02:00
cf00784096 fix swagger 2020-06-07 08:30:04 +02:00
db209af787 Updating ports for merchant lnd
I saw several instances where btcpayservertests_merchant_lnd_1 failed to start in circleci
2020-06-07 01:24:47 -05:00
30bd94ee43 fix tests 2020-06-07 08:21:45 +02:00
f313a5f221 GreenField: Handle status codes, error models consistently 2020-06-07 08:21:45 +02:00
b9ef5af5d7 Fixing variable reference
Who'll save Emperor if not me
2020-06-06 23:52:21 -05:00
59677b6521 fix broken FAQ link in readme 2020-06-06 21:44:13 -04:00
56283df05a Can only sign with NBX if imported with NBX 2020-06-07 09:38:29 +09:00
ef271a088a Merge pull request #1634 from dennisreimann/minor-fixups
Minor fix ups
2020-06-06 09:48:28 +09:00
6043b7c75d Minor fix ups
Resolves https://github.com/btcpayserver/btcpayserver/pull/1633#discussion_r435655010
2020-06-05 11:38:55 +02:00
c338779f0e Merge pull request #1633 from dennisreimann/onion-location
Add Onion-Location HTTP header
2020-06-05 11:09:55 +09:00
67758609a7 Add Onion-Location HTTP header
Closes #1626.
2020-06-04 08:53:55 +02:00
1150 changed files with 73719 additions and 54119 deletions

6
.circleci/can-build.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
set -e
echo "Checking if it is possible to build Bitcoin only..."
cd ../BTCPayServer.Tests
docker-compose -f "docker-compose.yml" build

View File

@ -7,7 +7,7 @@ jobs:
- checkout
- run:
command: |
cd .circleci && ./run-tests.sh "Fast=Fast"
cd .circleci && ./run-tests.sh "Fast=Fast" && ./can-build.sh
selenium_tests:
machine:
enabled: true
@ -49,8 +49,10 @@ jobs:
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
#
sudo docker build --pull -t $DOCKERHUB_REPO:$LATEST_TAG-amd64 -f amd64.Dockerfile .
sudo docker build --pull --build-arg CONFIGURATION_NAME=Altcoins-Release -t $DOCKERHUB_REPO:$LATEST_TAG-altcoins-amd64 -f amd64.Dockerfile .
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-amd64
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-altcoins-amd64
arm32v7:
machine:
@ -63,8 +65,10 @@ jobs:
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
#
sudo docker build --pull -t $DOCKERHUB_REPO:$LATEST_TAG-arm32v7 -f arm32v7.Dockerfile .
sudo docker build --pull --build-arg CONFIGURATION_NAME=Altcoins-Release -t $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm32v7 -f arm32v7.Dockerfile .
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-arm32v7
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm32v7
arm64v8:
machine:
@ -77,8 +81,10 @@ jobs:
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
#
sudo docker build --pull -t $DOCKERHUB_REPO:$LATEST_TAG-arm64v8 -f arm64v8.Dockerfile .
sudo docker build --build-arg CONFIGURATION_NAME=Altcoins-Release --pull -t $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm64v8 -f arm64v8.Dockerfile .
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-arm64v8
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm64v8
multiarch:
machine:
@ -99,6 +105,13 @@ jobs:
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG $DOCKERHUB_REPO:$LATEST_TAG-arm32v7 --os linux --arch arm --variant v7
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG $DOCKERHUB_REPO:$LATEST_TAG-arm64v8 --os linux --arch arm64 --variant v8
sudo docker manifest push $DOCKERHUB_REPO:$LATEST_TAG -p
sudo docker manifest create --amend $DOCKERHUB_REPO:$LATEST_TAG-altcoins $DOCKERHUB_REPO:$LATEST_TAG-altcoins-amd64 $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm32v7 $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm64v8
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG-altcoins $DOCKERHUB_REPO:$LATEST_TAG-altcoins-amd64 --os linux --arch amd64
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG-altcoins $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm32v7 --os linux --arch arm --variant v7
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG-altcoins $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm64v8 --os linux --arch arm64 --variant v8
sudo docker manifest push $DOCKERHUB_REPO:$LATEST_TAG-altcoins -p
workflows:
version: 2
@ -111,7 +124,6 @@ workflows:
filters:
branches:
only: master
publish:
jobs:
- amd64:
@ -121,21 +133,22 @@ workflows:
ignore: /.*/
# only act on version tags v1.0.0.88 or v1.0.2-1
# OR feature tags like vlndseedbackup
# OR features on specific versions like v1.0.0.88-lndseedbackup-1
tags:
only: /(v[1-9]+(\.[0-9]+)*(-[0-9]+)?)|(v[a-z]+)/
only: /(v[1-9]+(\.[0-9]+)*(-[a-z0-9-]+)?)|(v[a-z0-9-]+)/
- arm32v7:
filters:
branches:
ignore: /.*/
tags:
only: /(v[1-9]+(\.[0-9]+)*(-[0-9]+)?)|(v[a-z]+)/
only: /(v[1-9]+(\.[0-9]+)*(-[a-z0-9-]+)?)|(v[a-z0-9-]+)/
- arm64v8:
filters:
branches:
ignore: /.*/
tags:
only: /(v[1-9]+(\.[0-9]+)*(-[0-9]+)?)|(v[a-z]+)/
only: /(v[1-9]+(\.[0-9]+)*(-[a-z0-9-]+)?)|(v[a-z0-9-]+)/
- multiarch:
requires:
- amd64
@ -145,4 +158,4 @@ workflows:
branches:
ignore: /.*/
tags:
only: /(v[1-9]+(\.[0-9]+)*(-[0-9]+)?)|(v[a-z]+)/
only: /(v[1-9]+(\.[0-9]+)*(-[a-z0-9-]+)?)|(v[a-z0-9-]+)/

View File

@ -3,7 +3,7 @@ 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
docker-compose -f "docker-compose.altcoins.yml" down --v
docker-compose -f "docker-compose.altcoins.yml" pull
docker-compose -f "docker-compose.altcoins.yml" build
docker-compose -f "docker-compose.altcoins.yml" run -e "TEST_FILTERS=$1" tests

View File

@ -10,8 +10,9 @@ root = true
insert_final_newline = true
indent_style = space
indent_size = 4
charset = utf-8
[project.json]
[launchSettings.json]
indent_size = 2
# C# files
@ -146,4 +147,4 @@ indent_size = 2
[*.sh]
end_of_line = lf
[*.{cmd, bat}]
end_of_line = crlf
end_of_line = crlf

63
.github/ISSUE_TEMPLATE/bug-report.md vendored Normal file
View File

@ -0,0 +1,63 @@
---
name: "\U0001F41B Bug report"
about: Report a bug or a technical issue
---
<!--
Thank you for reporting a technical issue.
This issue tracker is only for bug reports and problems.
For general questions please read our documentation docs.btcpayserver.org. You can ask technical questions in discussions https://github.com/btcpayserver/btcpayserver/discussions and general support on our community chat chat.btcpayserver.org
Please fill in as much of the template below as you're able.
-->
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce the bug**
Steps to reproduce the reported bug:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
<!--
A clear and concise description of what you expected to happen.
-->
**Screenshots**
<!--
If applicable, add screenshots to help explain your problem.
-->
**Your BTCPay Environment (please complete the following information):**
- BTCPay Server Version: <!--[available in the right bottom corner of footer] -->
- Deployment Method: <!--[e.g. Docker, Manual, Third-Party-host]-->
- Browser: <!--[e.g. Chrome, Safari]-->
**Logs (if applicable)**
<!--
Basic logs can be found in Server Settings > Logs.
More logs https://docs.btcpayserver.org/Troubleshooting/#2-looking-through-the-logs
-->
**Setup Parameters**
<!--
If you're reporting a deployment issue run `. btcpay-setup.sh -i` and paste the setup parameters here with your private information removed or obscured.
-->
**Additional context**
<!--
Add any other context about the problem here.
-->

View File

@ -1,37 +0,0 @@
---
name: Report a problem
about: File a technical problem or report a bug
---
**Describe the problem/bug**
A clear and concise description of what the bug is.
**Your environment**
* Version of BTCPay Server:
* Deployment method:
* Other relevant environment details:
**Logs (if applicable)**
Basic logs can be found in Server Settings > Logs.
**Setup Parameters**
If you're reporting a deployment issue run `. btcpay-setup.sh -i` and paste your the paremeters by obscuring private information.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Actual behavior**
Tell us what happens instead
**Screenshots/Links**
If applicable, add screenshots or links to help explain your problem.
**Additional context**
Add any other context about the problem here.

11
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: 🚀 Discussions
url: https://github.com/btcpayserver/btcpayserver/discussions
about: Technical discussions, questions and feature requests
- name: 📝 Official Documentation
url: https://docs.btcpayserver.org
about: Check our documentation for answers to common questions
- name: 💬 Community Support Chat
url: https://chat.btcpayserver.org/
about: Ask general questions and get community support in real-time

View File

@ -1,20 +0,0 @@
---
name: Feature request
about: Ideas and feature requests
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Provide examples**
If applicable provide examples, wireframes, sketches or images to better explain your idea.
**Additional context**
Add any other context or screenshots about the feature request here.

7
.gitignore vendored
View File

@ -292,5 +292,10 @@ __pycache__/
BTCPayServer/wwwroot/bundles/*
!BTCPayServer/wwwroot/bundles/.gitignore
.vscode
.vscode/*
!.vscode/launch.json
!.vscode/tasks.json
!.vscode/extensions.json
BTCPayServer/testpwd
.DS_Store
Packed Plugins

View File

@ -0,0 +1,21 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Pack Test Plugin" type="DotNetProject" factoryName=".NET Project" singleton="false">
<option name="EXE_PATH" value="$PROJECT_DIR$/BTCPayServer.PluginPacker/bin/Debug/netcoreapp3.1/BTCPayServer.PluginPacker.dll" />
<option name="PROGRAM_PARAMETERS" value="../../../../BTCPayServer.Plugins.Test\bin\Debug\netcoreapp3.1 BTCPayServer.Plugins.Test &quot;../../../../Packed Plugins&quot;" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/BTCPayServer.PluginPacker/bin/Debug/netcoreapp3.1" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="PROJECT_PATH" value="$PROJECT_DIR$/BTCPayServer.PluginPacker/BTCPayServer.PluginPacker.csproj" />
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value=".NETCoreApp,Version=v3.1" />
<method v="2">
<option name="Build" default="false" projectName="BTCPayServer.Plugins.Test" projectPath="C:\Git\btcpayserver\BTCPayServer.Plugins.Test\BTCPayServer.Plugins.Test.csproj" />
<option name="Build" />
</method>
</configuration>
</component>

3
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"recommendations": ["ms-dotnettools.csharp"]
}

33
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,33 @@
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/BTCPayServer/bin/Debug/netcoreapp3.1/BTCPayServer.dll",
"args": [],
"cwd": "${workspaceFolder}/BTCPayServer",
"stopAtEntry": false,
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bListening on\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
},
"logging": {
"moduleLoad": false
}
}
]
}

42
.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,42 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/BTCPayServer/BTCPayServer.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/BTCPayServer/BTCPayServer.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"${workspaceFolder}/BTCPayServer/BTCPayServer.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
}
]
}

View File

@ -0,0 +1,39 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../Build/Version.csproj" Condition="Exists('../Build/Version.csproj')" />
<Import Project="../Build/Common.csproj" />
<PropertyGroup>
<Company>BTCPay Server</Company>
<Copyright>Copyright © BTCPay Server 2020</Copyright>
<Description>A library for BTCPay Server plugin development</Description>
<PackageIcon>icon.png</PackageIcon>
<PackageTags>btcpay,btcpayserver</PackageTags>
<PackageProjectUrl>https://github.com/btcpayserver/btcpayserver/tree/master/BTCPayServer.Abstractions</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryUrl>https://github.com/btcpayserver/btcpayserver</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<DebugType>portable</DebugType>
<Optimize>true</Optimize>
<NoWarn>1591;1573;1572;1584;1570;3021</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup Condition=" '$(Configuration)' == 'Release' ">
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<None Include="icon.png" Pack="true" PackagePath="\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.4" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.1.4" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="3.1.1" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,12 @@
namespace BTCPayServer.Configuration
{
public class DataDirectories
{
public string DataDir { get; set; }
public string PluginDir { get; set; }
public string TempStorageDir { get; set; }
public string StorageDir { get; set; }
}
}

View File

@ -1,4 +1,4 @@
namespace BTCPayServer.Security
namespace BTCPayServer.Abstractions.Constants
{
public class AuthenticationSchemes
{

View File

@ -0,0 +1,109 @@
using System;
using BTCPayServer.Abstractions.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.Extensions.Options;
using Npgsql.EntityFrameworkCore.PostgreSQL.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Migrations.Operations;
namespace BTCPayServer.Abstractions.Contracts
{
public abstract class BaseDbContextFactory<T> where T: DbContext
{
private readonly IOptions<DatabaseOptions> _options;
private readonly string _schemaPrefix;
public BaseDbContextFactory(IOptions<DatabaseOptions> options, string schemaPrefix)
{
_options = options;
_schemaPrefix = schemaPrefix;
}
public abstract T CreateContext();
class CustomNpgsqlMigrationsSqlGenerator : NpgsqlMigrationsSqlGenerator
{
public CustomNpgsqlMigrationsSqlGenerator(MigrationsSqlGeneratorDependencies dependencies, IMigrationsAnnotationProvider annotations, Npgsql.EntityFrameworkCore.PostgreSQL.Infrastructure.Internal.INpgsqlOptions opts) : base(dependencies, annotations, opts)
{
}
protected override void Generate(NpgsqlCreateDatabaseOperation operation, IModel model, MigrationCommandListBuilder builder)
{
builder
.Append("CREATE DATABASE ")
.Append(Dependencies.SqlGenerationHelper.DelimitIdentifier(operation.Name));
// POSTGRES gotcha: Indexed Text column (even if PK) are not used if we are not using C locale
builder
.Append(" TEMPLATE ")
.Append(Dependencies.SqlGenerationHelper.DelimitIdentifier("template0"));
builder
.Append(" LC_CTYPE ")
.Append(Dependencies.SqlGenerationHelper.DelimitIdentifier("C"));
builder
.Append(" LC_COLLATE ")
.Append(Dependencies.SqlGenerationHelper.DelimitIdentifier("C"));
builder
.Append(" ENCODING ")
.Append(Dependencies.SqlGenerationHelper.DelimitIdentifier("UTF8"));
if (operation.Tablespace != null)
{
builder
.Append(" TABLESPACE ")
.Append(Dependencies.SqlGenerationHelper.DelimitIdentifier(operation.Tablespace));
}
builder.AppendLine(Dependencies.SqlGenerationHelper.StatementTerminator);
EndStatement(builder, suppressTransaction: true);
}
}
public void ConfigureBuilder(DbContextOptionsBuilder builder)
{
switch (_options.Value.DatabaseType)
{
case DatabaseType.Sqlite:
builder.UseSqlite(_options.Value.ConnectionString, o =>
{
if (!string.IsNullOrEmpty(_schemaPrefix))
{
o.MigrationsHistoryTable(_schemaPrefix);
}
});
break;
case DatabaseType.Postgres:
builder
.UseNpgsql(_options.Value.ConnectionString, o =>
{
o.EnableRetryOnFailure(10);
if (!string.IsNullOrEmpty(_schemaPrefix))
{
o.MigrationsHistoryTable(_schemaPrefix);
}
})
.ReplaceService<IMigrationsSqlGenerator, CustomNpgsqlMigrationsSqlGenerator>();
break;
case DatabaseType.MySQL:
builder.UseMySql(_options.Value.ConnectionString, o =>
{
o.EnableRetryOnFailure(10);
if (!string.IsNullOrEmpty(_schemaPrefix))
{
o.MigrationsHistoryTable(_schemaPrefix);
}
});
break;
default:
throw new ArgumentOutOfRangeException();
}
}
}
}

View File

@ -0,0 +1,32 @@
using System;
using System.Text.Json.Serialization;
using BTCPayServer.Abstractions.Converters;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
namespace BTCPayServer.Abstractions.Contracts
{
public interface IBTCPayServerPlugin
{
public string Identifier { get; }
string Name { get; }
[JsonConverter(typeof(VersionConverter))]
Version Version { get; }
string Description { get; }
bool SystemPlugin { get; set; }
PluginDependency[] Dependencies { get; }
void Execute(IApplicationBuilder applicationBuilder, IServiceProvider applicationBuilderApplicationServices);
void Execute(IServiceCollection applicationBuilder);
public class PluginDependency
{
public string Identifier { get; set; }
public string Condition { get; set; }
public override string ToString()
{
return $"{Identifier}: {Condition}";
}
}
}
}

View File

@ -0,0 +1,27 @@
using System;
namespace BTCPayServer.Abstractions.Contracts
{
public abstract class BaseNotification
{
public abstract string Identifier { get; }
public abstract string NotificationType { get; }
}
public interface INotificationHandler
{
string NotificationType { get; }
Type NotificationBlobType { get; }
public (string identifier, string name)[] Meta { get; }
void FillViewModel(object notification, NotificationViewModel vm);
}
public class NotificationViewModel
{
public string Id { get; set; }
public DateTimeOffset Created { get; set; }
public string Body { get; set; }
public string ActionLink { get; set; }
public bool Seen { get; set; }
}
}

View File

@ -0,0 +1,10 @@
using System.Threading.Tasks;
namespace BTCPayServer.Abstractions.Contracts
{
public interface IPluginHookAction
{
public string Hook { get; }
Task Execute(object args);
}
}

View File

@ -0,0 +1,11 @@
using System.Threading.Tasks;
namespace BTCPayServer.Abstractions.Contracts
{
public interface IPluginHookFilter
{
public string Hook { get; }
Task<object> Execute(object args);
}
}

View File

@ -0,0 +1,10 @@
using System.Threading.Tasks;
namespace BTCPayServer.Abstractions.Contracts
{
public interface IPluginHookService
{
Task ApplyAction(string hook, object args);
Task<object> ApplyFilter(string hook, object args);
}
}

View File

@ -0,0 +1,13 @@
#nullable enable
using System.Threading;
using System.Threading.Tasks;
namespace BTCPayServer.Abstractions.Contracts
{
public interface ISettingsRepository
{
Task<T?> GetSettingAsync<T>(string? name = null) where T : class;
Task UpdateSetting<T>(T obj, string? name = null) where T : class;
Task<T> WaitSettingsChanged<T>(CancellationToken cancellationToken = default) where T : class;
}
}

View File

@ -1,10 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace BTCPayServer
namespace BTCPayServer.Abstractions.Contracts
{
public interface IStartupTask
{

View File

@ -0,0 +1,9 @@
namespace BTCPayServer.Abstractions.Contracts
{
public interface ISyncSummaryProvider
{
bool AllAvailable();
string Partial { get; }
}
}

View File

@ -0,0 +1,9 @@
namespace BTCPayServer.Abstractions.Contracts
{
public interface IUIExtension
{
string Partial { get; }
string Location { get; }
}
}

View File

@ -0,0 +1,19 @@
using System;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace BTCPayServer.Abstractions.Converters
{
public class VersionConverter : JsonConverter<Version>
{
public override Version Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return Version.Parse(reader.GetString());
}
public override void Write(Utf8JsonWriter writer, Version value, JsonSerializerOptions options)
{
writer.WriteStringValue(value.ToString());
}
}
}

View File

@ -0,0 +1,20 @@
using System.Text.Json;
using BTCPayServer.Abstractions.Models;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
namespace BTCPayServer.Abstractions.Extensions
{
public static class SetStatusMessageModelExtensions
{
public static void SetStatusMessageModel(this ITempDataDictionary tempData, StatusMessageModel statusMessage)
{
if (statusMessage == null)
{
tempData.Remove("StatusMessageModel");
return;
}
tempData["StatusMessageModel"] = JsonSerializer.Serialize(statusMessage, new JsonSerializerOptions());
}
}
}

View File

@ -0,0 +1,12 @@
using BTCPayServer.Abstractions.Contracts;
using Microsoft.Extensions.DependencyInjection;
namespace BTCPayServer.Abstractions.Extensions
{
public static class ServiceCollectionExtensions
{
public static IServiceCollection AddStartupTask<T>(this IServiceCollection services)
where T : class, IStartupTask
=> services.AddTransient<IStartupTask, T>();
}
}

View File

@ -0,0 +1,35 @@
using System;
using System.Reflection;
using BTCPayServer.Abstractions.Contracts;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
namespace BTCPayServer.Abstractions.Models
{
public abstract class BaseBTCPayServerPlugin : IBTCPayServerPlugin
{
public abstract string Identifier { get; }
public abstract string Name { get; }
public virtual Version Version
{
get
{
return Assembly.GetAssembly(GetType())?.GetName().Version ?? new Version(1, 0, 0, 0);
}
}
public abstract string Description { get; }
public bool SystemPlugin { get; set; }
public virtual IBTCPayServerPlugin.PluginDependency[] Dependencies { get; } = Array.Empty<IBTCPayServerPlugin.PluginDependency>();
public virtual void Execute(IApplicationBuilder applicationBuilder,
IServiceProvider applicationBuilderApplicationServices)
{
}
public virtual void Execute(IServiceCollection applicationBuilder)
{
}
}
}

View File

@ -0,0 +1,8 @@
namespace BTCPayServer.Abstractions.Models
{
public class DatabaseOptions
{
public DatabaseType DatabaseType { get; set; }
public string ConnectionString { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace BTCPayServer.Abstractions.Models
{
public enum DatabaseType
{
Sqlite,
Postgres,
MySQL,
}
}

View File

@ -1,15 +1,12 @@
using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Models
namespace BTCPayServer.Abstractions.Models
{
public class StatusMessageModel
{
public StatusMessageModel()
{
}
public string Message { get; set; }
public string Html { get; set; }
public StatusSeverity Severity { get; set; }

View File

@ -0,0 +1,7 @@
rm "bin\release\" -Recurse -Force
dotnet pack --configuration Release --include-symbols -p:SymbolPackageFormat=snupkg
$package=(ls .\bin\Release\*.nupkg).FullName
dotnet nuget push $package --source "https://api.nuget.org/v3/index.json"
$ver = ((ls .\bin\release\*.nupkg)[0].Name -replace '.*(\d+\.\d+\.\d+)\.nupkg','$1')
git tag -a "BTCPayServer.Abstractions/v$ver" -m "BTCPayServer.Abstractions/$ver"
git push origin "BTCPayServer.Abstractions/v$ver"

View File

@ -0,0 +1,16 @@
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Contracts;
namespace BTCPayServer.Abstractions.Services
{
public abstract class PluginAction<T>:IPluginHookAction
{
public abstract string Hook { get; }
public Task Execute(object args)
{
return Execute(args is T args1 ? args1 : default);
}
public abstract Task Execute(T arg);
}
}

View File

@ -0,0 +1,17 @@
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Contracts;
namespace BTCPayServer.Abstractions.Services
{
public abstract class PluginHookFilter<T>:IPluginHookFilter
{
public abstract string Hook { get; }
public Task<object> Execute(object args)
{
return Execute(args is T args1 ? args1 : default).ContinueWith(task => task.Result as object);
}
public abstract Task<T> Execute(T arg);
}
}

View File

@ -0,0 +1,16 @@
using BTCPayServer.Abstractions.Contracts;
namespace BTCPayServer.Abstractions.Services
{
public class UIExtension: IUIExtension
{
public UIExtension(string partial, string location)
{
Partial = partial;
Location = location;
}
public string Partial { get; }
public string Location { get; }
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -1,13 +1,37 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Company>BTCPay Server</Company>
<Copyright>Copyright © BTCPay Server 2020</Copyright>
<Description>A client library for BTCPay Server Greenfield API</Description>
<PackageIcon>icon.png</PackageIcon>
<PackageTags>btcpay,btcpayserver</PackageTags>
<PackageProjectUrl>https://github.com/btcpayserver/btcpayserver/tree/master/BTCPayServer.Client</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryUrl>https://github.com/btcpayserver/btcpayserver</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>
<PropertyGroup>
<Version Condition=" '$(Version)' == '' ">1.3.0</Version>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<DebugType>portable</DebugType>
<Optimize>true</Optimize>
<NoWarn>1591;1573;1572;1584;1570;3021</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup Condition=" '$(Configuration)' == 'Release' ">
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NBitcoin" Version="5.0.39" />
<PackageReference Include="BTCPayServer.Lightning.Common" Version="1.1.0.22" />
<PackageReference Include="NBitcoin" Version="5.0.73" />
<PackageReference Include="BTCPayServer.Lightning.Common" Version="1.2.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>
<ItemGroup>
<None Include="icon.png" Pack="true" PackagePath="\" />
</ItemGroup>
</Project>

View File

@ -25,7 +25,7 @@ namespace BTCPayServer.Client
public virtual async Task RevokeCurrentAPIKeyInfo(CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest("api/v1/api-keys/current", null, HttpMethod.Delete), token);
HandleResponse(response);
await HandleResponse(response);
}
public virtual async Task RevokeAPIKey(string apikey, CancellationToken token = default)
@ -33,7 +33,7 @@ namespace BTCPayServer.Client
if (apikey == null)
throw new ArgumentNullException(nameof(apikey));
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/api-keys/{apikey}", null, HttpMethod.Delete), token);
HandleResponse(response);
await HandleResponse(response);
}
}
}

View File

@ -1,13 +1,14 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace BTCPayServer.Client
{
public partial class BTCPayServerClient
{
public static Uri GenerateAuthorizeUri(Uri btcpayHost, string[] permissions, bool strict = true,
bool selectiveStores = false)
bool selectiveStores = false, (string ApplicationIdentifier, Uri Redirect) applicationDetails = default)
{
var result = new UriBuilder(btcpayHost);
result.Path = "api-keys/authorize";
@ -18,6 +19,15 @@ namespace BTCPayServer.Client
{"strict", strict}, {"selectiveStores", selectiveStores}, {"permissions", permissions}
});
if (applicationDetails.Redirect != null)
{
AppendPayloadToQuery(result, new KeyValuePair<string, object>("redirect", applicationDetails.Redirect));
if (!string.IsNullOrEmpty(applicationDetails.ApplicationIdentifier))
{
AppendPayloadToQuery(result, new KeyValuePair<string, object>("applicationIdentifier", applicationDetails.ApplicationIdentifier));
}
}
return result.Uri;
}
}

View File

@ -1,4 +1,3 @@
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;

View File

@ -0,0 +1,97 @@
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;
namespace BTCPayServer.Client
{
public partial class BTCPayServerClient
{
public virtual async Task<IEnumerable<InvoiceData>> GetInvoices(string storeId, bool includeArchived = false,
CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/invoices",
new Dictionary<string, object>() {{nameof(includeArchived), includeArchived}}), token);
return await HandleResponse<IEnumerable<InvoiceData>>(response);
}
public virtual async Task<InvoiceData> GetInvoice(string storeId, string invoiceId,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/invoices/{invoiceId}"), token);
return await HandleResponse<InvoiceData>(response);
}
public virtual async Task<InvoicePaymentMethodDataModel[]> GetInvoicePaymentMethods(string storeId, string invoiceId,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/invoices/{invoiceId}/payment-methods"), token);
return await HandleResponse<InvoicePaymentMethodDataModel[]>(response);
}
public virtual async Task ArchiveInvoice(string storeId, string invoiceId,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/invoices/{invoiceId}",
method: HttpMethod.Delete), token);
await HandleResponse(response);
}
public virtual async Task<InvoiceData> CreateInvoice(string storeId,
CreateInvoiceRequest request, CancellationToken token = default)
{
if (request == null)
throw new ArgumentNullException(nameof(request));
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/invoices", bodyPayload: request,
method: HttpMethod.Post), token);
return await HandleResponse<InvoiceData>(response);
}
public virtual async Task<InvoiceData> UpdateInvoice(string storeId, string invoiceId,
UpdateInvoiceRequest request, CancellationToken token = default)
{
if (request == null)
throw new ArgumentNullException(nameof(request));
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/invoices/{invoiceId}", bodyPayload: request,
method: HttpMethod.Put), token);
return await HandleResponse<InvoiceData>(response);
}
public virtual async Task<InvoiceData> MarkInvoiceStatus(string storeId, string invoiceId,
MarkInvoiceStatusRequest request, CancellationToken token = default)
{
if (request == null)
throw new ArgumentNullException(nameof(request));
if (request.Status!= InvoiceStatus.Settled && request.Status!= InvoiceStatus.Invalid)
throw new ArgumentOutOfRangeException(nameof(request.Status), "Status can only be Invalid or Complete");
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/invoices/{invoiceId}/status", bodyPayload: request,
method: HttpMethod.Post), token);
return await HandleResponse<InvoiceData>(response);
}
public virtual async Task<InvoiceData> UnarchiveInvoice(string storeId, string invoiceId, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/invoices/{invoiceId}/unarchive",
method: HttpMethod.Post), token);
return await HandleResponse<InvoiceData>(response);
}
public virtual async Task ActivateInvoicePaymentMethod(string storeId, string invoiceId, string paymentMethod, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/invoices/{invoiceId}/payment-methods/{paymentMethod}/activate",
method: HttpMethod.Post), token);
await HandleResponse(response);
}
}
}

View File

@ -26,7 +26,7 @@ namespace BTCPayServer.Client
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/server/lightning/{cryptoCode}/connect", bodyPayload: request,
method: HttpMethod.Post), token);
HandleResponse(response);
await HandleResponse(response);
}
public async Task<IEnumerable<LightningChannelData>> GetLightningNodeChannels(string cryptoCode,
@ -61,9 +61,9 @@ namespace BTCPayServer.Client
if (request == null)
throw new ArgumentNullException(nameof(request));
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/server/lightning/{cryptoCode}/pay", bodyPayload: request,
CreateHttpRequest($"api/v1/server/lightning/{cryptoCode}/invoices/pay", bodyPayload: request,
method: HttpMethod.Post), token);
HandleResponse(response);
await HandleResponse(response);
}
public async Task<LightningInvoiceData> GetLightningInvoice(string cryptoCode,

View File

@ -26,7 +26,7 @@ namespace BTCPayServer.Client
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/lightning/{cryptoCode}/connect", bodyPayload: request,
method: HttpMethod.Post), token);
HandleResponse(response);
await HandleResponse(response);
}
public async Task<IEnumerable<LightningChannelData>> GetLightningNodeChannels(string storeId, string cryptoCode,
@ -62,9 +62,9 @@ namespace BTCPayServer.Client
if (request == null)
throw new ArgumentNullException(nameof(request));
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/lightning/{cryptoCode}/pay", bodyPayload: request,
CreateHttpRequest($"api/v1/stores/{storeId}/lightning/{cryptoCode}/invoices/pay", bodyPayload: request,
method: HttpMethod.Post), token);
HandleResponse(response);
await HandleResponse(response);
}
public async Task<LightningInvoiceData> GetLightningInvoice(string storeId, string cryptoCode,

View File

@ -0,0 +1,63 @@
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;
namespace BTCPayServer.Client
{
public partial class BTCPayServerClient
{
public virtual async Task<IEnumerable<LightningNetworkPaymentMethodData>>
GetStoreLightningNetworkPaymentMethods(string storeId,
CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/LightningNetwork"), token);
return await HandleResponse<IEnumerable<LightningNetworkPaymentMethodData>>(response);
}
public virtual async Task<LightningNetworkPaymentMethodData> GetStoreLightningNetworkPaymentMethod(
string storeId,
string cryptoCode, CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/LightningNetwork/{cryptoCode}"), token);
return await HandleResponse<LightningNetworkPaymentMethodData>(response);
}
public virtual async Task RemoveStoreLightningNetworkPaymentMethod(string storeId,
string cryptoCode, CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/LightningNetwork/{cryptoCode}",
method: HttpMethod.Delete), token);
await HandleResponse(response);
}
public virtual async Task<LightningNetworkPaymentMethodData> UpdateStoreLightningNetworkPaymentMethod(
string storeId,
string cryptoCode, LightningNetworkPaymentMethodData paymentMethod,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/LightningNetwork/{cryptoCode}",
bodyPayload: paymentMethod, method: HttpMethod.Put), token);
return await HandleResponse<LightningNetworkPaymentMethodData>(response);
}
public virtual async Task<LightningNetworkPaymentMethodData>
UpdateStoreLightningNetworkPaymentMethodToInternalNode(string storeId,
string cryptoCode, LightningNetworkPaymentMethodData paymentMethod,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/LightningNetwork/{cryptoCode}/internal",
method: HttpMethod.Put), token);
return await HandleResponse<LightningNetworkPaymentMethodData>(response);
}
}
}

View File

@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;
namespace BTCPayServer.Client
{
public partial class BTCPayServerClient
{
public virtual async Task<IEnumerable<NotificationData>> GetNotifications(bool? seen = null,
CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/users/me/notifications",
seen != null ? new Dictionary<string, object>() {{nameof(seen), seen}} : null), token);
return await HandleResponse<IEnumerable<NotificationData>>(response);
}
public virtual async Task<NotificationData> GetNotification(string notificationId,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/users/me/notifications/{notificationId}"), token);
return await HandleResponse<NotificationData>(response);
}
public virtual async Task<NotificationData> UpdateNotification(string notificationId, bool? seen,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/users/me/notifications/{notificationId}",
method: HttpMethod.Put, bodyPayload: new UpdateNotification() {Seen = seen}), token);
return await HandleResponse<NotificationData>(response);
}
public virtual async Task RemoveNotification(string notificationId, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/users/me/notifications/{notificationId}",
method: HttpMethod.Delete), token);
await HandleResponse(response);
}
}
}

View File

@ -0,0 +1,74 @@
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;
namespace BTCPayServer.Client
{
public partial class BTCPayServerClient
{
public virtual async Task<IEnumerable<OnChainPaymentMethodData>> GetStoreOnChainPaymentMethods(string storeId,
CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain"), token);
return await HandleResponse<IEnumerable<OnChainPaymentMethodData>>(response);
}
public virtual async Task<OnChainPaymentMethodData> GetStoreOnChainPaymentMethod(string storeId,
string cryptoCode, CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}"), token);
return await HandleResponse<OnChainPaymentMethodData>(response);
}
public virtual async Task RemoveStoreOnChainPaymentMethod(string storeId,
string cryptoCode, CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}",
method: HttpMethod.Delete), token);
await HandleResponse(response);
}
public virtual async Task<OnChainPaymentMethodData> UpdateStoreOnChainPaymentMethod(string storeId,
string cryptoCode, OnChainPaymentMethodData paymentMethod,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}",
bodyPayload: paymentMethod, method: HttpMethod.Put), token);
return await HandleResponse<OnChainPaymentMethodData>(response);
}
public virtual async Task<OnChainPaymentMethodPreviewResultData>
PreviewProposedStoreOnChainPaymentMethodAddresses(
string storeId, string cryptoCode, OnChainPaymentMethodData paymentMethod, int offset = 0,
int amount = 10,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}/preview",
bodyPayload: paymentMethod,
queryPayload: new Dictionary<string, object>() {{"offset", offset}, {"amount", amount}},
method: HttpMethod.Post), token);
return await HandleResponse<OnChainPaymentMethodPreviewResultData>(response);
}
public virtual async Task<OnChainPaymentMethodPreviewResultData> PreviewStoreOnChainPaymentMethodAddresses(
string storeId, string cryptoCode, int offset = 0, int amount = 10,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}/preview",
queryPayload: new Dictionary<string, object>() {{"offset", offset}, {"amount", amount}},
method: HttpMethod.Get), token);
return await HandleResponse<OnChainPaymentMethodPreviewResultData>(response);
}
}
}

View File

@ -0,0 +1,122 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;
using NBitcoin;
namespace BTCPayServer.Client
{
public partial class BTCPayServerClient
{
public virtual async Task<OnChainWalletOverviewData> ShowOnChainWalletOverview(string storeId, string cryptoCode,
CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}/wallet"), token);
return await HandleResponse<OnChainWalletOverviewData>(response);
}
public virtual async Task<OnChainWalletFeeRateData> GetOnChainFeeRate(string storeId, string cryptoCode, int? blockTarget = null,
CancellationToken token = default)
{
Dictionary<string, object> queryParams = new Dictionary<string, object>();
if (blockTarget != null)
{
queryParams.Add("blockTarget",blockTarget);
}
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}/wallet/feeRate", queryParams), token);
return await HandleResponse<OnChainWalletFeeRateData>(response);
}
public virtual async Task<OnChainWalletAddressData> GetOnChainWalletReceiveAddress(string storeId, string cryptoCode, bool forceGenerate = false,
CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}/wallet/address", new Dictionary<string, object>()
{
{"forceGenerate", forceGenerate}
}), token);
return await HandleResponse<OnChainWalletAddressData>(response);
}
public virtual async Task UnReserveOnChainWalletReceiveAddress(string storeId, string cryptoCode,
CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}/wallet/address",method:HttpMethod.Delete), token);
await HandleResponse(response);
}
public virtual async Task<IEnumerable<OnChainWalletTransactionData>> ShowOnChainWalletTransactions(
string storeId, string cryptoCode, TransactionStatus[] statusFilter = null,
CancellationToken token = default)
{
var query = new Dictionary<string, object>();
if (statusFilter?.Any() is true)
{
query.Add(nameof(statusFilter), statusFilter);
}
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}/wallet/transactions", query), token);
return await HandleResponse<IEnumerable<OnChainWalletTransactionData>>(response);
}
public virtual async Task<OnChainWalletTransactionData> GetOnChainWalletTransaction(
string storeId, string cryptoCode, string transactionId,
CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}/wallet/transactions/{transactionId}"), token);
return await HandleResponse<OnChainWalletTransactionData>(response);
}
public virtual async Task<IEnumerable<OnChainWalletUTXOData>> GetOnChainWalletUTXOs(string storeId,
string cryptoCode,
CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}/wallet/utxos"), token);
return await HandleResponse<IEnumerable<OnChainWalletUTXOData>>(response);
}
public virtual async Task<OnChainWalletTransactionData> CreateOnChainTransaction(string storeId,
string cryptoCode, CreateOnChainTransactionRequest request,
CancellationToken token = default)
{
if (!request.ProceedWithBroadcast)
{
throw new ArgumentOutOfRangeException(nameof(request.ProceedWithBroadcast),
"Please use CreateOnChainTransactionButDoNotBroadcast when wanting to only create the transaction");
}
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}/wallet/transactions", null, request, HttpMethod.Post), token);
return await HandleResponse<OnChainWalletTransactionData>(response);
}
public virtual async Task<Transaction> CreateOnChainTransactionButDoNotBroadcast(string storeId,
string cryptoCode, CreateOnChainTransactionRequest request, Network network,
CancellationToken token = default)
{
if (request.ProceedWithBroadcast)
{
throw new ArgumentOutOfRangeException(nameof(request.ProceedWithBroadcast),
"Please use CreateOnChainTransaction when wanting to also broadcast the transaction");
}
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}/wallet/transactions", null, request, HttpMethod.Post), token);
return Transaction.Parse(await HandleResponse<string>(response), network);
}
}
}

View File

@ -10,10 +10,13 @@ namespace BTCPayServer.Client
public partial class BTCPayServerClient
{
public virtual async Task<IEnumerable<PaymentRequestData>> GetPaymentRequests(string storeId,
bool includeArchived = false,
CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/payment-requests"), token);
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-requests",
new Dictionary<string, object>() {{nameof(includeArchived), includeArchived}}), token);
return await HandleResponse<IEnumerable<PaymentRequestData>>(response);
}
@ -31,7 +34,7 @@ namespace BTCPayServer.Client
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-requests/{paymentRequestId}",
method: HttpMethod.Delete), token);
HandleResponse(response);
await HandleResponse(response);
}
public virtual async Task<PaymentRequestData> CreatePaymentRequest(string storeId,

View File

@ -0,0 +1,61 @@
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using BTCPayServer.Client.Models;
namespace BTCPayServer.Client
{
public partial class BTCPayServerClient
{
public async Task<PullPaymentData> CreatePullPayment(string storeId, CreatePullPaymentRequest request, CancellationToken cancellationToken = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{HttpUtility.UrlEncode(storeId)}/pull-payments", bodyPayload: request, method: HttpMethod.Post), cancellationToken);
return await HandleResponse<PullPaymentData>(response);
}
public async Task<PullPaymentData> GetPullPayment(string pullPaymentId, CancellationToken cancellationToken = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/pull-payments/{HttpUtility.UrlEncode(pullPaymentId)}", method: HttpMethod.Get), cancellationToken);
return await HandleResponse<PullPaymentData>(response);
}
public async Task<PullPaymentData[]> GetPullPayments(string storeId, bool includeArchived = false, CancellationToken cancellationToken = default)
{
Dictionary<string, object> query = new Dictionary<string, object>();
query.Add("includeArchived", includeArchived);
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{HttpUtility.UrlEncode(storeId)}/pull-payments", queryPayload: query, method: HttpMethod.Get), cancellationToken);
return await HandleResponse<PullPaymentData[]>(response);
}
public async Task ArchivePullPayment(string storeId, string pullPaymentId, CancellationToken cancellationToken = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{HttpUtility.UrlEncode(storeId)}/pull-payments/{HttpUtility.UrlEncode(pullPaymentId)}", method: HttpMethod.Delete), cancellationToken);
await HandleResponse(response);
}
public async Task<PayoutData[]> GetPayouts(string pullPaymentId, bool includeCancelled = false, CancellationToken cancellationToken = default)
{
Dictionary<string, object> query = new Dictionary<string, object>();
query.Add("includeCancelled", includeCancelled);
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/pull-payments/{HttpUtility.UrlEncode(pullPaymentId)}/payouts", queryPayload: query, method: HttpMethod.Get), cancellationToken);
return await HandleResponse<PayoutData[]>(response);
}
public async Task<PayoutData> CreatePayout(string pullPaymentId, CreatePayoutRequest payoutRequest, CancellationToken cancellationToken = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/pull-payments/{HttpUtility.UrlEncode(pullPaymentId)}/payouts", bodyPayload: payoutRequest, method: HttpMethod.Post), cancellationToken);
return await HandleResponse<PayoutData>(response);
}
public async Task CancelPayout(string storeId, string payoutId, CancellationToken cancellationToken = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{HttpUtility.UrlEncode(storeId)}/payouts/{HttpUtility.UrlEncode(payoutId)}", method: HttpMethod.Delete), cancellationToken);
await HandleResponse(response);
}
public async Task<PayoutData> ApprovePayout(string storeId, string payoutId, ApprovePayoutRequest request, CancellationToken cancellationToken = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{HttpUtility.UrlEncode(storeId)}/payouts/{HttpUtility.UrlEncode(payoutId)}", bodyPayload: request, method: HttpMethod.Post), cancellationToken);
return await HandleResponse<PayoutData>(response);
}
}
}

View File

@ -1,4 +1,3 @@
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;

View File

@ -21,14 +21,14 @@ namespace BTCPayServer.Client
CreateHttpRequest($"api/v1/stores/{storeId}"), token);
return await HandleResponse<StoreData>(response);
}
public virtual async Task RemoveStore(string storeId, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}", method: HttpMethod.Delete), token);
HandleResponse(response);
await HandleResponse(response);
}
public virtual async Task<StoreData> CreateStore(CreateStoreRequest request, CancellationToken token = default)
{
if (request == null)
@ -36,7 +36,7 @@ namespace BTCPayServer.Client
var response = await _httpClient.SendAsync(CreateHttpRequest("api/v1/stores", bodyPayload: request, method: HttpMethod.Post), token);
return await HandleResponse<StoreData>(response);
}
public virtual async Task<StoreData> UpdateStore(string storeId, UpdateStoreRequest request, CancellationToken token = default)
{
if (request == null)

View File

@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Client
{
public partial class BTCPayServerClient
{
public async Task<StoreWebhookData> CreateWebhook(string storeId, Client.Models.CreateStoreWebhookRequest create, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks", bodyPayload: create, method: HttpMethod.Post), token);
return await HandleResponse<StoreWebhookData>(response);
}
public async Task<StoreWebhookData> GetWebhook(string storeId, string webhookId, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks/{webhookId}"), token);
if (response.StatusCode == System.Net.HttpStatusCode.NotFound)
return null;
return await HandleResponse<StoreWebhookData>(response);
}
public async Task<StoreWebhookData> UpdateWebhook(string storeId, string webhookId, Models.UpdateStoreWebhookRequest update, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks/{webhookId}", bodyPayload: update, method: HttpMethod.Put), token);
return await HandleResponse<StoreWebhookData>(response);
}
public async Task<bool> DeleteWebhook(string storeId, string webhookId, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks/{webhookId}", method: HttpMethod.Delete), token);
return response.IsSuccessStatusCode;
}
public async Task<StoreWebhookData[]> GetWebhooks(string storeId, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks"), token);
return await HandleResponse<StoreWebhookData[]>(response);
}
public async Task<WebhookDeliveryData[]> GetWebhookDeliveries(string storeId, string webhookId, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries"), token);
return await HandleResponse<WebhookDeliveryData[]>(response);
}
public async Task<WebhookDeliveryData> GetWebhookDelivery(string storeId, string webhookId, string deliveryId, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries/{deliveryId}"), token);
return await HandleResponse<WebhookDeliveryData>(response);
}
public async Task<string> RedeliverWebhook(string storeId, string webhookId, string deliveryId, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries/{deliveryId}/redeliver", null, HttpMethod.Post), token);
return await HandleResponse<string>(response);
}
public async Task<WebhookEvent> GetWebhookDeliveryRequest(string storeId, string webhookId, string deliveryId, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries/{deliveryId}/request"), token);
if (response.StatusCode == System.Net.HttpStatusCode.NotFound)
return null;
return await HandleResponse<WebhookEvent>(response);
}
}
}

View File

@ -18,6 +18,8 @@ namespace BTCPayServer.Client
private readonly string _password;
private readonly HttpClient _httpClient;
public Uri Host => _btcpayHost;
public string APIKey => _apiKey;
public BTCPayServerClient(Uri btcpayHost, HttpClient httpClient = null)
@ -33,7 +35,7 @@ namespace BTCPayServer.Client
_btcpayHost = btcpayHost;
_httpClient = httpClient ?? new HttpClient();
}
public BTCPayServerClient(Uri btcpayHost, string username, string password, HttpClient httpClient = null)
{
_apiKey = APIKey;
@ -43,22 +45,35 @@ namespace BTCPayServer.Client
_httpClient = httpClient ?? new HttpClient();
}
protected void HandleResponse(HttpResponseMessage message)
protected async Task HandleResponse(HttpResponseMessage message)
{
if (message.StatusCode == System.Net.HttpStatusCode.UnprocessableEntity)
{
var err = JsonConvert.DeserializeObject<Models.GreenfieldValidationError[]>(await message.Content.ReadAsStringAsync());
;
throw new GreenFieldValidationException(err);
}
else if (message.StatusCode == System.Net.HttpStatusCode.BadRequest)
{
var err = JsonConvert.DeserializeObject<Models.GreenfieldAPIError>(await message.Content.ReadAsStringAsync());
throw new GreenFieldAPIException(err);
}
message.EnsureSuccessStatusCode();
}
protected async Task<T> HandleResponse<T>(HttpResponseMessage message)
{
HandleResponse(message);
return JsonConvert.DeserializeObject<T>(await message.Content.ReadAsStringAsync());
await HandleResponse(message);
var str = await message.Content.ReadAsStringAsync();
return JsonConvert.DeserializeObject<T>(str);
}
protected virtual HttpRequestMessage CreateHttpRequest(string path,
Dictionary<string, object> queryPayload = null,
HttpMethod method = null)
{
UriBuilder uriBuilder = new UriBuilder(_btcpayHost) {Path = path};
UriBuilder uriBuilder = new UriBuilder(_btcpayHost) { Path = path };
if (queryPayload != null && queryPayload.Any())
{
AppendPayloadToQuery(uriBuilder, queryPayload);
@ -89,29 +104,37 @@ namespace BTCPayServer.Client
return request;
}
private static void AppendPayloadToQuery(UriBuilder uri, Dictionary<string, object> payload)
public static void AppendPayloadToQuery(UriBuilder uri, KeyValuePair<string, object> keyValuePair)
{
if (uri.Query.Length > 1)
uri.Query += "&";
UriBuilder uriBuilder = uri;
if (!(keyValuePair.Value is string) &&
keyValuePair.Value.GetType().GetInterfaces().Contains((typeof(IEnumerable))))
{
foreach (var item in (IEnumerable)keyValuePair.Value)
{
uriBuilder.Query = uriBuilder.Query + Uri.EscapeDataString(keyValuePair.Key) + "=" +
Uri.EscapeDataString(item.ToString()) + "&";
}
}
else
{
uriBuilder.Query = uriBuilder.Query + Uri.EscapeDataString(keyValuePair.Key) + "=" +
Uri.EscapeDataString(keyValuePair.Value.ToString()) + "&";
}
uri.Query = uri.Query.Trim('&');
}
public static void AppendPayloadToQuery(UriBuilder uri, Dictionary<string, object> payload)
{
if (uri.Query.Length > 1)
uri.Query += "&";
foreach (KeyValuePair<string, object> keyValuePair in payload)
{
UriBuilder uriBuilder = uri;
if (!(keyValuePair.Value is string) && keyValuePair.Value.GetType().GetInterfaces().Contains((typeof(IEnumerable))))
{
foreach (var item in (IEnumerable)keyValuePair.Value)
{
uriBuilder.Query = uriBuilder.Query + Uri.EscapeDataString(keyValuePair.Key) + "=" +
Uri.EscapeDataString(item.ToString()) + "&";
}
}
else
{
uriBuilder.Query = uriBuilder.Query + Uri.EscapeDataString(keyValuePair.Key) + "=" +
Uri.EscapeDataString(keyValuePair.Value.ToString()) + "&";
}
AppendPayloadToQuery(uri, keyValuePair);
}
uri.Query = uri.Query.Trim('&');
}
}
}

View File

@ -0,0 +1,15 @@
using System;
namespace BTCPayServer.Client
{
public class GreenFieldAPIException : Exception
{
public GreenFieldAPIException(Models.GreenfieldAPIError error) : base(error.Message)
{
if (error == null)
throw new ArgumentNullException(nameof(error));
APIError = error;
}
public Models.GreenfieldAPIError APIError { get; }
}
}

View File

@ -0,0 +1,28 @@
using System;
using System.Text;
using BTCPayServer.Client.Models;
namespace BTCPayServer.Client
{
public class GreenFieldValidationException : Exception
{
public GreenFieldValidationException(Models.GreenfieldValidationError[] errors) : base(BuildMessage(errors))
{
ValidationErrors = errors;
}
private static string BuildMessage(GreenfieldValidationError[] errors)
{
if (errors == null)
throw new ArgumentNullException(nameof(errors));
StringBuilder builder = new StringBuilder();
foreach (var error in errors)
{
builder.AppendLine($"{error.Path}: {error.Message}");
}
return builder.ToString();
}
public Models.GreenfieldValidationError[] ValidationErrors { get; }
}
}

View File

@ -1,39 +0,0 @@
using System;
using System.Globalization;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.JsonConverters
{
public class DecimalStringJsonConverter : JsonConverter
{
public override bool CanConvert(Type objectType)
{
return (objectType == typeof(decimal) || objectType == typeof(decimal?));
}
public override object ReadJson(JsonReader reader, Type objectType, object existingValue,
JsonSerializer serializer)
{
JToken token = JToken.Load(reader);
switch (token.Type)
{
case JTokenType.Float:
case JTokenType.Integer:
case JTokenType.String:
return decimal.Parse(token.ToString(), CultureInfo.InvariantCulture);
case JTokenType.Null when objectType == typeof(decimal?):
return null;
default:
throw new JsonSerializationException("Unexpected token type: " +
token.Type);
}
}
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
if (value != null)
writer.WriteValue(((decimal)value).ToString(CultureInfo.InvariantCulture));
}
}
}

View File

@ -11,7 +11,7 @@ namespace BTCPayServer.Client.JsonConverters
{
if (reader.TokenType == JsonToken.String)
{
return new Money( long.Parse((string) reader.Value));
return new Money(long.Parse((string)reader.Value));
}
return base.ReadJson(reader, objectType, existingValue, serializer);
}

View File

@ -0,0 +1,26 @@
using System;
using System.Diagnostics.CodeAnalysis;
using BTCPayServer.Lightning;
using NBitcoin.JsonConverters;
using Newtonsoft.Json;
namespace BTCPayServer.Client.JsonConverters
{
public class NodeUriJsonConverter : JsonConverter<NodeInfo>
{
public override NodeInfo ReadJson(JsonReader reader, Type objectType, [AllowNull] NodeInfo existingValue, bool hasExistingValue, JsonSerializer serializer)
{
if (reader.TokenType != JsonToken.String)
throw new JsonObjectException(reader.Path, "Unexpected token type for NodeUri");
if (NodeInfo.TryParse((string)reader.Value, out var info))
return info;
throw new JsonObjectException(reader.Path, "Invalid NodeUri");
}
public override void WriteJson(JsonWriter writer, [AllowNull] NodeInfo value, JsonSerializer serializer)
{
if (value is NodeInfo)
writer.WriteValue(value.ToString());
}
}
}

View File

@ -0,0 +1,56 @@
using System;
using System.Globalization;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.JsonConverters
{
public class NumericStringJsonConverter : JsonConverter
{
public override bool CanConvert(Type objectType)
{
return (objectType == typeof(decimal) ||
objectType == typeof(decimal?) ||
objectType == typeof(double) ||
objectType == typeof(double?));
}
public override object ReadJson(JsonReader reader, Type objectType, object existingValue,
JsonSerializer serializer)
{
JToken token = JToken.Load(reader);
switch (token.Type)
{
case JTokenType.Float:
case JTokenType.Integer:
case JTokenType.String:
if (objectType == typeof(decimal) || objectType == typeof(decimal?) )
return decimal.Parse(token.ToString(), CultureInfo.InvariantCulture);
if (objectType == typeof(double) || objectType == typeof(double?))
return double.Parse(token.ToString(), CultureInfo.InvariantCulture);
throw new JsonSerializationException("Unexpected object type: " + objectType);
case JTokenType.Null when objectType == typeof(decimal?) || objectType == typeof(double?):
return null;
default:
throw new JsonSerializationException("Unexpected token type: " +
token.Type);
}
}
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
switch (value)
{
case null:
break;
case decimal x:
writer.WriteValue(x.ToString(CultureInfo.InvariantCulture));
break;
case double x:
writer.WriteValue(x.ToString(CultureInfo.InvariantCulture));
break;
}
}
}
}

View File

@ -1,9 +1,7 @@
using System;
using System;
using System.Reflection;
using System.Collections.Generic;
using System.Text;
using Newtonsoft.Json;
using NBitcoin.JsonConverters;
using Newtonsoft.Json;
namespace BTCPayServer.Client.JsonConverters
{

View File

@ -1,18 +1,41 @@
using System;
using System.Collections.Generic;
using System.Text;
using System;
using NBitcoin.JsonConverters;
using Newtonsoft.Json;
namespace BTCPayServer.Client.JsonConverters
{
public class TimeSpanJsonConverter : JsonConverter
public abstract class TimeSpanJsonConverter : JsonConverter
{
public class Seconds : TimeSpanJsonConverter
{
protected override long ToLong(TimeSpan value)
{
return (long)value.TotalSeconds;
}
protected override TimeSpan ToTimespan(long value)
{
return TimeSpan.FromSeconds(value);
}
}
public class Minutes : TimeSpanJsonConverter
{
protected override long ToLong(TimeSpan value)
{
return (long)value.TotalMinutes;
}
protected override TimeSpan ToTimespan(long value)
{
return TimeSpan.FromMinutes(value);
}
}
public override bool CanConvert(Type objectType)
{
return objectType == typeof(TimeSpan) || objectType == typeof(TimeSpan?);
}
protected abstract TimeSpan ToTimespan(long value);
protected abstract long ToLong(TimeSpan value);
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
{
try
@ -26,11 +49,11 @@ namespace BTCPayServer.Client.JsonConverters
}
if (reader.TokenType != JsonToken.Integer)
throw new JsonObjectException("Invalid timespan, expected integer", reader);
return TimeSpan.FromSeconds((long)reader.Value);
return ToTimespan((long)reader.Value);
}
catch
{
throw new JsonObjectException("Invalid locktime", reader);
throw new JsonObjectException("Invalid timespan", reader);
}
}
@ -38,7 +61,7 @@ namespace BTCPayServer.Client.JsonConverters
{
if (value is TimeSpan s)
{
writer.WriteValue((int)s.TotalSeconds);
writer.WriteValue(ToLong(s));
}
}
}

View File

@ -0,0 +1,7 @@
namespace BTCPayServer.Client.Models
{
public class AddCustomerEmailRequest
{
public string Email { get; set; }
}
}

View File

@ -1,3 +1,6 @@
using System;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class ApplicationUserData
@ -21,5 +24,16 @@ namespace BTCPayServer.Client.Models
/// whether the user needed to verify their email on account creation
/// </summary>
public bool RequiresEmailConfirmation { get; set; }
/// <summary>
/// the roles of the user
/// </summary>
public string[] Roles { get; set; }
/// <summary>
/// the date the user was created. Null if created before v1.0.5.6.
/// </summary>
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
public DateTimeOffset? Created { get; set; }
}
}

View File

@ -0,0 +1,8 @@
namespace BTCPayServer.Client.Models
{
public class ApprovePayoutRequest
{
public int Revision { get; set; }
public string RateRule { get; set; }
}
}

View File

@ -1,10 +1,21 @@
using BTCPayServer.Client.JsonConverters;
using BTCPayServer.Lightning;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class ConnectToNodeRequest
{
public string NodeInfo { get; set; }
public string NodeId { get; set; }
public string NodeHost { get; set; }
public int NodePort { get; set; }
public ConnectToNodeRequest()
{
}
public ConnectToNodeRequest(NodeInfo nodeInfo)
{
NodeURI = nodeInfo;
}
[JsonConverter(typeof(NodeUriJsonConverter))]
[JsonProperty("nodeURI")]
public NodeInfo NodeURI { get; set; }
}
}

View File

@ -1,4 +1,4 @@
using BTCPayServer.Client.JsonConverters;
using BTCPayServer.Client.JsonConverters;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models

View File

@ -0,0 +1,41 @@
using System;
using BTCPayServer.Client.JsonConverters;
using BTCPayServer.JsonConverters;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Client.Models
{
public class CreateInvoiceRequest
{
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Amount { get; set; }
public string Currency { get; set; }
public JObject Metadata { get; set; }
public CheckoutOptions Checkout { get; set; } = new CheckoutOptions();
public class CheckoutOptions
{
[JsonConverter(typeof(StringEnumConverter))]
public SpeedPolicy? SpeedPolicy { get; set; }
public string[] PaymentMethods { get; set; }
[JsonConverter(typeof(TimeSpanJsonConverter.Minutes))]
[JsonProperty("expirationMinutes")]
public TimeSpan? Expiration { get; set; }
[JsonConverter(typeof(TimeSpanJsonConverter.Minutes))]
[JsonProperty("monitoringMinutes")]
public TimeSpan? Monitoring { get; set; }
public double? PaymentTolerance { get; set; }
[JsonProperty("redirectURL")]
public string RedirectURL { get; set; }
public bool? RedirectAutomatically { get; set; }
public string DefaultLanguage { get; set; }
}
}
}

View File

@ -7,11 +7,22 @@ namespace BTCPayServer.Client.Models
{
public class CreateLightningInvoiceRequest
{
[JsonProperty(ItemConverterType = typeof(LightMoneyJsonConverter))]
public CreateLightningInvoiceRequest()
{
}
public CreateLightningInvoiceRequest(LightMoney amount, string description, TimeSpan expiry)
{
Amount = amount;
Description = description;
Expiry = expiry;
}
[JsonConverter(typeof(BTCPayServer.Client.JsonConverters.LightMoneyJsonConverter))]
public LightMoney Amount { get; set; }
public string Description { get; set; }
[JsonConverter(typeof(JsonConverters.TimeSpanJsonConverter.Seconds))]
public TimeSpan Expiry { get; set; }
public bool PrivateRouteHints { get; set; }
}
}

View File

@ -0,0 +1,30 @@
using System.Collections.Generic;
using BTCPayServer.JsonConverters;
using NBitcoin;
using NBitcoin.JsonConverters;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class CreateOnChainTransactionRequest
{
public class CreateOnChainTransactionRequestDestination
{
public string Destination { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal? Amount { get; set; }
public bool SubtractFromAmount { get; set; }
}
[JsonConverter(typeof(FeeRateJsonConverter))]
public FeeRate FeeRate { get; set; }
public bool ProceedWithPayjoin { get; set; }= true;
public bool ProceedWithBroadcast { get; set; } = true;
public bool NoChange { get; set; } = false;
[JsonProperty(ItemConverterType = typeof(OutpointJsonConverter))]
public List<OutPoint> SelectedInputs { get; set; } = null;
public List<CreateOnChainTransactionRequestDestination> Destinations { get; set; }
[JsonProperty("rbf")]
public bool? RBF { get; set; } = null;
}
}

View File

@ -3,4 +3,4 @@ namespace BTCPayServer.Client.Models
public class CreatePaymentRequestRequest : PaymentRequestBaseData
{
}
}
}

View File

@ -0,0 +1,13 @@
using BTCPayServer.JsonConverters;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class CreatePayoutRequest
{
public string Destination { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal? Amount { get; set; }
public string PaymentMethod { get; set; }
}
}

View File

@ -0,0 +1,22 @@
using System;
using BTCPayServer.Client.JsonConverters;
using BTCPayServer.JsonConverters;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class CreatePullPaymentRequest
{
public string Name { get; set; }
[JsonProperty(ItemConverterType = typeof(NumericStringJsonConverter))]
public decimal Amount { get; set; }
public string Currency { get; set; }
[JsonConverter(typeof(TimeSpanJsonConverter.Seconds))]
public TimeSpan? Period { get; set; }
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
public DateTimeOffset? ExpiresAt { get; set; }
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
public DateTimeOffset? StartsAt { get; set; }
public string[] PaymentMethods { get; set; }
}
}

View File

@ -1,6 +1,6 @@
namespace BTCPayServer.Client.Models
{
public class CreateStoreRequest: StoreBaseData
public class CreateStoreRequest : StoreBaseData
{
}
}

View File

@ -0,0 +1,22 @@
using System;
namespace BTCPayServer.Client.Models
{
public class GreenfieldAPIError
{
public GreenfieldAPIError()
{
}
public GreenfieldAPIError(string code, string message)
{
code = code ?? "generic-error";
if (message == null)
throw new ArgumentNullException(nameof(message));
Code = code;
Message = message;
}
public string Code { get; set; }
public string Message { get; set; }
}
}

View File

@ -0,0 +1,24 @@
using System;
namespace BTCPayServer.Client.Models
{
public class GreenfieldValidationError
{
public GreenfieldValidationError()
{
}
public GreenfieldValidationError(string path, string message)
{
if (path == null)
throw new ArgumentNullException(nameof(path));
if (message == null)
throw new ArgumentNullException(nameof(message));
Path = path;
Message = message;
}
public string Path { get; set; }
public string Message { get; set; }
}
}

View File

@ -0,0 +1,30 @@
using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace BTCPayServer.Client.Models
{
public class InvoiceData : CreateInvoiceRequest
{
public string Id { get; set; }
public string CheckoutLink { get; set; }
[JsonConverter(typeof(StringEnumConverter))]
public InvoiceStatus Status { get; set; }
[JsonConverter(typeof(StringEnumConverter))]
public InvoiceExceptionStatus AdditionalStatus { get; set; }
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
public DateTimeOffset MonitoringExpiration { get; set; }
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
public DateTimeOffset ExpirationTime { get; set; }
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
public DateTimeOffset CreatedTime { get; set; }
}
public enum InvoiceStatus
{
New,
Processing,
Expired,
Invalid,
Settled
}
}

View File

@ -0,0 +1,12 @@
namespace BTCPayServer.Client.Models
{
public enum InvoiceExceptionStatus
{
None,
PaidLate,
PaidPartial,
Marked,
Invalid,
PaidOver
}
}

View File

@ -0,0 +1,62 @@
using System;
using System.Collections.Generic;
using BTCPayServer.JsonConverters;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace BTCPayServer.Client.Models
{
public class InvoicePaymentMethodDataModel
{
public bool Activated { get; set; }
public string Destination { get; set; }
public string PaymentLink { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Rate { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal PaymentMethodPaid { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal TotalPaid { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Due { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Amount { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal NetworkFee { get; set; }
public List<Payment> Payments { get; set; }
public string PaymentMethod { get; set; }
public class Payment
{
public string Id { get; set; }
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
public DateTime ReceivedDate { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Value { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Fee { get; set; }
[JsonConverter(typeof(StringEnumConverter))]
public PaymentStatus Status { get; set; }
public string Destination { get; set; }
public enum PaymentStatus
{
Invalid,
Processing,
Settled
}
}
}
}

View File

@ -0,0 +1,14 @@
using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Client.Models
{
public class LabelData
{
public string Type { get; set; }
public string Text { get; set; }
[JsonExtensionData] public Dictionary<string, JToken> AdditionalData { get; set; }
}
}

View File

@ -10,19 +10,21 @@ namespace BTCPayServer.Client.Models
{
public string Id { get; set; }
[JsonProperty(ItemConverterType = typeof(StringEnumConverter))]
[JsonConverter(typeof(StringEnumConverter))]
public LightningInvoiceStatus Status { get; set; }
[JsonProperty("BOLT11")]
public string BOLT11 { get; set; }
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
public DateTimeOffset? PaidAt { get; set; }
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
public DateTimeOffset ExpiresAt { get; set; }
[JsonProperty(ItemConverterType = typeof(LightMoneyJsonConverter))]
[JsonConverter(typeof(LightMoneyJsonConverter))]
public LightMoney Amount { get; set; }
[JsonProperty(ItemConverterType = typeof(LightMoneyJsonConverter))]
[JsonConverter(typeof(LightMoneyJsonConverter))]
public LightMoney AmountReceived { get; set; }
}
}

View File

@ -0,0 +1,28 @@
namespace BTCPayServer.Client.Models
{
public class LightningNetworkPaymentMethodData
{
/// <summary>
/// Whether the payment method is enabled
/// </summary>
public bool Enabled { get; set; }
/// <summary>
/// Crypto code of the payment method
/// </summary>
public string CryptoCode { get; set; }
public string ConnectionString { get; set; }
public LightningNetworkPaymentMethodData()
{
}
public LightningNetworkPaymentMethodData(string cryptoCode, string connectionString, bool enabled)
{
Enabled = enabled;
CryptoCode = cryptoCode;
ConnectionString = connectionString;
}
}
}

View File

@ -1,15 +1,13 @@
using System.Collections.Generic;
using BTCPayServer.Client.JsonConverters;
using BTCPayServer.Lightning;
using NBitcoin;
using NBitcoin.JsonConverters;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class LightningNodeInformationData
{
public IEnumerable<string> NodeInfoList { get; set; }
[JsonProperty("nodeURIs", ItemConverterType = typeof(NodeUriJsonConverter))]
public NodeInfo[] NodeURIs { get; set; }
public int BlockHeight { get; set; }
}
@ -21,10 +19,10 @@ namespace BTCPayServer.Client.Models
public bool IsActive { get; set; }
[JsonProperty(ItemConverterType = typeof(LightMoneyJsonConverter))]
[JsonConverter(typeof(LightMoneyJsonConverter))]
public LightMoney Capacity { get; set; }
[JsonProperty(ItemConverterType = typeof(LightMoneyJsonConverter))]
[JsonConverter(typeof(LightMoneyJsonConverter))]
public LightMoney LocalBalance { get; set; }
public string ChannelPoint { get; set; }

View File

@ -0,0 +1,11 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace BTCPayServer.Client.Models
{
public class MarkInvoiceStatusRequest
{
[JsonConverter(typeof(StringEnumConverter))]
public InvoiceStatus Status { get; set; }
}
}

View File

@ -0,0 +1,16 @@
using System;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class NotificationData
{
public string Id { get; set; }
public string Body { get; set; }
public bool Seen { get; set; }
public Uri Link { get; set; }
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
public DateTimeOffset CreatedTime { get; set; }
}
}

View File

@ -0,0 +1,39 @@
using NBitcoin;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class OnChainPaymentMethodData
{
/// <summary>
/// Whether the payment method is enabled
/// </summary>
public bool Enabled { get; set; }
/// <summary>
/// Crypto code of the payment method
/// </summary>
public string CryptoCode { get; set; }
/// <summary>
/// The derivation scheme
/// </summary>
public string DerivationScheme { get; set; }
public string Label { get; set; }
[JsonConverter(typeof(NBitcoin.JsonConverters.KeyPathJsonConverter))]
public RootedKeyPath AccountKeyPath { get; set; }
public OnChainPaymentMethodData()
{
}
public OnChainPaymentMethodData(string cryptoCode, string derivationScheme, bool enabled)
{
Enabled = enabled;
CryptoCode = cryptoCode;
DerivationScheme = derivationScheme;
}
}
}

View File

@ -0,0 +1,23 @@
using System.Collections.Generic;
namespace BTCPayServer.Client.Models
{
public class OnChainPaymentMethodPreviewResultData
{
/// <summary>
/// a list of addresses generated by the derivation scheme
/// </summary>
public IList<OnChainPaymentMethodPreviewResultAddressItem> Addresses { get; set; } =
new List<OnChainPaymentMethodPreviewResultAddressItem>();
public class OnChainPaymentMethodPreviewResultAddressItem
{
/// <summary>
/// The key path relative to the account key path.
/// </summary>
public string KeyPath { get; set; }
//The address generated at the key path
public string Address { get; set; }
}
}
}

View File

@ -0,0 +1,13 @@
using NBitcoin;
using NBitcoin.JsonConverters;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class OnChainWalletAddressData
{
public string Address { get; set; }
[JsonConverter(typeof(KeyPathJsonConverter))]
public KeyPath KeyPath { get; set; }
}
}

View File

@ -0,0 +1,12 @@
using NBitcoin;
using NBitcoin.JsonConverters;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class OnChainWalletFeeRateData
{
[JsonConverter(typeof(FeeRateJsonConverter))]
public FeeRate FeeRate { get; set; }
}
}

View File

@ -0,0 +1,17 @@
using BTCPayServer.JsonConverters;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class OnChainWalletOverviewData
{
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Balance { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal UnconfirmedBalance { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal ConfirmedBalance { get; set; }
public string Label { get; set; }
}
}

View File

@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using BTCPayServer.JsonConverters;
using NBitcoin;
using NBitcoin.JsonConverters;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class OnChainWalletTransactionData
{
[JsonConverter(typeof(UInt256JsonConverter))]
public uint256 TransactionHash { get; set; }
public string Comment { get; set; }
public Dictionary<string, LabelData> Labels { get; set; } = new Dictionary<string, LabelData>();
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Amount { get; set; }
[JsonConverter(typeof(UInt256JsonConverter))]
public uint256 BlockHash { get; set; }
public int? BlockHeight { get; set; }
public int Confirmations { get; set; }
[JsonConverter(typeof(DateTimeToUnixTimeConverter))]
public DateTimeOffset Timestamp { get; set; }
[JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public TransactionStatus Status { get; set; }
}
}

View File

@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using BTCPayServer.JsonConverters;
using NBitcoin;
using NBitcoin.JsonConverters;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class OnChainWalletUTXOData
{
public string Comment { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Amount { get; set; }
[JsonConverter(typeof(OutpointJsonConverter))]
public OutPoint Outpoint { get; set; }
public string Link { get; set; }
public Dictionary<string, LabelData> Labels { get; set; }
[JsonConverter(typeof(DateTimeToUnixTimeConverter))]
public DateTimeOffset Timestamp { get; set; }
[JsonConverter(typeof(KeyPathJsonConverter))]
public KeyPath KeyPath { get; set; }
public string Address { get; set; }
}
}

View File

@ -1,3 +1,5 @@
using BTCPayServer.Client.JsonConverters;
using BTCPayServer.Lightning;
using NBitcoin;
using NBitcoin.JsonConverters;
using Newtonsoft.Json;
@ -7,11 +9,13 @@ namespace BTCPayServer.Client.Models
{
public class OpenLightningChannelRequest
{
public ConnectToNodeRequest Node { get; set; }
[JsonProperty(ItemConverterType = typeof(MoneyJsonConverter))]
[JsonConverter(typeof(NodeUriJsonConverter))]
[JsonProperty("nodeURI")]
public NodeInfo NodeURI { get; set; }
[JsonConverter(typeof(MoneyJsonConverter))]
public Money ChannelAmount { get; set; }
[JsonProperty(ItemConverterType = typeof(FeeRateJsonConverter))]
[JsonConverter(typeof(FeeRateJsonConverter))]
public FeeRate FeeRate { get; set; }
}
}

View File

@ -2,6 +2,7 @@ namespace BTCPayServer.Client.Models
{
public class PayLightningInvoiceRequest
{
public string Invoice { get; set; }
[Newtonsoft.Json.JsonProperty("BOLT11")]
public string BOLT11 { get; set; }
}
}

View File

@ -8,7 +8,7 @@ namespace BTCPayServer.Client.Models
{
public class PaymentRequestBaseData
{
[JsonProperty(ItemConverterType = typeof(DecimalStringJsonConverter))]
[JsonProperty(ItemConverterType = typeof(NumericStringJsonConverter))]
public decimal Amount { get; set; }
public string Currency { get; set; }
public DateTime? ExpiryDate { get; set; }

View File

@ -5,7 +5,7 @@ using Newtonsoft.Json.Converters;
namespace BTCPayServer.Client.Models
{
public class PaymentRequestData : PaymentRequestBaseData
{
{
[JsonConverter(typeof(StringEnumConverter))]
public PaymentRequestData.PaymentRequestStatus Status { get; set; }
public DateTimeOffset Created { get; set; }

View File

@ -0,0 +1,32 @@
using System;
using BTCPayServer.JsonConverters;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace BTCPayServer.Client.Models
{
public enum PayoutState
{
AwaitingApproval,
AwaitingPayment,
InProgress,
Completed,
Cancelled
}
public class PayoutData
{
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
public DateTimeOffset Date { get; set; }
public string Id { get; set; }
public string PullPaymentId { get; set; }
public string Destination { get; set; }
public string PaymentMethod { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Amount { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal? PaymentMethodAmount { get; set; }
[JsonConverter(typeof(StringEnumConverter))]
public PayoutState State { get; set; }
public int Revision { get; set; }
}
}

View File

@ -0,0 +1,24 @@
using System;
using BTCPayServer.Client.JsonConverters;
using BTCPayServer.JsonConverters;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models
{
public class PullPaymentData
{
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
public DateTimeOffset StartsAt { get; set; }
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
public DateTimeOffset? ExpiresAt { get; set; }
public string Id { get; set; }
public string Name { get; set; }
public string Currency { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal Amount { get; set; }
[JsonConverter(typeof(TimeSpanJsonConverter.Seconds))]
public TimeSpan? Period { get; set; }
public bool Archived { get; set; }
public string ViewLink { get; set; }
}
}

View File

@ -8,12 +8,12 @@ namespace BTCPayServer.Client.Models
/// the BTCPay Server version
/// </summary>
public string Version { get; set; }
/// <summary>
/// the Tor hostname
/// </summary>
public string Onion { get; set; }
/// <summary>
/// the payment methods this server supports
/// </summary>

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