Compare commits

...

3154 Commits

Author SHA1 Message Date
8c6fe91c71 After successful migration from SQLite or MySql, there is an error after a restart 2023-02-11 21:01:36 +09:00
d14ce2a37f POS: Improve Keypad view (#4596)
* UI updates

* Updates modes and calculation

* Unify tip buttons

* White caret

* Add top margin to calculation

* Add space between mode buttons and keypad

* Discount updates
2023-02-10 16:26:38 +01:00
33d272d4b0 Crowdfund: View updates (#4588)
* Crowdfund: View updates

Improve store branding and remove the card styles, because they had borders which seemed like visual clutter. Other than that I made some changes to the header section and cleaned up the markup and indentation.

* adds column spacing + details header

* Move the Featured Image input

* Center align the Last Updated

* Remove store header, update header section

* Bump description font size

* Improve perk display

* Improve details section

* Fix main image display

---------

Co-authored-by: dstrukt <gfxdsign@gmail.com>
2023-02-10 16:26:09 +01:00
57f5c15670 Merge pull request #4620 from btcpayserver/Kukks-patch-1 2023-02-10 09:45:30 +01:00
487faa69c6 Bump version 2023-02-10 09:40:03 +01:00
9148a1e564 fix #4570 2023-02-10 09:10:10 +01:00
4c3f5e1e1a fix #4618 2023-02-10 08:59:18 +01:00
b0bf0824dd Update db migration doc 2023-02-10 15:48:43 +09:00
dea5991e01 bump 2023-02-10 11:53:17 +09:00
739932a280 Changelog 2023-02-10 11:52:37 +09:00
1f8bc5b490 Add ability to migrate from MySQL and SQLite with EF (#4614) 2023-02-10 11:43:46 +09:00
753ffd401b BIP21 + LNURL fix (#4616)
In case of the unified invoice, the LNURL wasn't correct — with this change we are simply reusing th one that was issued on invoice creation instead of generating it anew on the fly.

Also fixes missing uppercasing for the QR code in case of non-unified QR.
And removes the `lightning:` scheme from the LNURL that's displayed to the user (unifies it with what we do for Onchain and Lightning)
2023-02-10 11:23:48 +09:00
0d1bab45a0 Fix MySQL migrations 2023-02-10 11:17:52 +09:00
17cc439de3 Merge pull request #4617 from dennisreimann/lnurl-cors
LNURL: Add missing CORS
2023-02-09 20:34:44 +01:00
5d03e300fb LNURL: Add missing CORS
In addition to #4587. Closes #4615.
2023-02-09 17:45:09 +01:00
a20408bed1 Fix crash for installations supporting zcash or monero (#4610) 2023-02-09 09:49:08 +09:00
ed0ccd6f13 Bump lightning lib, fix warnings 2023-02-08 21:29:20 +09:00
bb1138efb5 Catch exception when creating new invoice with GetLNURL 2023-02-08 20:45:05 +09:00
82b36aaca7 bump 2023-02-08 20:20:56 +09:00
688044429e Changelog 1.7.6 (#4606) 2023-02-08 20:14:51 +09:00
7bbfc8e6d4 Greenfield: Currency rate should be strings (#4607) 2023-02-08 19:18:37 +09:00
85513aa5c3 Make NFC built in (#4541)
* Make NFC built int

* support checkout v2

* uninstall old plugin

* fix lnurl in unified checkout

* fix tests

* fix tests

* fix old checkout unified qr

* clean up and make nfc submission more sturdy

* support topup invoices for lnurlw

* fix test

* Payment URI fixes

* Fix LNURL exclusion cases

* UI updates

* Adapt test

---------

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2023-02-08 15:47:38 +09:00
67254cc30c Website is nullable. (#4604) 2023-02-07 12:04:13 +01:00
b055844973 Greenfield get app details (#4102)
* Add Greenfield API endpoints for retrieving app details

* add app items details

* Add GetPosApp and GetCrowdfundApp to LocalBTCPayServerClient

* Simplify POS app data items example

* Document app type enum

* make "RequiresRefundEmail" nullable

* remove "Template" and "PerksTemplate" fields
2023-02-07 17:01:53 +09:00
9ba03848f2 Small perf improvement when fetching exactly 1 payout by id 2023-02-07 16:53:44 +09:00
5b96ab89fd Fix Payout Mark Paid in UI (#4585)
fixes #4579
2023-02-07 16:51:20 +09:00
6a4d8f7404 Fix: Payjoin wasn't always properly choosing utxo for optimal change (#4600)
* Fix: Payjoin wasn't always properly choosing utxo for optimal change

* Update with timeout
2023-02-07 16:43:31 +09:00
219d03b8dd Fix: If PoS item code contains a /, LNUrl would not work (fix #4601) (#4602)
This is caused by a weird buggy behavior from ASP.NET Core concerning
path value decoding. (More information on
https://github.com/dotnet/aspnetcore/issues/14170#issuecomment-533342396)

This hasn't been fixed for a while, and the dotnet team keeps reporting
it over and over.
2023-02-06 18:17:17 +09:00
523654f2eb Upgrade Lightning lib (#4589)
Includes the updates from btcpayserver/BTCPayServer.Lightning#121.
2023-02-06 13:26:11 +09:00
b9b8cb9f63 Fix test 2023-02-06 12:38:18 +09:00
94f2cd4257 Server Theme: Allow to unset CustomThemeCssUri
It is necessary to have a way to unset the deprecated variable, to get access to the new way of uploading a theme file.
2023-02-04 17:24:19 +01:00
26248774c2 App domain redirect (#4391)
* Fix duplicates in GetAllApps with allowNoUser

* Use domain mapping as canonical reference and redirect to it

* Revert domain mapping to hostname instead of URL
2023-02-02 20:53:42 +09:00
99299ba06f bump nbx 2023-02-02 10:15:04 +01:00
6e42eaa26c fix plugin packer when relative path provided 2023-02-02 10:15:03 +01:00
ae7b621e3d Change Stores.DerivationStrategies to JSONB (#4573)
Gradually changing column from blobs to JSONB allow us to
later take advantages of more powerful queries on postgres.
2023-02-02 09:43:39 +09:00
f2ced20c42 Fix a bunch of open redirect (#4575) 2023-02-02 09:42:58 +09:00
e4f256d5cd Lightning Address: Fix availability check and refactor option view (#4584)
As @petzsch rightfully assumed in #4578, the check took only the last available LN payment method into account, which in this case was LN on LTC. We now pass the crypto code as well and I refactored the checks as well as the option view.

Fixes #4578.
2023-02-02 09:42:41 +09:00
ca1dac4cc3 Add missing CORS to ln address of BTCPay (Compatibility Beach Wallet) (#4587) 2023-02-02 09:40:31 +09:00
8fc2729fab Merge pull request #4580 from dennisreimann/disqus-csp
Fixes https://github.com/btcpayserver/btcpayserver/issues/4572
2023-02-01 13:12:11 +01:00
24c19efd52 Crowdfund: Add CSP rules for Disqus
Fixes #4572.
2023-01-31 22:13:45 +01:00
a3edd829a6 Add onchain wallet send ui extension 2023-01-31 16:49:41 +01:00
9ec475fa40 Fix PluginPacker crash 2023-01-31 23:24:20 +09:00
aad06c583e Greenfield: Add store rates api (#4550)
* Add store rates api

* Improve doc

---------

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2023-01-31 14:42:25 +09:00
f821e35cb0 Store branding: Unify public pages (#4568)
Closes #3842.
2023-01-30 09:23:49 +01:00
14313291d5 Make test less flaky by ordering GetApps query 2023-01-30 17:17:35 +09:00
b818352a04 Register rate providers in DI, so it can be accessed by plugins (#4551) 2023-01-30 09:46:12 +09:00
c0c34fbb41 Add GreenField endpoint for fetching all apps (#4462)
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2023-01-30 09:42:24 +09:00
b372dc21d6 handle non built in tag attachments better 2023-01-27 15:44:21 +01:00
3d576cd06b Fix XSS on uploaded files to the file storage (#4567) 2023-01-26 19:12:06 +09:00
438dcc4c6f Add Greenfield API endpoint for pull payment LNURL items (#4472)
* Add Greenfield API endpoint for pull payment LNURL items

close #4365

* Rename GetLNURLs to GetPullPaymentLNURL

* update "ln-url-not-supported" to "lnurl-not-supported"

* remove hardcoding of "BTC"

* update "PullPayments_LNURL" to "PullPayments_GetPullPaymentLNURL"

* update description of 400 status code response

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2023-01-26 14:43:07 +09:00
de4ac2c830 Greenfield: Add payments list endpoint (#4407)
Based on btcpayserver/BTCPayServer.Lightning#109
2023-01-26 13:22:49 +09:00
f46443a5e3 Add additional permission for pull payments (#4539)
* Add additional permission for pull payments

* Apply suggestions from code review
2023-01-26 09:46:05 +09:00
69e90b7ff1 Point of Sale: Improve merchant view (#4560)
* Point of Sale: Improve merchant view

Closes #3843.

* Trim bottom section

* Display App Name and Display Title next to each other

* Update views
2023-01-26 09:27:31 +09:00
5089ec9826 Merge pull request #4527 from dennisreimann/branding-new 2023-01-25 15:11:08 +01:00
372df93c18 bump 2023-01-25 12:42:40 +09:00
1d2ddeedde Changelog v1.7.5 (#4562)
Inclused updates until f10c1c4730cad394b4361263ffc71e501763f800.
2023-01-25 12:41:29 +09:00
4df2f1f756 Store Branding: Add custom CSS option 2023-01-24 13:24:17 +01:00
f10c1c4730 Checkout v2: UI fixes (#4552)
* Checkout v2: UI fixes

* Improve icon border
2023-01-24 21:00:04 +09:00
92b556e54f Load debug plugins in tests (#4555)
Equivalent to the loading code in Program.cs
2023-01-24 20:12:47 +09:00
b46ae7a651 Checkout v2: Re-add LNURL for top-up invoices (#4556)
My bad, this was excluded erroneously.

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2023-01-24 18:10:38 +09:00
9f3a3c5f51 BIP21: Uppercase addresses only in QR, not in payment URL (#4553)
* BIP21: Uppercase addresses only in QR, not in payment URL

The uppercased address/BOLT11 should only be used for the QR code, the payment URI for the link should stay as it is.

References:

- #2110
- https://bitcoinqr.dev/

* Improve comments

* Add comments step by step

* Ensure correct delimiter

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2023-01-24 09:44:39 +09:00
b5071237fd Fix swagger file 2023-01-23 12:11:13 +01:00
1d2bebf17a Greenfield: Lightning addresses API (#4546)
* Greenfield: Lightning addresses API

* add docs

* Apply suggestions from code review

Co-authored-by: d11n <mail@dennisreimann.de>
2023-01-23 10:11:34 +01:00
9086822b94 Merge pull request #4549 from dennisreimann/pnxbet
Remove pnxbet as a supporter
2023-01-22 12:29:59 +01:00
d90d3c5a0f Remove pnxbet as a supporter
Closes #4543.
2023-01-21 20:51:36 +01:00
a3203e5775 Fix several HTML injections (#4545) 2023-01-21 19:08:12 +01:00
5f24b41250 Update Changelog, log restarts 2023-01-19 22:10:38 +09:00
b577c0adb7 Minor UI updates (#4530)
* Minor UI updates

* Lockout page fixes

Fix duplicate headline and model null-check
2023-01-19 18:08:34 +09:00
a9ad0fde9e After a plugin install or uninstall, restart now just kill the process instead of requiring SSH with docker install 2023-01-19 14:27:33 +09:00
9974b6070e Fix NRE in plugin list 2023-01-19 14:22:57 +09:00
bd5e4f3d94 fix NRE in plugins list 2023-01-18 13:47:15 +01:00
e0adb1133d Plugins: Add checkout-noscript-end UI extension point (#4532) 2023-01-18 13:38:58 +01:00
3cdb4f5b2a FileService: Null-check stored file before removal (#4535) 2023-01-18 13:38:37 +01:00
248401f534 Plugin assemblies shouldn't be unloadable 2023-01-18 16:46:08 +09:00
1228a06a90 Improve detection of plugin bricking an install on startup (#4533) 2023-01-18 14:15:27 +09:00
b5cd215643 Use AssemblyProduct rather than AssemblyTitle for default plugin name 2023-01-17 22:05:24 +09:00
7604667b55 Make sure plugin packer has all btcpay deps 2023-01-17 20:04:11 +09:00
3a278d8079 bump 2023-01-16 23:59:09 +09:00
adcc484528 Changelog v1.7.4 (#4513)
Includes commits until 798553e96afeb3aa7ddac125a830fde7a47be187.
2023-01-16 23:58:04 +09:00
798553e96a Greenfield: Add separate permission for viewing LN invoices (#4529)
Based on the diff by @ArttuPakarinen provided in #4523. Closes #4523.
2023-01-16 21:42:54 +09:00
068b717a75 Checkout v2: Configure countdown timer (#4471)
* Checkout v2: Configure countdown timer

This addresses feedback by @astupidmoose left [here](https://github.com/btcpayserver/btcpayserver/discussions/4308#discussioncomment-4438926): Make the countdown timer configurable with a minutes setting. This way the merchant has full control over when to display the timer. They could even set it to equal the invoice expiry, so that it is shown right from the beginning.

* Rename property and adjust wording

* Remove expiration percentage from Checkout v2
2023-01-16 20:45:19 +09:00
785cf597ad Redesign plugin list items (#4528)
* Redesign plugin list items

* Update icon and format code

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2023-01-16 12:12:51 +01:00
ee70fe85c0 Fix loading of plugins in the plugin directory 2023-01-16 16:31:26 +09:00
2e31816979 Can load external plugins during dev to debug more easily (#4518)
* Can load external plugins during dev to debug more easily

* Add again load plugin by project reference

* Make sure we don't load same plugin twice
2023-01-16 10:37:17 +09:00
e4237c9511 Bump (Fix signature hash for some altcoins) 2023-01-16 10:11:33 +09:00
0bc6967dbc Greenfield: Add payment hash and preimage to Lightning invoices (#4520)
* Greenfield: Add payment hash and preimage to Lightning invoices

Closes #4475.

* Greenfield: Add payment hash and preimage to invoice payment method details

* Refactor LN payment method details retrieval
2023-01-13 17:29:41 +09:00
2301769419 Checkout v2: Display and copy addresses (#4489)
* Checkout v2: Display and copy addresses

Closes #4442.

* Refinements
2023-01-12 10:41:33 +09:00
42c5f732a2 Provide sensible default to BaseBTCPayServerPlugin (#4522)
A new plugin overriding BaseBTCpayServerPlugin need to override
Identifier, Name, Version, and Description by default.
This information is actually better saved in the .csproj of the plugin.
Using <Title>, <Description> and <Version> properties.
The identifier should match the assembly name as we assume at several
places than a single plugin is a single dll.
2023-01-11 22:35:45 +09:00
2428b564fd Fix: Version numbers in UI appeared with a suffix zero x.x.x.0 instead of x.x.x (#4521) 2023-01-11 18:24:51 +09:00
bb0e96a163 Apply store ids and search term to invoice export (#4516)
This makes the export work like the list in the UI. Exports what one sees.

Fixes #4514.
2023-01-11 13:36:03 +09:00
bb733c5811 Unify 2FA login boxes (#4506)
* Unify 2FA login boxes

* 2FA setup: Make auth code copyable
2023-01-09 16:38:03 +01:00
ffeaf55c4e add extension points for dashboard (#4483) 2023-01-09 14:07:05 +01:00
a12bb1d9ce Update license (#4480) 2023-01-06 16:19:02 +01:00
313f2a667e Summernote: Allow Twitter embeds (#4488)
Bitcoin Ekasi is planning a crowdfund and they want to embed their Twitter timeline into the page. This adds the necessary domains to the SUmmernote iframe whitelist.
2023-01-06 22:22:49 +09:00
d5d0be5824 Code formatting updates (#4502)
* Editorconfig: Add space_before_self_closing setting

This was a difference between the way dotnet-format and Rider format code. See https://www.jetbrains.com/help/rider/EditorConfig_Index.html

* Editorconfig: Keep 4 spaces indentation for Swagger JSON files

They are all formatted that way, let's keep it like that.

* Apply dotnet-format, mostly white-space related changes
2023-01-06 22:18:07 +09:00
3fa28bb46d Upgrade Lightning lib (#4503) 2023-01-06 22:08:03 +09:00
eb90fab640 LNURL updates (#4501) 2023-01-05 14:41:18 +01:00
099d65032a Checkout: Fix language dropdown cutoff (#4486)
Fixes #4452 — this time for real. See [this comment](https://github.com/btcpayserver/btcpayserver/issues/4452#issuecomment-1366580849).
2023-01-02 12:09:46 +01:00
e96feb36cd Sync modal: Adjust to Bootstrap changes (#4485)
Fixes #4484.
2022-12-31 09:24:29 +01:00
eb6d01c21e Updates preferred price source copy label (#4492)
* ui+create: updates preferred price source copy label

* Add test case

Co-authored-by: d11n <mail@dennisreimann.de>
2022-12-31 09:24:10 +01:00
03d7dc8971 Ensure only valid non-negative numbers in tip input (#4481)
close #4478
2022-12-27 20:03:31 +01:00
09d5f5a083 Bump version 2022-12-23 17:54:42 +09:00
1a41b3fb64 Bump NBitcoin 2022-12-23 17:28:44 +09:00
f958550061 Fix tests 2022-12-23 17:21:18 +09:00
1e8e7ec4a4 Fix build 2022-12-23 17:17:09 +09:00
83c4e38fa5 Update NBitcoin 2022-12-23 17:15:14 +09:00
607d2fedb7 Changelog v1.7.3 (#4469)
Includes commits up to 627ada56b753e3da46a0db45690d689b050d085a
2022-12-23 17:13:54 +09:00
627ada56b7 Checkout v2: Minor view improvements (#4473) 2022-12-23 17:04:42 +09:00
9ce06fdc4e Update lightning libs (Fix #4458) 2022-12-23 17:03:37 +09:00
bb63ae6d87 fixes language dropdown cutoff on checkout page (#4465)
* fixes language dropdown cutoff on checkout page

* Use min-height class to fix the tests

Co-authored-by: d11n <mail@dennisreimann.de>
2022-12-22 20:31:08 +01:00
a4182621da Update persian 2022-12-22 22:30:18 +09:00
0534261759 Fix wallet transaction info merging logic and compute color as fallback for labels to not crash 2022-12-22 14:17:23 +01:00
c7baa66a4d Bump lightning lib (Fix #4383) 2022-12-22 22:01:23 +09:00
1732606581 Automated payout processors shouldn't spam logs on shutdown (Fix #4193) 2022-12-22 20:33:50 +09:00
68cdd2c2c8 Cleanups: Move test plugin to Plugins subdirectory (#4463)
* Remove unused js-scroll-trigger classes

* Move test plugin to Plugins subdirectory
2022-12-22 15:09:12 +09:00
ea03b6c19c Make checkout CSS and logo paths relative (#4354)
* Make sure custom logo and CSS paths are relative

* match request host and scheme before replacing

* Fix the issue for greenfield as well

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-12-22 15:05:56 +09:00
b83eb41df3 Frontend cleanups (#4449)
* Update some buttons

* Potential flaky test fix

* Dark theme: Fix primary accent color

* Pay Button: Remove unused clipboard dependency

The pay button uses the cope-to-clipboard.js

* Remove babel-polyfill

Browser-support should be good by now.

* Remove unused jquery-easing scripts

* Remove unused CSS
2022-12-20 23:11:22 +09:00
e6c68dc5bc Checkout: Fix modal iframe clipboard permissions (#4453)
* Checkout: Fix modal iframe clipboard permissions 

WebKit-based browser require a [permissions policy](https://web.dev/async-clipboard/#permissions-policy-integration) to be set on the iframe element. See the discussions [here](https://github.com/btcpayserver/btcpayserver/discussions/4308#discussioncomment-4399342) and [on Mattermost](https://chat.btcpayserver.org/btcpayserver/pl/z7kdgidcjtnd8f5zs5648t1dhe).

* Updates from code review
2022-12-20 22:54:47 +09:00
76a953819e Add persian language back (#4457) 2022-12-20 22:01:29 +09:00
3a2ad48bd6 Checkout v2: Reduce Altcoin name on payment method pill (#4456)
Closes #4455.
2022-12-19 16:06:43 +09:00
674d5bae8a Make sure payment request print view doesn't show table header twice (#4447) 2022-12-17 08:00:35 +01:00
5e983641b6 bump 2022-12-16 17:39:14 +09:00
96d4665880 Changelog for v1.7.2
Prepared changelog up to 889ddf6a385748b1ac357312798ae5bdb74b9261
2022-12-16 08:44:38 +01:00
889ddf6a38 Add links to docs and API in the footer (#4431)
* Add links to docs and API in the footer

* Update icons

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-12-16 08:41:58 +01:00
158e613e29 Plugins built with newer version of BTCPay couldn't run on older version (#4441) 2022-12-15 16:24:03 +09:00
255c52db26 Upgrade Lightning and ChromeDriver (#4440) 2022-12-15 15:26:25 +09:00
072c81177f Add store logo to invoice receipt page (#4435) 2022-12-15 06:49:33 +01:00
e5c7fc93e2 fix inconsistent result of labels in greenfield compared to ui wallets tx list 2022-12-14 15:57:18 +01:00
5b7b217b9c update lnurl to fix #4393 2022-12-14 15:45:22 +01:00
06cedaef4b Disabled amount/currency update for payment request with active invoices (#4390)
* Disabled amount/currency update for payment request with active invoices

close #4241

* Check amount isn't changed in backend

* Add test case

* Update BTCPayServer/Controllers/GreenField/GreenfieldPaymentRequestsController.cs

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

* Update BTCPayServer/Controllers/UIPaymentRequestController.cs

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

* Improve wording

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-12-14 14:01:48 +09:00
6972e8a3db UI: Theme extensions (#4398)
* Theme extensions

Adds the ability to choose the themeing strategy: Extend one of the existing themes (light or dark) or go fully custom. The latter was the only option up to now, which isn't ideal:

- One had to provide a full-blown theme file overriding all variables
- Tedious, error prone and hard to maintain, because one has to keep track of updates

This PR makes it so that one can choose light or dark as base theme and do modifications on top.

Benefit: You can specify a limited set of variables and might get away with 5-20 lines of CSS.

* Ensure custom theme is present

* Update checkout test
2022-12-14 13:37:31 +09:00
18ba0148ae Use better default than coingecko when creating a new store (#4416)
* Use better default than coingecko when creating a new store

* Improve recommended exchange UX

* Add btcturk for TRY

* Fix recommendation

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-12-14 13:33:27 +09:00
dea019ebdc Add DefaultDescription to LNUrl withdrawal request (#4434)
close #4254
2022-12-14 13:32:50 +09:00
e27e93aa9a Add BTCTurk rate provider (#4433) 2022-12-14 13:14:19 +09:00
c9ee7d477d Fix bitbank and yadio rate providers (#4432) 2022-12-14 12:49:30 +09:00
e9deb13ce4 Allow more then 20 accounts when using BTCPayServer.Vault (#4430)
Closes #4410.
2022-12-14 12:06:54 +09:00
cdac238f6d [Greenfield]: Add DescriptionHashOnly to include a description hash in the BOLT11 (#4411)
* [Greenfield]: Add DescriptionHashOnly to include a description hash in the BOLT11

* Add CLN test case

* Improve description in Swagger file

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-12-13 18:56:33 +09:00
e2c5e2c7fb Remove system plugins from the plugin list (#4429) 2022-12-13 18:54:41 +09:00
0c3f819200 Have address wallet objects rather than script objects (#4417) 2022-12-13 09:09:25 +09:00
3673230fdf Add missing margin 2022-12-12 21:45:41 +01:00
f2cb07ac95 Local file system storage as default (#4386)
* Local file system storage as default

Checks whether or not a file storage has been set. If not, it sets the local file system storage as default.

* Ensure check gets run
2022-12-12 20:28:24 +09:00
484cf9d8a2 PayButton: Fix CSP problems in Firefox (#4376)
* PayButton: Fix CSP problems in Firefox

Firefox does not support [`unsafe-hashes`](https://caniuse.com/?search=unsafe-hashes), so I figured it might be best to get rid of the inline event handlers in general.

Closes #4325.

* Account for multiple paybuttons on one page
2022-12-12 20:27:26 +09:00
5b20be8cfd Checkout fixes (#4425)
* Fix spinner partial usage in Checkout v1

* Update v2 tests
2022-12-10 19:19:13 +09:00
4dbe622a4a Checkout v2: Enable cheating mode on results view (#4418) 2022-12-08 14:20:01 +01:00
9a4dec57d1 Generate a wallet object for all scripts, save source in generatedBy rather than receive label (#4413) 2022-12-08 13:16:18 +09:00
f5c5178f95 Lock user: Improve return code and fix docs (#4377)
* Lock user: Improve return code and fix docs

The docs state that the `DELETE` method should be used, though the controller wants `POST`. The latter seems appropriate here, as the action can be used for locking and unlocking.

Also adapted the action to return a status code based on the actual outcome of the user toggle call.

Closes #4310.

* Update clients
2022-12-07 19:01:50 +01:00
727cf84080 Fix wallet object script should have script hex as id 2022-12-07 20:26:50 +09:00
80a257e85f Fix Output Descriptor parsing for WSH multisig case (#4402)
* Fix Output Descriptor parsing for WSH multisig case

Reuse existing function for extracting from a multisig descriptor, instead of recursively parsing the inner output descriptor. The latter would run into invalid cases, because it'd be interpreted as bare multisig, which supports only up to three public keys. 

For further details see MetacoSA/NBitcoin#1151.

* Add CanParseDerivationSchemes test
2022-12-07 20:18:17 +09:00
ad3c15df9b Fix mobile nav (#4409) 2022-12-06 22:52:37 +01:00
c665bd2321 Bump clightning (#4406) 2022-12-06 22:15:06 +09:00
948bae9f95 Wallet import: Surface detailed error messages (#4392)
* Wallet import: Surface detailed error messages

Similar to #4205, this checks if the input is an output descriptor and display more detailed information about why an import might fail.

* Add test cases
2022-12-05 17:06:05 +09:00
a1c10b4ea3 Fix store selector transition (#4400) 2022-12-05 08:47:51 +01:00
f36df81d9a bump lightning lib (Fix #4245) 2022-12-05 11:37:03 +09:00
2fd9eb6c68 Adapt ln payouts to handle unknown status (#4382)
Co-authored-by: d11n <mail@dennisreimann.de>
2022-12-04 13:23:59 +01:00
8894d14130 Upgrade Bootstrap to v5.2.3; Design System improvements (#4380) 2022-12-04 10:01:38 +01:00
4039e74a82 Do not run label migration for new instances 2022-12-01 19:09:51 +09:00
0af3faf6ff Wallet object scripts (#4301)
* Wallet object scripts

* Adjust comment

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-12-01 09:54:55 +09:00
0520b69c18 Update Changelog 2022-11-29 11:55:59 +09:00
e11a775bed fix migration 2022-11-29 11:29:35 +09:00
b4ed4623e1 bump 2022-11-29 11:20:14 +09:00
9ee9653c7d Checkout fixes (#4375)
* Round buttons on results view

* Checkout v2: Fix for BIP21 case with LN as default payment method

Fixes #4352.

* Update changelog

* Add test for fix
2022-11-29 11:19:23 +09:00
e55a16d917 bump bitcoin core in tests (#4374) 2022-11-28 22:18:19 +09:00
3458a0b22c Changelog 1.7.1 2022-11-28 21:08:33 +09:00
ddcfa735e0 Improve documentation of Refund API in Greenfield (#4372) 2022-11-28 20:58:18 +09:00
3370240541 Udpate langs 2022-11-28 20:57:31 +09:00
c0cec4716e Fix error HTTP 500 happening on Point of Sale (Fix: #4355) (#4368) 2022-11-28 20:50:09 +09:00
08b239e87a Change some table type from TEXT to JSONB (#4371)
* Change some table type from TEXT to JSONB

* Deprecate mysql and sqlite backend
2022-11-28 20:36:18 +09:00
84132e794a POS: Fix manifest (#4373)
- Manifest v1 doesn't support HEX colors
- Make icon URLs absolute

Closes #4363.
2022-11-28 20:35:52 +09:00
425d70f261 Add Greenfield invoice refund endpoint (#4238)
* Add Greenfield invoice refund endpoint

See discussion here: https://github.com/btcpayserver/btcpayserver/discussions/4181

* add test

* add docs
2022-11-28 17:53:08 +09:00
420954ed00 Add metadata to invoice webhook event (#4370)
close #4223
2022-11-28 17:50:52 +09:00
45edd330f5 Fix logos when rootPath is used (#4367)
* Fix logos when rootPath is used

* Fix close buttons used in JS

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-11-28 09:25:18 +01:00
6a0e2bcad3 Adjust currency name to be standard (#4369) 2022-11-28 15:00:35 +09:00
d67d3e0167 Small README changes (#4361) 2022-11-27 23:35:29 +09:00
cd4f3d9a66 Fix: Calling GetPayment more than once on aLND client would fail 2022-11-26 22:42:08 +09:00
5c6db35c9b Cleanups (#4351) 2022-11-26 13:01:00 +09:00
887bea4328 bump BTCPayServer.Client 2022-11-26 00:22:09 +09:00
def5095d77 Changelog for v1.7 (#4288)
Includes updates from v1.6.12 to a6ee92fbd59a702dd56520126b4aea82d54cfb6c.
2022-11-25 22:37:20 +09:00
ab66662ff6 Update What's New (#4309)
Add v1.7 info and hide the button in case the store isn't set up, yet.

Closes #4305.
2022-11-25 22:31:59 +09:00
2d84433a62 bump 2022-11-25 22:26:29 +09:00
b8e61787d4 Merge pull request #4350 from btcpayserver/woirnew
Some adjustment for Forms
2022-11-25 22:22:25 +09:00
669825a35d Ensure redirecturl is local for form builder 2022-11-25 19:28:46 +09:00
31b25ca169 Propagate the ModelState errors on dynamic forms 2022-11-25 18:32:40 +09:00
a6ee92fbd5 Update incorrect "monitoringTime" field for invoice API docs (#4348) 2022-11-25 09:12:55 +01:00
5ff1a59a99 Make sure the form is properly validated 2022-11-25 16:11:13 +09:00
4f65eb4d65 Remove dead code, fix dups form value 2022-11-25 15:14:54 +09:00
39328c7368 Rename walletobjects Parent/Child to A/B (#4347) 2022-11-25 12:06:57 +09:00
2f5f3e1b51 Do not enable receipts for payment requests (#4342)
Payment requests have a receipt-ish style by default. Receipts for each individual invoice of a payment request can be quite confusing as individually they do not prove the pay request was settled.
2022-11-25 11:04:34 +09:00
022285806b Form Builder (#4137)
* wip

* Cleanups

* UI updates

* Update UIFormsController.cs

* Make predefined forms usable statically

* Add support for pos app + forms

* pay request form rough support

* invoice form through receipt page

* Display form name in inherit from store setting

* Do not request additional forms on invoice from pay request

* fix up code

* move checkoutform id in checkout appearance outside of checkotu v2 toggle

* general fixes for form system

* fix pav bug

* UI updates

* Fix warnings in Form builder (#4331)

* Fix build warnings about string?

Enable nullable on UIFormsController.cs
Fixes CS8632 The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.

* Clean up lack of space in injected services in Submit() of UIFormsController.cs

* Remove unused variables (CS0219) and assignment of nullable value to nullable type (CS8600)

* Cleanup double semicolons while we're at tit

* Fix: If reverse proxy wasn't well configured, and error message should have been displayed (#4322)

* fix monero issue

* Server Settings: Update Policies page (#4326)

Handles the multiple submit buttons on that page and closes #4319.

Contains some UI unifications with other pages and also shows the block explorers without needing to toggle the section via JS.

* Change confirmed to settled. (#4328)

* POS: Fix null pointer

Introduced in #4307, the referenced object needs to be `itemChoice` instead of `choice`.

* Add documentation link to plugins (#4329)

* Add documentation link to plugins

* Minor UI updates

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

* Fix flaky test (#4330)

* Fix flaky test

* Update BTCPayServer/PayoutProcessors/BaseAutomatedPayoutProcessor.cs

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

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

* Remove invoice and store level form

* add form test

* fix migration for forms

* fix

* make pay request form submission redirect to invoice

* Refactor FormQuery to only be able to query single store and single form

* Put the Authorize at controller level on UIForms

* Fix warnings

* Fix ef request

* Fix query to forms, ensure no permission bypass

* Fix modify

* Remove storeId from step form

* Remove useless storeId parameter

* Hide custom form feature in UI

* Minor cleanups

* Remove custom form options from select for now

* More minor syntax cleanups

* Update test

* Add index - needs migration

* Refactoring: Use PostRedirect instead of TempData for data transfer

* Remove untested and unfinished code

* formResponse should be a JObject, not a string

* Fix case for Form type

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: JesterHodl <103882255+jesterhodl@users.noreply.github.com>
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
Co-authored-by: Andreas Tasch <andy.tasch@gmail.com>
2022-11-25 10:42:55 +09:00
bb60c2ac48 Checkout v2: Minor fixes (#4345)
* Do not show remaining amount for topup invoices in expiry message

As [reported by @petzsch](https://chat.btcpayserver.org/btcpayserver/pl/gg1zy8t5h3dq7nme1nom93migo).

* Fix links on result page in Checkout Classic

Closes #4344.

* Better way to exclude Lightning if BIP21 is active and we have both PMs


Unify margins
2022-11-24 23:14:56 +09:00
a4ee1e9805 Checkout v2 finetuning (#4276)
* Indent all JSON files with two spaces

* Upgrade Vue.js

* Cheat mode improvements

* Show payment details in case of expired invoice

* Add logo size recommendation

* Show clipboard copy hint cursor

* Improve info area and wording

* Update BIP21 wording

* Invoice details adjustments

* Remove form; switch payment methods via AJAX

* UI updates

* Decrease paddings to gain space

* Tighten up padding between logo mark and the store title text

* Add drop-shadow to the containers

* Wording

* Cheating improvements

* Improve footer spacing

* Cheating improvements

* Display addresses

* More improvements

* Expire invoices

* Customize invoice expiry

* Footer improvements

* Remove theme switch

* Remove non-existing sourcemap references

* Move inline JS to checkout.js file

* Plugin compatibility

See Kukks/btcpayserver#8

* Test fix

* Upgrade vue-i18next

* Extract translations into a separate file

* Round QR code borders

* Remove "Pay with Bitcoin" title in BIP21 case

* Add copy hint to payment details

* Cheating: Reduce margins

* Adjust dt color

* Hide addresses for first iteration

* Improve View Details button

* Make info section collapsible

* Revert original en locale file

* Checkout v2 tests

* Result view link fixes

* Fix BIP21 + lazy payment methods case

* More result page link improvements

* minor visual improvements

* Update clipboard code

Remove fallback for old browsers. https://caniuse.com/?search=navigator.clipboard

* Transition copy symbol

* Update info text color

* Invert dark neutral colors

Simplifies the dark theme quite a bit.

* copy adjustments

* updates QR border-radius

* Add option to remove logo

* More checkout v2 test cases

* JS improvements

* Remove leftovers

* Update test

* Fix links

* Update tests

* Update plugins integration

* Remove obsolete url code

* Minor view update

* Update JS to not use arrow functions

* Remove FormId from Checkout Appearance settings

* Add English-only hint and feedback link

* Checkout Appearance: Make options clearer, remove Custom CSS for v2

* Clipboard copy full URL instead of just address/BOLT11

* Upgrade JS libs, add content checks

* Add test for BIP21 setting with zero amount invoice

Co-authored-by: dstrukt <gfxdsign@gmail.com>
2022-11-24 08:53:32 +09:00
bf0a8c1e62 Fix flaky test ln payout (#4334) 2022-11-23 21:02:47 +09:00
d2b10ef4e6 CanUseTorClient fail no more 2022-11-22 21:58:15 +09:00
9f3fca8fd7 Show the git commit of the current build of BTCPay (#4320)
* Show the git commit of the current build of BTCPay

* Fix build

Co-authored-by: d11n <mail@dennisreimann.de>
2022-11-22 21:37:07 +09:00
9404819dbe Fix flaky test (#4330)
* Fix flaky test

* Update BTCPayServer/PayoutProcessors/BaseAutomatedPayoutProcessor.cs

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

Co-authored-by: d11n <mail@dennisreimann.de>
2022-11-22 12:17:29 +01:00
d959f5096b Add documentation link to plugins (#4329)
* Add documentation link to plugins

* Minor UI updates

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-11-22 11:06:23 +01:00
bd3710a60f Merge pull request #4327 from btcpayserver/dennisreimann-patch-1 2022-11-22 06:58:10 +01:00
3d43f3a2b3 Change confirmed to settled. (#4328) 2022-11-22 11:10:21 +09:00
6194c156bd Server Settings: Update Policies page (#4326)
Handles the multiple submit buttons on that page and closes #4319.

Contains some UI unifications with other pages and also shows the block explorers without needing to toggle the section via JS.
2022-11-22 10:27:27 +09:00
850c26dc13 POS: Fix null pointer
Introduced in #4307, the referenced object needs to be `itemChoice` instead of `choice`.
2022-11-21 22:07:46 +01:00
eda0f7327e fix monero issue 2022-11-21 19:55:19 +01:00
bf597495ff Fix: If reverse proxy wasn't well configured, and error message should have been displayed (#4322) 2022-11-21 19:32:19 +01:00
20025f254c Use the plugin builder website instead of docker to fetch plugins (#4285) 2022-11-21 10:23:25 +09:00
ec76acd3a6 Code analysis (#4293)
* Enable NETAnalyzers for whole project

- remove obsolete analyzers so that the .NET Core SDK NETAnalyzers can be used
- enable NETAnalyzers for all projects so that developers can use them by defining the AnalysisMode on individual projects

This is because if we set AnalysisMode to minimal, recommended or all it would spam with warning.
The idea is to be able to turn them on during development to fix recommended stuff without polluting the build output.

Following commits will implement some of the Code Analysis findings

* Performance hints for using char overloads for single characters (CA1834 and CA1847)

CA1834: Use StringBuilder.Append(char) for single character strings
CA1847: Use string.Contains(char) instead of string.Contains(string) with single characters
2022-11-20 17:42:36 +09:00
1e2acfb296 Disable internal node options if no internal node configured (#4315) 2022-11-20 14:22:36 +09:00
2bd4a680ad Fix tests 2022-11-20 14:19:48 +09:00
4ce504a1e1 Add index to WalletObjects + allow additional queries 2022-11-19 23:39:41 +09:00
d2f071b8b2 Make store creation field same width (#4311)
* Make store creation field same width

Closes #4306.

* Update CreateStore.cshtml
2022-11-19 11:29:34 +01:00
fdbd7b977a Merge pull request #4312 from btcpayserver/non-admin-wallet-warning
Refine non-admin wallet warning copy
2022-11-19 09:44:22 +01:00
d19961b7a0 Refine non-admin wallet warning copy
As [discussed on Mattermost](https://chat.btcpayserver.org/btcpayserver/pl/us4kscqsw7rzmnng7aarxczd5r).
2022-11-18 22:12:53 +01:00
c156254600 Validate cart cost with explicit amount 2022-11-18 16:50:26 +01:00
9b5c6ece90 Refactor walletobj API, make wallet object graph directionless (#4297) 2022-11-19 00:04:46 +09:00
bf91efc756 Add Lightning Service Torq (#4296) 2022-11-18 12:19:01 +01:00
a253fd5001 Small doc improve 2022-11-18 14:22:59 +09:00
52af129c8b Add crowdfund app create endpoint (#4068)
* Add crowdfund app create endpoint

* replace DateTimeJsonConverter with NBitcoin.JsonConverters.DateTimeToUnixTimeConverter

* Use DateTimeOffset instead of DateTime

* Use array instead of CSV

* update "startDate" and "endDate" docs definition

* update docs
2022-11-18 14:20:07 +09:00
3942463ac9 UI: Unify payment request list with invoices (#4294)
Some quick win updates to the payment requests list that unify the display with the invoices list:

- Status is displayed as badge
- Amount is properly formatted
- Expiry date format and ability to switch to relative date
2022-11-18 13:24:57 +09:00
ff572eef7f Use constants rather than magic strings in transaction attachments 2022-11-17 10:24:49 +09:00
2740dfea87 Greenfield: Wallet Objects (#4274)
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2022-11-16 12:11:17 +09:00
324112b73b Receipts: Fix amount paid discrepancy (#4287)
Displays the actual amount paid instead of the total invoice price. Fixes #4242.
2022-11-16 11:35:49 +09:00
1d7dee8314 Fix NRE and do nto activate onchain if node unavailable even when lazy payments (#4291)
fixes #4289
2022-11-16 09:04:51 +09:00
2d23819944 Greenfield: Allow marking payout status and payment proofs (#4244)
This allows external services to integrate with the payouts system to process payouts. This is also  a step to allow plugins to provide payout processors.

* It provides the payment proof through the greenfield payoust api.
* It allows you to set the state of a payout outside of the usual flow:
  * When state is awaiting payment, allow setting to In progess or completed
  * When state is in progress, allow setting back to awaiting payment
2022-11-15 18:40:57 +09:00
17f3b4125b Add option to customize the instance logo (#4258)
* Add option to customize the instance logo


Custom logo for BTCPay instances

* Incorporate SVGUse helper
2022-11-14 22:29:23 +09:00
c8a1024e24 Remove dead shitcoin MUE 2022-11-14 15:59:41 +09:00
9a2d2e2d89 Confirm modal: Prevent form submit without confirmation (#4262)
Fixes https://github.com/btcpayserver/btcpayserver/issues/4259
2022-11-13 12:38:13 +01:00
b7af234427 Payment Request: Fix invoice creation
Fix and test for a regression introduced with #4243: As the `PayPaymentRequest` action allows anonymous access, the `CookieAuthorizationHandler` isn;t run and hence the `GetCurrentStore` returns `null`.

This leads to an exception when creating the invoice. Store needs to be fetched seperately - like [before](4bbc7d9662 (diff-bdc264670a171e862d09fdf1a1c9f3ca14b41982a3c4c8e66d4f780cdde9f21dL241)).
2022-11-10 18:23:41 +01:00
a374e351e2 Use PluginLoader in the Plugin packer to prevent conflicts (#4277) 2022-11-09 15:28:16 +01:00
562f88555c Lightning: Better handling for non-public nodes (#4263)
Fixes #4246. 

`LightningLikePaymentHandler.GetNodeInfo` needed the `throws` argument to handle the cases as previously, otherwise the catch case in `ShowLightningNodeInfo` never occured.

State with this PR: A node can be available, but not have any public addresses. The latter will now be reported when testing the connection and on the public node info page.
2022-11-05 12:21:24 +01:00
167c5297fa Merge pull request #4268 from dennisreimann/supporters
Supporters: Remove Nomics; add SVGs for README
2022-11-05 12:17:11 +01:00
b281d09694 Bumping LND to 0.15.4-beta-1 (#4271)
* Bumping LND to 0.15.4-beta-1

* Bump LND in Altcoin docker-compose

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-11-05 12:15:04 +01:00
853a0ac5ea Remove old/unused images 2022-11-03 21:58:53 +01:00
ea948cfc3f Optimize SVGs 2022-11-03 21:55:11 +01:00
fdd13390fb Merge pull request #4267 from dennisreimann/fix-4266
Fix wording
2022-11-03 19:57:34 +01:00
b2f6f8b3c1 Supporters: Remove Nomics; add SVGs for README
The `img/readme` directory contains SVGs for the README, so that we can from now on use one markup for the supporters in all README files across our repositories. 

With these, we could finally get rid of the table layout for the supporters section in the README. This will make it much easier to maintain those.
2022-11-03 19:37:13 +01:00
cd12162b6f Fix wording
Closes #4266.
2022-11-03 13:13:03 +01:00
79717d1d64 Sync modal improvements (#4260) 2022-11-02 16:55:05 +01:00
e56cbf0baa Greenfield: Graceful return for in-flight HTLCs (#4252)
* Greenfield: Graceful return for in-flight HTLCs

Based on btcpayserver/BTCPayServer.Lightning#106 this closes #3781.

* Update descriptions
2022-11-02 21:03:34 +09:00
05232414ad Improve LN balance details toggle (#4253) 2022-11-02 18:48:23 +09:00
4bbc7d9662 [Greenfield] Can create an invoice for a payment request via Greenfield (#4243)
* [Greenfield] Can create an invoice for a payment request via Greenfield

* Add allowPendingInvoiceReuse so payment request invoices can be reused

* Add PayPaymentRequest to the LocalBTCPayServerClient

* Allow amount to be specified if same as PR amount
2022-11-02 18:41:19 +09:00
3805b7f287 Checkout v2 (#4157)
* Opt-in for new checkout

* Update wording

* Create invoice view update

* Remove jQuery from checkout testing code

* Checkout v2 basics

* WIP

* WIP 2

* Updates and fixes

* Updates

* Design updates

* More design updates

* Cheating and JS fixes

* Use checkout form id whenever invoices get created

* Improve email form handling

* Cleanups

* Payment method exclusion cases for Lightning and LNURL

TODO: Cases and implementation need to be discussed

* Introduce CheckoutType in API and replace UseNewCheckout in backend

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-11-02 18:21:33 +09:00
63620409a9 Allow config to set default block explorer link (#4249)
This logic can potentially be inside BlockExplorerLinkStartupTask instead but it's not a big deal imo
2022-10-31 11:41:31 +09:00
ba423a79e3 Fix Public Node Info View
As the Node Info was used as an ID, this didn't work with IPv6 addresses, as those contain characters not suitable for HTML IDs.

Fixes #4245.

Also: Simplify the head section of that view by reusing the existing partial.
2022-10-30 11:23:09 +01:00
8806ba76eb Fix: On some circumstances, clicking on cancel invoice and pay button in PaymentRequest would throw an exception 2022-10-27 15:50:35 +09:00
9e73260230 Fix: Invoice's orderId equals to payreq id shouldn't appear part of the payreq 2022-10-27 13:17:18 +09:00
c0125b83d1 UI: Improve access token pairing (#4237)
Closes #4133.
2022-10-27 08:57:54 +09:00
1fa297fb73 Add donate link (#4239)
* Add donate link

Closes #4173.

* Simplify wording
2022-10-27 08:56:44 +09:00
57557748e2 Greenfield: Fix missing payment data (#4233)
* Greenfield: Fix missing payment data

Fixes #4229.

* Client: Return payment data from PayLightningInvoice

* Add test for PayLightningInvoice response
2022-10-27 08:56:24 +09:00
8b79212a6e [Greenfield] Fix: The route to connect to a peer lightning node was always crashing 2022-10-26 13:35:04 +09:00
f4af4ec4dc Fix OpenAPI 3.0 validation errors and warnings (#4235) 2022-10-25 20:37:36 +09:00
2e150f4bf4 Checkout: Fix Order ID text overflow (#4232)
Fixes #4230. Thanks for the pointer @handsomelatino!
2022-10-25 10:46:00 +09:00
4f4aa051c9 Add missing route parameter in /api/v1/stores/{storeId}/users swagger (See #4231) 2022-10-24 16:33:42 +09:00
da1dd7448e Add warnings in btcpay vault page for safari and brave (Fix https://github.com/btcpayserver/BTCPayServer.Vault/issues/54) (#4226)
* Add warnings in btcpay vault page for safari and brave (Fix https://github.com/btcpayserver/BTCPayServer.Vault/issues/54)

* Apply suggestions from code review

Co-authored-by: d11n <mail@dennisreimann.de>
2022-10-21 09:13:36 +02:00
0fd47eeee0 Asset-bundle cleanups (#4225)
Some cleanups in addition to #4222.
2022-10-21 09:17:06 +09:00
54c9d7283a Fix: PayjoinController could throw HTTP 500 of a few corner cases (#4215) 2022-10-20 11:19:48 +09:00
848db5f7de Remove the bundle minifier (#4222) 2022-10-20 11:17:42 +09:00
5fb32fe0e9 Remove some debug code 2022-10-19 13:06:15 +09:00
adf5b4ca0c Fix sync modal z-index 2022-10-18 21:00:54 +02:00
16bfb1dbfe Bump libraries (#4219) 2022-10-18 23:58:28 +09:00
e5421b8a9f Add script to create a regtest multisig wallet for testing (#4204)
* Add script to create a regtest multisig wallet for testing

* Unload wallets to prevent having to specify wallet in BTCPay, NBXplorer
2022-10-17 20:57:09 +09:00
f9f1a22e3b Store settings: Add branding options (#4131)
* Add logo upload

* Add brand color definition

* Cleanups

* Add logo to store selector

* Improve brand color handling

* Update color input

* Add logo dimensions hint

* Fixes

* Fix pattern and warning in js logs for color validation

* Fix condition, add test

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-10-17 12:16:29 +02:00
9533809631 Bump NBitcoin (Fix #4212) 2022-10-17 18:47:49 +09:00
6d7c11f1b1 Greenfield: Get Lightning invoices (#4180)
* Greenfield: Get Lightning invoices

Matching the data added in btcpayserver/BTCPayServer.Lightning#98 and btcpayserver/BTCPayServer.Lightning#99.

* Small adjustments

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-10-17 09:51:15 +02:00
0286c72256 Do not crash startup if ssh settings aren't correct 2022-10-14 14:51:05 +09:00
763aaa2926 UI: Fix checkbox flex-shrink (#4209)
Closes #4207.
2022-10-13 22:48:45 +09:00
ae4af7dd13 Bumping LND to 0.15.2-beta (#4211) 2022-10-13 09:40:07 +02:00
4ae2ea32e9 UI: Fix missing timezone in browser dates (#4210)
Fix for an issue brought up by @petzsch in todays dev meeting.
2022-10-13 09:29:30 +02:00
434298cba6 Greenfield: Store Rates Config (#3931)
* Greenfield: Store Rates Config

* FIX SWAGGER

* rebase fix

* Apply suggestions from code review

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

* Update BTCPayServer/wwwroot/swagger/v1/swagger.template.stores-rates-config.json

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

* Fix: Spread isn't converted from/to percentage, rename some fields, and move some routes

* Fix error handling

Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-10-12 22:19:33 +09:00
a2fa688cde Refactor labels (#4179)
* Create new tables

* wip

* wip

* Refactor LegacyLabel

* Remove LabelFactory

* Add migration

* wip

* wip

* Add pull-payment attachment to tx

* Address kukks points
2022-10-11 17:34:29 +09:00
895462ac7f Import xpub: Surface error details (#4205)
Checks if the input is an output descriptor and explicitely handles that case instead of catching any errors. This allows us to display more detailed information about why an import might fail.
2022-10-11 12:19:10 +09:00
e883714446 Do not hide errors happening in tasks spawned by BaseAsyncService 2022-10-08 12:46:26 +09:00
e1a235b4e8 Changelog and bump (#4201) 2022-10-08 12:42:46 +09:00
ffa2c59df7 POS: Fix keypad view without custom amount (#4185)
The custom amount option was disabled by default in #4126. This requires some additional adaptations in the post action as otherwise the invoice won't be generated.

Fixes #4183.
2022-10-08 12:41:56 +09:00
3f19dc55fa Add "{Invoice.OrderId}" to list of supported email interpolation strings (#4202)
close #4112
2022-10-07 14:29:56 +02:00
66c2148a63 Increase tor test timeout 2022-10-07 16:04:22 +09:00
28850f534c Fix test warning 2022-10-07 15:05:11 +09:00
c40c11a822 bump ms aspnet packages (#4166)
* bump ms aspnet packages

* Bump .NET SDK in Dockerfile

* bump more packages

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-10-07 14:53:30 +09:00
b334e1aa00 Date display improvements (#4191)
Fixes styling issues introduced in #4074, because the `max-width` was to small for localized dates.

Also adds the ability to choose the prefered initial display format, which can be the localized or relative date.
2022-10-07 13:29:03 +09:00
b48986bfd6 Update default value for "showCustomAmount" in Swagger docs (#4200) 2022-10-07 13:27:10 +09:00
ced63baed6 fix custodian Swagger docs missing some path parameters (#4196) 2022-10-06 12:03:39 +02:00
880635d615 Make sure string is valid URL before rendering it as such in invoice details POS data section (#4197) 2022-10-06 10:43:18 +02:00
d9f8c8d3b1 Always show overpaid amount if invoice is overpaid (#4192)
close #4146
2022-10-06 12:59:05 +09:00
8155841a1d Fix receipts for Lightning Address invoices
`AdditionalData` needs to be null-checked, because it isn't set for invoices generated via Lightning Address. 

Fixes #4169.
2022-10-01 07:13:57 +02:00
30f83d8f3f Remove direct and temp link functionality from the File Storage (#4177) 2022-09-29 12:40:00 +02:00
96c86160df Fix warning error when rebooting the server caused by some shitcoin currency pair format 2022-09-29 15:45:27 +09:00
b7ea128132 Old Payout labels weren't displayed properly 2022-09-29 15:42:01 +09:00
4bee8e9bfe Greenfield: Extend LN GetInfo data (#4167)
Matching the data added in btcpayserver/BTCPayServer.Lightning#97.
2022-09-28 09:34:34 +09:00
bc195e771e Update WalletTransactions pagination default settings (#4074)
* Update WalletTransactions pagination default settings

Remove the numeric page selection and add displaying data of last 30 days by default.

* Update WalletTransactions to show txs based on Days

* Update text formatting on WalletTransactions view

Keeps the logic changes. Just undo the formatting of the file from previous commit

* Update WalletTransactions to show all after second load

Utilize Model.Days instead of new variables
Moved javascript code to PageFootContent section

* Update WalletTransactions to use ajax for infinite scroll

* Cleanups

* Apply skip and count only when not prefiltering

* Infinite scroll mode

* Improve datetime formatting and switching

* Upgrade NBXplorer to include get_wallets_recent bugfix

* Revert "Upgrade NBXplorer to include get_wallets_recent bugfix"

This reverts commit b390d942d74d88bb1da3ab8e3407184a527175ef.

* JS fixes

* Upgrade ChromeDriver and BundleMinifier

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-09-27 21:24:53 +09:00
0bc3e94052 bump 2022-09-26 22:51:49 +09:00
3eb3523b52 Changelog for v1.6.11 (#4130)
* Changelog for v1.6.11

* Update Changelog.md

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>

* Update Changelog.md

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>

* Update changelog

* Update changelog

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2022-09-26 22:50:59 +09:00
8e2f84a989 Upgrade Lightning libraries (#4164) 2022-09-26 22:48:47 +09:00
143ec7463f Fix crash on migration from old install (Fix #4162) 2022-09-26 22:00:49 +09:00
4a5fd08e51 Footer: Improve responsive display (#4163)
Enhancement in addition to #4160.
2022-09-26 10:29:35 +02:00
0306635a45 Merge pull request #4160 from daviogg/enhancement/4158-add-telegram-url
Add telegram icon and url on footer
2022-09-26 09:07:50 +02:00
0a4d32cdb5 Merge pull request #4161 from Bangalisch/SmallPageUpdate
Small update to Security.md
2022-09-26 09:07:33 +02:00
d590992d1d Fix crash on migration from old install (Fix #4162) 2022-09-26 10:31:04 +09:00
e8766946dd Improve currency selection (#4155)
Removes the current value on focus, so that the user gets to see the available options. If no selection or change is made, the value is reset to the previous value on blur.

Closes #4154.
2022-09-26 10:26:13 +09:00
8c35189b37 Small update to Security.md
Yo yo

Added title to page and ran it through Grammarly to slightly update the text.
2022-09-25 00:17:52 +02:00
e6390cde97 Add telegram icon and url on footer 2022-09-24 23:32:28 +02:00
db976a6408 Fix unit test and build warning 2022-09-23 16:41:51 +02:00
031c3ed055 Update README 2022-09-23 19:41:09 +09:00
cb391f08b9 Remove redundant exception status from invoice state label (#4151) 2022-09-23 15:17:50 +09:00
5387a6287e Fix pagination of wallet's transactions (#4150) 2022-09-22 10:39:48 +09:00
0e4544b2da POS - CustomAmount disabled by default also for App 2022-09-20 13:10:42 +02:00
e0cbb7bede POS - CustomAmount disabled by default 2022-09-20 13:10:42 +02:00
ed45b73274 Dashboard: Fix links in app tiles
Fixes #4144.
2022-09-20 10:10:54 +02:00
cadcb586a7 Fix settigs sidebar activation (#4138)
* Fix settigs sidebar activation

* remove active payout from settings

* Fix Store Settings nav highlight

Fixes #4134.

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-09-20 10:05:55 +02:00
9e31270459 Improve "Advanced Settings" button (#4140)
* Improve "Advanced Settings" button

Closes #4132.

* Use collapse toggle for multi-sig examples
2022-09-20 09:50:59 +02:00
dc07f046f2 Improve PayButton error page (#4129)
As this is a public page we should embed it in the non-navigation layout. Also improves the error display.
2022-09-19 21:56:42 +02:00
5032bbafb1 Consistent switch UI on Create Wallet views (#4135)
* ui+wallet: consistent switch ui update

* Cleanups

* Improve CTA wording

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-09-19 21:56:16 +02:00
1540bfb3a1 Merge pull request #4128 from bolatovumar/fix/4125 2022-09-17 09:38:54 +02:00
f3f5851118 Add missing store ID to invoice links
close #4125
2022-09-16 21:04:56 -07:00
9810edcd1a Fix Monero and Zcash nav extensions
They failed with an `System.NullReferenceException: Object reference not set to an instance of an object.` when navigating to a LNbank page, because LNbank uses Razor Pages and the controller part wan't defined. Brought up [on Mattermost](https://chat.btcpayserver.org/btcpayserver/pl/x3iohhct97nateyq4y1c4hp9mw).
2022-09-16 11:51:14 +02:00
e334b9162a Fix: Lnurl Max is set to min when item type is minmum
fixes #4108
2022-09-16 09:20:49 +02:00
836c676057 Upgrade Lightning lib 2022-09-15 16:57:57 +02:00
1abadd9c5d Update BTCPayServer/Storage/Services/FileService.cs 2022-09-15 16:26:22 +02:00
e8bd1d8237 FileService: Sanitize filename for downloaded files
Replaces invalid characters in filenames of files which are retrieved via URL.
2022-09-15 16:26:22 +02:00
8a7470500a Do not show set up wallet link in dashboard
fixes #4116
2022-09-13 16:14:46 +02:00
75689c665d Update source for urlib.min.js 2022-09-13 10:17:12 +02:00
d84f4f676b Document wider wallet import support 2022-09-13 10:17:12 +02:00
c97b859963 Refactor QR functionality
Based on the `ur-registry` upgrade I refactored the `CameraScanner` and `ShowQR` partials: Besides general code changes, the main change is that most of the configuration and result handling now happens on the outer view.
Those partials and functions are now generalized and don't know about their purpose (like handling PSBTs): They can be instantiated with simple data (e.g. for displaying a plain QR code) or different modes (like showing a static and the UR version of a QR code) and the result handling is done via callback.

The callbacks can now also distinguish between the different results (data as plain string vs. UR-type objects for wallet data or PSBT) and also handle the specific type of data. For instance: Before it wasn't possible to strip the leading derivation path from an xpub when scanning the QR code, because the scanner didn't know about the type of data it was handling. Now that the data is handled in the callback, we can implement that functionality for the scan view only.
2022-09-13 10:17:12 +02:00
6b8f4ee1d5 Remove bc-ur and upgrade ur-registry
Up to now we were supporting two versions of the UR standard: The legacy one implemented in `bc-ur` and the current version in `ur-registry`.
@Kukks forked a separate version of bc-ur for our web-bundle ([some more details](https://github.com/CoboVault/cobo-vault-blockchain-base/pull/8)), but it got hard to maintain the custom build, because the web-bundle needed manual assembly. We decided to get rid of the support for the legacy version and bc-ur, so that we can continue with the current version, which seems to be implemented across modern wallets (if they support UR at all). This way we can continue with only the `ur-registry` as a dependency, which handles encoding and decoding. 

I needed to make some modifications for the browser version of `ur-registry`. So I [forked their module to our org](https://github.com/btcpayserver/ur-registry) and I submitted the [modifications as PRs](https://github.com/KeystoneHQ/ur-registry/pulls) — hopefully we can eliminate our fork once those changes get merged. We are in contact with them and maintaining that fork wouldn't be as hard as the bc-ur one, because at least it has a working and automated build.
2022-09-13 10:17:12 +02:00
3532789c35 Improve Lightning Node setup examples (#4033)
* Catch connection string ToString errors

LNDhub connection string error fixed in btcpayserver/BTCPayServer.Lightning#92.

* Add Eclair bitcoin-host example

* Document LNDhub integration
2022-09-09 23:01:20 +09:00
267905b5e7 Reduce confusion 2022-09-09 13:49:24 +02:00
1626bd7a18 Show iframe when showing invoice in Shopify plugin
Close #4105
2022-09-09 13:49:24 +02:00
7106830be9 Make sure end date is after start date in Crowdfund app (#4084)
* Make sure end date is after start date in Crowdfund app

* Add null checks

* Add test case

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-09-09 19:26:11 +09:00
3b1946d65c bump lightning libs 2022-09-09 16:46:39 +09:00
6dedf4d44f Upgrade Lightning library to 1.4.1 (#4093)
This enables new feature of specifying `certfilepath`

Closes #2182
2022-09-09 14:33:17 +09:00
fe5e2584b1 Use mempool as default block explorer (#4100) 2022-09-09 14:32:40 +09:00
8fae38deca Set explicit cursor style property on pay button with custom text (#4107)
We need to set "cursor: pointer;" explicitly on pay buttons with custom text because the <button> HTML tag default pointer is not a cursor. This is not an issue for the default button because it uses the <input> tag which has "cursor: pointer;" by default in browsers.

Close #4104
2022-09-09 14:28:03 +09:00
7f8e322e9c Fixed text + simplification (#4109) 2022-09-09 14:27:49 +09:00
4d0f76f9e8 Update invoice amount description in Swagger template
Close #4067
2022-09-04 09:57:41 +03:00
5d2b42960b fix CanExportInvoicesJson 2022-08-30 09:16:17 +02:00
0098dacdff fix host in launchprofile 2022-08-30 09:16:17 +02:00
51666fbf0e fix CanUseInvoiceReceipts 2022-08-30 09:16:17 +02:00
defb9120fd Ensure apps can be deleted through UI
Bug was introduced by https://github.com/btcpayserver/btcpayserver/pull/3987
2022-08-26 11:23:00 +02:00
11ec72ce8c changelog and bump
(cherry picked from commit a661f08d7b97f44913221e3641f740274f8232b5)
2022-08-26 10:26:51 +02:00
f67bd69ecc do not try to mention payout ids/ pull payments if they were not saved for labels
fixes #4078
2022-08-26 09:41:48 +02:00
db2c29a6e1 PoS UI fix: scale-down item image (#4076) 2022-08-25 12:26:44 +02:00
e22e522245 LNURL: Fix missing route hints option
Fixes #4072.
2022-08-25 12:01:26 +02:00
7c8f4c0405 Allow specifing fee block target for onchain payout processor (#4065)
Co-authored-by: d11n <mail@dennisreimann.de>
2022-08-23 12:35:20 +02:00
01ab21e4c0 Dashboard: Fix app tiles
I broke this with #3987.
2022-08-23 12:07:18 +02:00
534a2912e1 Create dynamic manifest for pos apps (#4064)
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-08-21 20:38:14 +02:00
1456f4e227 Enhance export function for invoices (#4060)
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2022-08-21 08:43:23 +02:00
63e11451ba Rename PutPointOfSaleApp to UpdatePointOfSaleApp 2022-08-21 08:41:04 +02:00
7f80674cf2 Update Swagger docs 2022-08-21 08:41:04 +02:00
16f4ca5fbf Add support for updating POS app through Greenfield API
Part of #3458
2022-08-21 08:41:04 +02:00
701ba59bd8 Convert public app parts 2022-08-21 08:38:25 +02:00
8c6705bccb Make POS and Crowdfund plugins 2022-08-21 08:38:25 +02:00
e4542c4ac4 Paybutton: Fix logo and URL
Fixes #4053.
2022-08-20 11:32:09 +02:00
45eea1d6de API docs: Fix server base path
Introduced in #4041. Fixes #4059.
2022-08-20 11:31:28 +02:00
4aa94d5a13 bump btcpay to revert bug 2022-08-18 13:21:21 +02:00
b0253e11bf Revert "Allow bind and port for http too (#4031)"
This reverts commit a51c9d2b2dfd1b78ce99cb9c527f17a559660e43.
2022-08-18 13:12:29 +02:00
1a4a3714c7 Changelog for 1.6.8 2022-08-18 08:16:22 +02:00
999090dbdb Add Yadio exchange rate provider
Yadio is a service which provides exchange rates for many currencies such as the Lebanese Pound which have the real exchange rate which differs from the official rate significantly (32,525 LBP for USD real rate vs 1,510 official rate).

See more details here: https://yadio.io/info.html

See discussions here:
https://github.com/btcpayserver/btcpayserver/discussions/4001
https://github.com/btcpayserver/btcpayserver/discussions/2489#discussioncomment-3102370
2022-08-18 08:08:55 +02:00
13e3b515c9 Cleanse objects from obsolete altcoins 2022-08-17 21:23:16 +02:00
b6062a94b9 Explicitly disable fsize limit for some routes (#4045) 2022-08-17 10:18:30 +02:00
d0b26e9f69 Refactor Payouts (#4032)
Co-authored-by: d11n <mail@dennisreimann.de>
2022-08-17 09:45:51 +02:00
d6ae34929e Update launchSettings.json
Remove `BTCPAY_BTCEXTERNALLNDGRPC` because it is unsupported and not used anywhere in the app.

Use `http` for `BTCPAY_BTCEXTERNALLNDREST` because the HTTPS connection cannot be established.
2022-08-17 09:28:46 +02:00
a51c9d2b2d Allow bind and port for http too (#4031) 2022-08-17 09:11:13 +02:00
6c45ccc73d Add no rate found error message in Invoices (#4039) 2022-08-16 09:04:13 +02:00
6459c7bfad fix altcoin only dashboard crash
closes #4038
2022-08-15 20:22:31 +02:00
e6c1b0cf54 Merge pull request #4041 from dennisreimann/swagger-validation 2022-08-15 17:27:30 +02:00
c8558810ad Fix swagger validation errors
Combined the files with the same approach as in the docs:

`jq -rs 'reduce .[] as $item ({}; . * $item)' swagger.template.* > openapi.json`

Afterwards the bundled version can be validated using these commands:

`npx swagger-cli validate openapi.json && npx @redocly/cli lint openapi.json`
2022-08-15 15:59:26 +02:00
b0eb0b1de7 Merge pull request #4034 from dennisreimann/lnurl-controller-refactoring 2022-08-15 10:00:50 +02:00
6bdf31efda API docs: Fix duplicate speed policy schema
See the additional discussion in #3877. As we merged the Swagger JSON files for the docs, the duplicate store speed policy schema overwrote the updated invoice speed policy schema. This is now fixed by using a unified schema.
2022-08-15 06:20:10 +02:00
3cd2971cec Remove link to article that is no longer available 2022-08-14 11:19:25 +02:00
58784ebbfc Update ChromeDriver 2022-08-13 12:54:18 +02:00
de24a6e71b LNURL controller refactoring
By moving the `amount is null` check up, this prevents cases in which the `paymentMethodDetails.GeneratedBoltAmount != amount` check fails because of amount being null.
2022-08-12 20:10:44 +02:00
8c8a5a4f5e Edit view for Pull Payments (#4016)
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-08-11 14:30:42 +02:00
7f41a1ef09 bump and changelog for 1.6.7 2022-08-10 10:07:15 +02:00
15e1169f62 Fix Kraken rate provider 2022-08-10 08:20:41 +02:00
de92677b69 Custodian Account Deposit UI (#4024)
Co-authored-by: d11n <mail@dennisreimann.de>
2022-08-09 20:03:55 +02:00
377ed95130 Upgrade Lightning library 2022-08-09 19:57:43 +02:00
1b1c7ad3b1 Bind app server to 0.0.0.0 to make it accessible on the local network
This way it can be accessed with other devices on the local network. It helps test with mobile devices for instance.
2022-08-08 11:15:24 +02:00
e4e0fb0f35 Ensure store button shows up correctly before store is created
fix #3972
2022-08-07 20:44:28 +02:00
bf0cbf24e4 bump and changelog for 1.6.6 2022-08-06 17:07:41 +02:00
7d454a4c7b make sure entity state gets modified in payout processors 2022-08-06 17:05:29 +02:00
680f1470cf Update app store links, add Authy as two factor app 2022-08-04 12:49:53 +09:00
1854fd307f Fix tests and warnigns 2022-08-04 12:42:15 +09:00
6239f9da75 Bump 2022-08-04 12:11:21 +09:00
40e39b82e8 Fix several potential NullReferenceException (Fix #4017) 2022-08-04 12:08:13 +09:00
c71e671311 Added custodian account trade support (#3978)
* Added custodian account trade support

* UI updates

* Improved UI spacing and field sizes + Fixed input validation

* Reset error message when opening trade modal

* Better error handing + test + surface error in trade modal in UI

* Add delete confirmation modal

* Fixed duplicate ID in site nav

* Replace jQuery.ajax with fetch for onTradeSubmit

* Added support for minimumTradeQty to trading pairs

* Fixed LocalBTCPayServerClient after previous refactoring

* Handling dust amounts + minor API change

* Replaced jQuery with Fetch API + UX improvements + more TODOs

* Moved namespace because Rider was unhappy

* Major UI improvements when swapping or changing assets, fixed bugs in min trade qty, fixed initial qty after an asset change etc

* Commented out code for easier debugging

* Fixed missing default values

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-08-04 11:38:49 +09:00
2ea6eb09e6 Update changelog 2022-08-03 21:41:39 +09:00
55c39a12bc Checkout UI fix (#4015)
* Fix checkout UI bottom padding for paid state

* Improve public receipt form spacings
2022-08-03 21:31:16 +09:00
14cb65eb6a Minor refactor 2022-08-03 18:36:25 +09:00
a753459a6d Fix update webhooks (#4011)
* Fix update webhooks

* Update swagger for webhook update
2022-08-03 18:35:31 +09:00
bbce4451aa Add ability to mark auth handle as successful
Without this, there is no way to let the handle finish with a successful state. I somehow missed to add this in #3977.
2022-08-02 11:55:31 +02:00
1e378dd986 Plugins: Add authorization hook (#3977)
* Plugins: Add authorization hook

Makes the `PolicyRequirement` available to plugins.
Adds a filter hook to the authorization handlers, so that plugins can extend and leverage the existing authorization policies and permissions.

* Update to pass back and forth handle class
2022-08-02 14:20:16 +09:00
3db2b60b92 Add loopback client for local webhooks to skip ssl 2022-08-01 16:14:50 +02:00
2317a7df55 Make InvoicePaymentSettled return correct afterExpiration value
fixes #3966
2022-08-01 11:16:26 +02:00
c53fcde12a Do not crash when BTC network not available
fixes #4007
2022-08-01 10:44:39 +02:00
4be5eb39ff Make tx label endpoint not error 2022-07-28 15:33:28 +02:00
5ef31a96ea Provide error when plugin gets disabled due to crash 2022-07-28 15:31:34 +02:00
0d017c30e2 Fix: Joule -> Alby 2022-07-27 16:12:37 +09:00
92d85fa8a7 Added Alby, as Joule has been delisted on Chrome (#3934)
* Added Alby, as Joule has been delisted on Chrome

* Add files via upload
2022-07-27 16:11:42 +09:00
c2a0daedeb Bump versions of various deps (#3998) 2022-07-27 15:55:37 +09:00
51642bc4cc Update ListInvoices to say Settled instead of Paid (#4000)
Updated ListInvoices to say Settled instead of Paid

Co-authored-by: The Bitcoin Developer  <96552652+theBitcoinDeveloper@users.noreply.github.com>
2022-07-27 15:55:23 +09:00
c821208b5d Bumping LND to 0.15.0-beta (#3999) 2022-07-26 20:09:56 +09:00
a3d536bd51 Changelog and bump 2022-07-23 20:39:15 +09:00
f7262d12e6 Update lang 2022-07-23 20:37:56 +09:00
bec888da19 Payjoin label fixes (#3986)
* Payjoin label fixes

* When a payjoin label was applied, coin selection filter would not work
* When a payjoin happened with a receive address wallet, the payjoin label was not applied
* Coin selection shows when a utxo is currently reserved for a payjoin. Applies both to UI and to GF API

* remove reserved label

* Update BTCPayServer/Payments/PayJoin/PayJoinEndpointController.cs
2022-07-23 20:26:13 +09:00
2e6246e385 Move TagHelpers to Abstractions (#3975)
* Move TagHelpers to Abstractions

Makes them available for use in plugins. Also cleans up the tag helper references in the view code: As we have it in the root view imports, the individual directives in the views are superfluous.

* Move CurrenciesSuggestionsTagHelper back

To get rid of the Rating dependency in Abstractions.
2022-07-22 21:58:25 +09:00
a9a0bf01ad Design updates (#3981)
Contains the following design system PRs:
- btcpayserver/btcpayserver-design#50
- btcpayserver/btcpayserver-design#51
- btcpayserver/btcpayserver-design#52
2022-07-22 21:53:13 +09:00
8dd3c76fa4 Make it work with decimal discount values 2022-07-22 13:31:41 +02:00
a7c22399d8 Minor JS improvements 2022-07-22 13:31:41 +02:00
04cb8a2fe0 Minor toggle improvement 2022-07-22 13:31:41 +02:00
494739f771 Add discount option for Keypad POS app type
See https://chat.btcpayserver.org/btcpayserver/pl/ju5bu6r8qjfe9mrxdri3kihpby for details
2022-07-22 13:31:41 +02:00
6fbcc9a244 Fix Crowdfund + additional issues (#3994)
* Show free when invoice is fixed and 0 amount in apps
* animations on crowdfund not enabled broke JS
* Perk expansion in crowdfund was broken
2022-07-22 20:30:39 +09:00
d016f59867 Coin Selection: Fix responsive display (#3992)
Fixes #3985.
2022-07-22 20:29:53 +09:00
88f8f3938c Make app invoices show link to app in receipt (#3995) 2022-07-22 20:29:34 +09:00
1322fd97f6 Revert "Redirect instead of show 404 on 0 amount invoices"
This reverts commit 7f617df4e851b296bb5181a1f99df066fa704727.
2022-07-22 06:21:41 +02:00
7f617df4e8 Redirect instead of show 404 on 0 amount invoices
fixes #3904
2022-07-21 14:33:39 +02:00
b02542f3be Do not crash on bad language file 2022-07-21 11:09:51 +02:00
5fd620556e Fix Local client
This cleans up the client factory for plugins so that it is less hectic looking. Additionally, it fixes a bug where if you reuse the factory after setting a store, the state might stick.
2022-07-20 18:20:14 +02:00
218d64d8df Update Changlog, and bump 2022-07-15 12:47:15 +09:00
e8291eb00e Move ConfirmModel to Abstractions (#3964)
To make it available to plugins.
2022-07-15 12:38:33 +09:00
f8619e382b Fix LN Address payouts (#3960)
* Fix LN Address payouts

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

* reuse code

* reuse code

* do not use mail directly

* fix email validator
2022-07-15 12:37:47 +09:00
83c35328ed Fix: No pager in the wallet transactions list 2022-07-15 12:35:57 +09:00
f548d78907 Merge pull request #3965 from dennisreimann/new-supporters
Supporters: Add Strike and HRF
2022-07-12 15:31:30 +02:00
5aca8b41af Supporters: Add Strike and HRF 2022-07-12 15:14:02 +02:00
a7b6f3fa19 Redirect to dashboard instead of apps list on app delete (#3941)
close #3898
2022-07-12 15:18:08 +09:00
afb989d72e Fix lnurl withdraw modal (#3955)
* Fix lnurl withdraw modal

fixes #3949

* Fix test
2022-07-12 15:17:44 +09:00
12c96c7a74 Fix webhook display bug (#3959)
Specific events list now displays correctly when modifying specific events webhook
2022-07-12 12:37:02 +09:00
79bfffd77b Invoice summary: Fix indentation and heading levels (#3956) 2022-07-12 12:35:19 +09:00
58d68e7e31 Update changelog 2022-07-11 23:42:15 +09:00
499352e51c Fix the ExchangeSharpRateProvider for some pairs 2022-07-11 23:39:11 +09:00
03fbd51fab bump 2022-07-11 23:13:35 +09:00
bd73cac1a1 Fix: For some asset pair the kraken rate was inverted (Fix #3957) 2022-07-11 23:09:35 +09:00
0c43fda86d Prevent stackoverflow exception when ripio is unavailable 2022-07-11 23:08:59 +09:00
a64b8fb310 Update test plugin with more data related functionality 2022-07-11 11:29:57 +02:00
316d39f24c Update Changelog 2022-07-09 11:29:33 +09:00
265e2930f1 bump 2022-07-08 16:54:35 +09:00
9511cf8d8a Update changelog (#3913) 2022-07-08 16:53:41 +09:00
b86f0a7d9c Make BTCPay ssh key using safe algo 2022-07-08 16:32:43 +09:00
19be847624 Do not use Renci.SSH in tests 2022-07-08 16:30:52 +09:00
15e45ac4ec Bump SSH.NET 2022-07-08 16:08:21 +09:00
86572635df Fix build 2022-07-08 16:05:40 +09:00
4a5c51d7a3 Update sln 2022-07-08 12:43:11 +09:00
8530cf3535 Make sure we do not expose lightning services if not admin 2022-07-08 12:42:36 +09:00
eec54831ef Update lightning lib, on-chain balance shouldn't be lightmoney (#3945) 2022-07-08 10:55:26 +09:00
a41e98910d Update langs 2022-07-08 10:41:43 +09:00
be985466a3 Add payouts docs link (#3942) 2022-07-08 10:27:04 +09:00
98fb46957a Add error message when invoice could not be created (#3943)
If user requested to create an invoice for a payment method which is not set up for their store we currently return a generic error. This PR updates the logic so that we return a more specific error in this case.

closes #3830
2022-07-08 10:23:26 +09:00
2abc35058b Custodian Account UI: CRUD (#3923)
* WIP New APIs for dealing with custodians/exchanges

* Simplified things

* More API refinements + index.html file for quick viewing

* Finishing touches on spec

* Switched cryptoCode to paymentMethod as this allows us to differentiate between onchain and lightning

* Moved draft API docs to "/docs-draft"

* WIP baby steps

* Added DB migration for CustodianAccountData

* Rough but working POST /v1/api/custodian-account + GET /v1/api/custodian

* WIP + early Kraken API client

* Moved service registration to proper location

* Working create + list custodian accounts + permissions + WIP Kraken client

* Kraken API Balances call is working

* Added asset balances to response

* List Custodian Accounts call does not load assetBalances by default, because it can fail. Can be requested when needed.

* Call to get the details of 1 specific custodian account

* Added permissions to swagger

* Added "tradableAssetPairs" to Kraken custodian response + cache the tradable pairs in memory for 24 hours

* Removed unused file

* WIP + Moved files to better locations

* Updated docs

* Working API endpoint to get info on a trade (same response as creating a new trade)

* Working API endpoints for Deposit + Trade + untested Withdraw

* Delete custodian account

* Trading works, better error handling, cleanup

* Working withdrawals + New endpoint for getting bid/ask prices

* Completed withdrawals + new endpoint for getting info on a past withdrawal to simplify testing, Enums are output as strings,

* Better error handling when withdrawing to a wrong destination

* WithdrawalAddressName in config is now a string per currency (dictionary)

* Added TODOs

* Only show the custodian account "config" to users who are allowed

* Added the new permissions to the API Keys UI

* Renamed KrakenClient to KrakenExchange

* WIP Kraken Config Form

* Removed files for UI again, will make separate PR later

* Fixed docs + Refactored to use PaymentMethod more + Added "name" to custodian account + Using cancelationToken everywhere

* Updated withdrawal info docs

* First unit test

* Complete tests for /api/v1/custodians and /api/v1/custodian-accounts endpoints + Various improvements and fixes

* Mock custodian and more exceptions

* Many more tests + cleanup, moved files to better locations

* More tests

* WIP more tests

* Greenfield API tests complete

* Added missing "Name" column

* Cleanup, TODOs and beginning of Kraken Tests

* Added Kraken tests using public endpoints + handling of "SATS" currency

* Added 1st mocked Kraken API call: GetAssetBalancesAsync

* Added assert for bad config

* Mocked more Kraken API responses + added CreationDate to withdrawal response

* pr review club changes

* Make Kraken Custodian a plugin

* Re-added User-Agent header as it is required

* Fixed bug in market trade on Kraken using a percentage as qty

* A short delay so Kraken has the time to execute the market order and we don't fetch the details too quickly.

* Merged the draft swagger into the main swagger since it didn't work anymore

* Fixed API permissions test

* Removed 2 TODOs

* Fixed unit test

* After a utxo rescan, the cached balance should be invalidated

* Fixed Kraken plugin build issues

* Added Kraken plugin to build

* WIP UI + config form

* Create custodian account almost working - only need to add in the config form

* Working form, but lacks refinement

* Viewing balances + Editing custodian account works, but cannot change the withdrawal destination config because that is an object using a name with [] in it

* cleanup

* Minor cleanup, comments

* Working: Delete custodian account

* Moved the MockCustodian used in tests to a new plugin + linked it to the tests

* WIP viewing custodian account balances

* Split the Mock custodian into a Mock + Fake, various UI improvements and minor fixes

* Minor UI fixes

* Removed broken link

* Removed links to anchors as they cannot pass the tests since they use JavaScript

* Removed non-existing link. Even though it was commented out, the test still broke?

* Added TODOs

* Now throwing BadConfigException if API key is invalid

* UI improvements

* Commented out unfinished API endpoints. Can be finished later.

* Show fiat value for fiat assets

* Removed Kraken plugin so I can make a PR


Removed more Kraken files

* Add experimental route on UICustodianAccountsControllre

* Removed unneeded code

* Cleanup code

* Processed Nicolas' feedback

Co-authored-by: Kukks <evilkukka@gmail.com>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-07-07 22:42:50 +09:00
35f97a6013 Add link to the order id if there is a orderUrl 2022-07-07 21:55:00 +09:00
b8d509eb12 Show order id in invoice details even if orderUrl is not present 2022-07-07 21:54:45 +09:00
d6f13be95f Redirect to invoice details instead of list upon creation (#3936)
* Redirect to invoice details instead of list upon creation

close #3909

* fix tests
2022-07-07 21:47:59 +09:00
4dad27bb76 Add v1.6.0 to the What's New modal (#3932) 2022-07-07 12:41:13 +09:00
efe1686c05 Don't show "Set up a Lightning node" when LN is not supported (#3935)
See discussion here: https://github.com/btcpayserver/btcpayserver/discussions/3868
2022-07-07 10:38:51 +09:00
09462e6877 Enhance Store email capability (#3911)
* Enhance Store email capability

Currenty the new email rules can send an email when an invoice event occurs. However, there is currently no way to customize the email based on the invoice, making the feature a bit useless.

This PR:
* adds the rich text editor to the body input
* allows you to use some of the properties from the Invoice (based on greenfield api properties. I've taken a imple approach for now using just  a string.replace mechanism, but we can update this to a dynamic linq approach so that users can customize further (e.g. `{Invoice.Metadata["something"].ToString().ToUpper()}`)

NOT READY:
Since this all takes place as a background service, there is an issue around how to handle items such as the "checkout link", as we are not aware of the btcpay url at that moment. Thoughts? @nicolasdorier

* fix typo and make it simpler for now

* remove dditor
2022-07-06 22:17:33 +09:00
612a0397a7 Make LNURL enabled when only method (#3930)
* Make LNURL enabled when only method

This fixes the scenario where LNURL for standard invoices are disabled, but the POS Print view only shows LNURL, so the QR code would always error out. The fix is to bypass the setting when lnurl is the only enabled payment method on the invoice

* Make sure not to affect other flows

* fix
2022-07-06 22:09:05 +09:00
3576ebd14f Public Invoice receipt (#3612)
* Public Invoice receipt

* implement payment,s qr, better ui, and fix invoice bug

* General view updates

* Update admin details link

* Update view

* add missing check

* Refactor

* make payments and qr  shown by default
* move cusotmization options to own ReceiptOptions
* Make sure to sanitize values inside PosData partial

* Refactor

* Make sure that ReceiptOptions for the StoreData is never null, and that values are always set in API

* add receipt link to checkout and add tests

* add receipt  link to lnurl

* Use ReceiptOptions.Merge

* fix lnurl

* fix chrome

* remove i18n parameterization

* Fix swagger

* Update translations

* Fix warning

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-07-06 21:14:55 +09:00
2a190d579c Show lightning balances even of 0 2022-07-06 15:40:00 +09:00
67abc107c5 Do not prefilter if label filter in transaction view 2022-07-06 13:00:41 +09:00
9ec2052428 ui+stores: updates switches ui to be consistent with other switches (#3929) 2022-07-06 12:43:22 +09:00
657423207b Async dashboard (#3916)
* Dashboard: Load Lightning balance async, display default currency

* Simplify approach, improve views and scripts

* Async tiles


Async tiles

* Add period for app sales

* Fix missing keypad view sales

* Fix after rebase

* Fix awaited call

* Fix build

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2022-07-06 12:40:16 +09:00
19aaff2345 Merge pull request #3928 from dennisreimann/build-warnings
Fix build warnings
2022-07-06 12:16:15 +09:00
8873c51f2b Merge pull request #3926 from NicolasDorier/improveperfbigwallet
Improve performance of on chain transaction listing for big wallets
2022-07-05 14:54:27 +09:00
2ba24ba56b Tests should use explorer.postgres 2022-07-05 14:39:50 +09:00
52f5d21480 Improve performance of on chain transaction listing for big wallets 2022-07-05 14:23:13 +09:00
0405cda9d6 Fix build warnings 2022-07-04 19:05:25 +02:00
b422e79896 Add test cases for wallet send wizard links (#3927) 2022-07-04 21:59:46 +09:00
181d4d5ea4 Improve wallet nav (#3921)
* Fix rescan nav highlighting

* Wallet send wizard

* Wallet receive wizard

* Consistent wizard back button behaviour
2022-07-04 13:20:08 +09:00
f30ddbf175 Fix spurious crash at shutdown 2022-07-04 13:17:36 +09:00
2c3b8d8925 Dashboard: Load Lightning balance async, display default currency (#3907)
* Dashboard: Load Lightning balance async, display default currency

* Simplify approach, improve views and scripts

* Remove LightMoney converters
2022-07-04 11:03:16 +09:00
2e2c6aef83 Fix warning 2022-07-02 20:39:34 +09:00
e511538ba6 Fix: Local client factory when no user is specified would fail on some edge case auth scenarios 2022-07-01 09:03:32 +02:00
c12e08ef01 Open public app views in new tab/window (#3920) 2022-07-01 13:31:11 +09:00
0970944ee4 Add refund badge to invoice lists (#3918)
* Add refund badge to invoice lists

* fix badge
2022-07-01 13:26:00 +09:00
4eabe91cee remove lnurl from crowdfund as per requests 2022-06-30 14:25:52 +02:00
cf747f1e07 Fix missing refund flow error message
Fixes #3919.
2022-06-30 14:25:15 +02:00
e5a1da7136 Fix: Refund flow failed when lnurl was the only payment method 2022-06-30 08:52:56 +02:00
27b6cf436b fix cheat mode when default payment is not onchain 2022-06-30 08:46:34 +02:00
e4866a8265 Can disable cert check for email server (#3908) 2022-06-29 23:38:44 +09:00
d90cc02e5a CI: Try docker-compose pull several times 2022-06-29 23:37:38 +09:00
23a1a8e3f5 Add title on link of ln services in the dashboard 2022-06-29 23:31:25 +09:00
b8f1c0df09 Create interface for providing store id to plugins (#3910) 2022-06-29 23:18:02 +09:00
ed1f249aaf Fix empty permissions case 2022-06-29 15:36:54 +02:00
eef7539c2d Fix selective stores case 2022-06-29 15:36:54 +02:00
1bb35bf545 Limit selection to one store 2022-06-29 15:36:54 +02:00
2b9cb4a257 Better handling of confirm case (existing API key) 2022-06-29 15:36:54 +02:00
209cff8888 View improvements 2022-06-29 15:36:54 +02:00
9e253ac7a3 Test improvements 2022-06-29 15:36:54 +02:00
27c5b16957 Improve views; fix tests 2022-06-29 15:36:54 +02:00
2f1df3be7d Autofocus confirm modal input 2022-06-29 15:36:54 +02:00
bb4a28ecd8 Refactor Authorize UI
Closes #2902.
2022-06-29 15:36:54 +02:00
54c20b26cc Fix NRE 2022-06-29 15:33:48 +02:00
4a71b952b6 Revert "Fix: If SMTP port is 25, SSL shouldn't be used"
This reverts commit 9423bc4ea71747809b029dadfdf3545d5a6d0b68.
2022-06-29 15:12:30 +09:00
3d7f628014 Support Lnurl Withdraw in pull payments (#3709)
* Support Lnurl Withdraw

* cleanup and small fixes

* remove putin brace
2022-06-28 23:02:17 +09:00
c63529ea99 Fix: Warnings and view build issues during dotnet publish (#3902) 2022-06-28 17:38:59 +09:00
d43bdcc1a2 UI: Fix cancel plugin command (#3903)
* UI: Fix cancel plugin command

As installing a plugin also adds the delete/uninstall command, we just select the last action, which is the one the user triggered. 

Fixes #3890.

* Apply suggestions from code review

https://stackoverflow.com/questions/50100688/check-if-value-tuple-is-default
2022-06-28 17:38:47 +09:00
a4aa6c5ab9 Fix email rule remove action (#3901)
It simply exited to early by returning the view. The updated rules didn't get saved afterwards.
2022-06-28 14:10:45 +09:00
6d3e1bb40a Dashboard: Add Point Of Sale data (#3897)
* Dashboard: Add Point Of Sale data

Closes #3675.

* LNURL: Add POS redirect URL

* POS: Fix invoices link

* Fix integration tests

* Simplify data aggregation

* Improve chart display
2022-06-28 14:05:02 +09:00
9428347cb6 Crowdfund finetuning (#3488)
* Update crowdfund defaults

* Crowdfund: Move sound, animation and discussion into additional options

* Update sound URLs

Fixes #3745.

* Update featured image URL label

* Improve the recurring goal section

* Crowdfund: Goal section finetuning
2022-06-28 12:03:13 +09:00
618666abf1 bump mailkit 2022-06-27 10:58:57 +09:00
9423bc4ea7 Fix: If SMTP port is 25, SSL shouldn't be used 2022-06-27 10:54:02 +09:00
95b9e4dfd9 Add basic Greenfield API Get and Delete operations for apps (#3894)
* Add basic Greenfield API Get and Delete operations for apps

Will follow-up with PATCH and also with GET which returns more than just basic data later. This sets up the basic stuff first.

* Add methods to LocalBTCPayServerClient
2022-06-27 10:14:16 +09:00
61c6a2ab57 Greenfield: Add balance endpoint (#3887)
* Greenfield: Add balance endpoint

* Remove superfluous try/catch
2022-06-23 13:42:28 +09:00
c89f7aaaed Improve email settings validation and UX (#3891) 2022-06-23 13:41:52 +09:00
c2d72e71aa Store Emails (#3611)
* Store Emails

* fix test

* Update email rules layout

* Cleanups

* Test cleanups

* Add back comments

* Update view; add test

* Show email rules link even if email settings aren't completed

* Validate email addresses

* No redirect, display warning

* Fix test

* Refactoring: Change email argument types to MailAddress

* Test fix

* Refactoring: Use MailboxAddress

* Parse emails properly in controllers and backend

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-06-22 12:05:32 +09:00
af93cf2adb Lightning balance: Handle null values (#3886)
* Lightning balance: Handle null values

* Upgrade Lightning lib
2022-06-21 16:09:18 +09:00
7a75a8c254 Fix nav height issue on mobile devices (#3888)
close #3807
2022-06-21 13:04:50 +09:00
0aa7dacbca Add spam rate limits for public invoice endpoints (Fix #3782) (#3889) 2022-06-21 12:33:20 +09:00
9d41a52d3b Remove Store ID from Store Settings & various minor UI tweaks (#3881)
* ui+layout: update main container padding

* ui+invoice: updates archive button

* ui+users: updates search input
2022-06-20 16:02:12 +09:00
c943303a45 Dashboard balance fixes (#3876)
* Fix wallet balance for case crypto code == default currency

* Handle old NBXplorer backend case

* Cleanup
2022-06-20 14:31:22 +09:00
b2a5b3c3c4 Fix tests 2022-06-20 13:36:01 +09:00
495d4b82cf Fix warning from CLI parser (#3875) 2022-06-20 13:07:58 +09:00
ea2a200302 Adding description to speedPolicy parameter. (#3877) 2022-06-20 13:07:24 +09:00
c531b26821 Updates Crowdfund & POS Modal (#3806)
* ui+cf: updates perks modal

* Toggle editor with Bootstrap

* Add currency info to app items

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-06-20 11:55:47 +09:00
cade6c6c38 Move View action to the Name column in Payouts & Payment Requests (#3873)
* ui+paymentrequest: moves 'view' link to name

* ui+pull: moves 'view' link to name column

* Update links, fix tests

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-06-20 11:52:12 +09:00
c56821300a Server Settings: Consolidate Storage and Files (#3863)
* Server Settings: Consolidate Storage and Files

* Improve storage options name display

* Remove file services from services page

* Remove more code
2022-06-15 21:06:16 +09:00
346821f0d6 Added toggle button to switch to store default currency (#3752)
* Added toggle button to switch to store default currency

* Replaced ["usd"] with the currency variable

* Fix indentation and improve JS part

* Update script and display

* Improve chart display

* Improve rate display

* Address code review comments

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-06-15 16:33:24 +09:00
0da97c5da3 Report shopify errors to the UI (Fix #3853) 2022-06-15 14:12:47 +09:00
f0e013e1f8 Make Pay Button a plugin (#3862)
* Move files

* Fix potentially missing default payment method

Before, it got removed if any other value was changed besides the default payment method.

* Fix missing store data

* Update BTCPayServer/Plugins/PayButton/PayButtonPlugin.cs

Co-authored-by: Pavlenex <pavle@pavle.org>

* Update pay button warning

Closes #3535.

Co-authored-by: Pavlenex <pavle@pavle.org>
2022-06-15 11:32:46 +09:00
8a144f3c35 removes plugin (#3805) 2022-06-15 11:19:02 +09:00
f48bb5a40a Fix build warnings (#3870)
Fixes #3866.
2022-06-15 11:17:10 +09:00
3abde67671 Merge pull request #3865 from dennisreimann/fullynoded
Update Fully Noded link
2022-06-14 19:22:32 +02:00
59b2e2dba1 Update Fully Noded link 2022-06-14 10:01:10 +02:00
479f21f4f3 Dashboard: Add Lightning balances and services (#3838)
* Update Lightning lib

* Refactoring: Move Lightning methods and props to ExternalServices

* Rename Lightning services

* Add Lightning balance to dashboard

* Split Lightning dashboard tiles

* View updates
2022-06-14 14:36:22 +09:00
4a0f10ea99 Support LN connection string with onion http client (#3845)
I'm not sure if onion based ln conenction strings ever worked in btcpay? closes #1648
2022-06-13 16:22:26 +09:00
9a24e4ade1 Store Settings feature with own table (#3851)
* Store Settings feature with own table

* fix test

* Include the store settings to StoreRepository, remove caching stuff

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-06-13 13:36:47 +09:00
4691e896a1 Fix invoice index migration 2022-06-13 12:37:38 +09:00
869411a977 ui+dashboard: small margin tweaks (#3856) 2022-06-13 10:48:36 +09:00
68bd40d2a4 Improves Invoice Summary accordion view (#3859)
* ui+site: moves invoice css

* ui+invoice: improves invoice summary and partials
2022-06-13 10:47:26 +09:00
cb8fe24a77 Add new issue forms for filing Bug Reports (#3846)
* remove old .md template, add new issue form

* Update .github/ISSUE_TEMPLATE/bug_report.yml

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

* Update .github/ISSUE_TEMPLATE/bug_report.yml

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

* change browser from drop down to textfield

* fix github yaml validation

* enable blank templates

* emoji consistency

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
Co-authored-by: d11n <mail@dennisreimann.de>
2022-06-10 13:35:31 +02:00
eb65949b69 Mobile header improvements
- Moves the menu button to the left, besides the logo
- Improves width and text display of the store selector
 
Closes  #3826.
2022-06-10 09:11:26 +02:00
fdf6f68624 Remove unused "using" directive 2022-06-10 08:39:01 +02:00
d0e01768ab Allow excluding unconfirmed UTXOs when creating a new transaction with Greenfield API
See original request: https://github.com/btcpayserver/btcpayserver/discussions/3737
2022-06-10 08:39:01 +02:00
fd3d389557 Notifications: Fix mark all as seen return URL
Fixes the return URL for the case in which the dropdown content got replaced after a notification update: As the refresh request is done via AJAX, the return URL previously was `/notifications/getnotificationdropdownui` (the `Context.Request.GetCurrentPathWithQueryString()` value of the AJAX action).

We need to pass in the URL of the actual current page as the return URL.
2022-06-10 08:17:06 +02:00
3d63e12c9e fix test 2022-06-09 12:43:28 +02:00
ac6770bdff Add Buda rate provider for CLP
closes #3766
2022-06-09 12:01:40 +02:00
2ad2ce6c3b Fixed issue with users when disabling then setting admin
Concurrency issue; moved user update from controller to service
2022-06-07 13:04:21 +02:00
fcbe1dd8eb Fix: Local Client Factory was not properly handling the override for auth (#3799)
* Fix: Local Client Factory was not properly handling the override for auth

* implement nonimplemented method
2022-06-06 22:57:55 +09:00
df618d1aa2 Simple Notification Modal Improvement (#3784)
* ui+layout: updates notification modal overlay

* Update BTCPayServer/wwwroot/main/layout.css

Co-authored-by: d11n <mail@dennisreimann.de>
2022-06-06 18:58:57 +09:00
b846f16e6c ui+pos: update notification copy (#3801) 2022-06-06 18:58:32 +09:00
51ab9746de UI: Minor 2FA improvements (#3812)
Styles the "Remember me" checkbox on login and sets a proper width for the verification code field.
2022-06-06 18:57:42 +09:00
ae10d0c7fd Bump and fix rate providers (#3813)
* Bump and fix rate providers

* fix
2022-06-06 18:56:50 +09:00
a443426d83 Fix remove and enable issues with non-last-admin
"Remove" issue likely due to multiple context instances. "Enable" issue due to conditional check.

Discovered bug with users when first disabling, then marking as admin, which remains an issue.
2022-06-06 10:43:06 +02:00
f2aa4d4484 fix swagger test 2022-06-06 10:40:57 +02:00
4579dc9385 Update UIManageController.APIKeys.cs
Fixed grammar.
2022-06-06 10:36:17 +02:00
8ef8c97072 Refactoring: Bitpay Rate Controller
Some tweaks I did when working on #3752.
2022-06-06 10:34:52 +02:00
84fcd1c1b5 Add custom bg and border classes 2022-06-06 10:32:15 +02:00
d0e6bcd784 ui+payout: removes border 2022-06-06 10:32:15 +02:00
1142ff884e Update payment data partials 2022-06-06 09:41:23 +02:00
29080e9d7d Add Refunds list to Invoice details page
(this is missing the refunded badge and progress as I have another PR that makes this easier to compute to show)
2022-06-06 09:41:23 +02:00
04c3191795 Layout cleanups
Just some minor cleanups
2022-06-06 09:33:19 +02:00
9d75225bd5 Redirect create and edit payment request to list view upon completion
Create and edit now redirect to list view. Both actions use the same method. Also updated notification message.

Kept extraneous redirect value for xUnit tests. Update selenium test to account for redirect to list view.
2022-06-06 07:53:41 +02:00
ce85bd26df Fix change domain documentation link 2022-06-03 10:49:28 +02:00
ba0e46b465 Improve payouts UI (#3792)
* Improve payouts UI

* Display units

* Update badges

* Update badge background
2022-06-02 11:03:06 +02:00
5616b7550f Improve Refund Flow (#3731) 2022-06-02 10:08:55 +02:00
fcd6159b42 Merge pull request #3511 from bolatovumar/feat/api/apps
Add support for creating POS apps through Greenfield API
2022-06-02 14:13:25 +09:00
02e5e1bc1e Fix CheckNoDeadLink which can enter in infinite loop 2022-06-02 13:26:14 +09:00
6d83a00728 Rename tags of PoS API in swagger 2022-06-02 13:07:02 +09:00
d697c2ac9e Add fallback values for buttons 2022-05-31 22:27:03 -07:00
c917aec401 Add PosViewType enum 2022-05-31 22:25:04 -07:00
89c1b94a12 Dashboard: Do not display archived invoices in recent invoices
Fixes #3783.
2022-05-31 13:20:16 +02:00
46b9760179 Greenfield: Fix GetDepositAddress return type (#3790)
The local clients GetFromActionResult cannot handle the JValue return type, because it gets invoked with GetFromActionResult<string>.
2022-05-31 19:15:38 +09:00
ff66e66f21 PluginPacker: Shell fallback for macOS/Linux 2022-05-30 11:47:06 +02:00
b1f62f74cd Update language to explicitly request view-only wallet files
Right now the tooltips displayed do not specify using a view-only wallet, but there is no reason to upload full keys to BTCPay Server and view-only keys are actually the BTCPay Server recommendation.

Updated language in the UI to reflect that and made some minor improvements to the other language used in the UI here.
2022-05-29 12:12:55 +09:00
a0d0f1f98b Error when broadcasting transactions weren't shown in the UI 2022-05-28 21:36:42 +09:00
f08f064bc6 add changelog and bump 2022-05-28 14:05:16 +02:00
20d653798c After a utxo rescan, the cached balance should be invalidated 2022-05-28 10:21:55 +02:00
a9e08dd587 Allow resending verification email for users (#3726)
* Allow resending verification email for users

Partially address #3645

* Replace RequiresEmailConfirmation with Verified

* Use confirmation modal

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-05-27 13:36:47 +09:00
5dba4a2201 Merge pull request #3778 from dennisreimann/pp-sats
Allow pull payments denominated in SATS to be claimed
2022-05-25 20:59:42 +09:00
c964870416 Allow pull payments denominated in SATS to be claimed
Fixes #3750.
2022-05-25 12:59:57 +02:00
cfbf081cac bump 2022-05-25 19:33:39 +09:00
bad429e853 Merge pull request #3777 from NicolasDorier/fuowiuiq
Fix: Invoices from shopify had empty orderId (Fix #3769)
2022-05-25 19:32:28 +09:00
8ce7466dc1 Fix: Invoices from shopify had empty orderId (Fix #3769) 2022-05-25 19:10:49 +09:00
1ffa067d5f Merge pull request #3775 from dennisreimann/wallet-export-ui-fixes
Wallet export UI fixes
2022-05-25 18:16:28 +09:00
b595763446 Wallet export UI fixes 2022-05-24 16:13:45 +02:00
e7180ac82a Merge pull request #3774 from NicolasDorier/wiobq
Improve performance when lot's of pending invoices
2022-05-24 19:06:20 +09:00
1d3c4b6f90 Merge pull request #3773 from NicolasDorier/wefiou
Remove HistoricalAddresses table
2022-05-24 19:06:08 +09:00
891809a13a Merge pull request #3772 from NicolasDorier/experimental
Add experimental mode
2022-05-24 19:05:38 +09:00
67eeb4b69a Allow resolution of any settings via DI 2022-05-24 14:10:19 +09:00
f6b157167d Improve performance when lot's of pending invoices 2022-05-23 19:17:33 +09:00
d768314f03 Make login and password not required for sending email (#3764)
* Make login and password not required for sending email

close #3656

* Add space

* Remove unused "using" statements
2022-05-23 19:00:34 +09:00
3ede0a50f0 Remove Payout processor log spam 2022-05-23 18:43:35 +09:00
8828251204 Remove HistoricalAddresses 2022-05-23 11:32:37 +09:00
019788670e Fix: Not properly recording unaffected addresses in database 2022-05-23 11:12:09 +09:00
3285f24fe9 Add experimental mode 2022-05-23 10:46:51 +09:00
c7d0537bf9 Fix labels not showing multiple payouts payments (#3729)
* Fix labels not showing multiple payouts payments

* Improve label tooltip

Makes it more readable

* Cleanup code

* Fix overflowing text in order ID field in invoices table (#3765)

close #3714

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
Co-authored-by: Umar Bolatov <bolatovumar@gmail.com>
2022-05-23 10:25:46 +09:00
2254a5960e Fix overflowing text in order ID field in invoices table (#3765)
close #3714
2022-05-23 10:13:24 +09:00
af4a06f91d Fix a couple of mobile display issues (#3759)
* Fix Tor hidden services text overflow on smaller screens

* Fix issue with overflow "select" element on general store settings page in mobile Safari
2022-05-20 09:36:36 +09:00
3e95b59be8 Wallet transactions export (#3744)
* Wallet transactions export

The exported data needs some more work.

* Fix transactions export policy

* Add test cases

* Fix Selenium warnings

* Finalize export format

* Test export download

* Remove CSV download check

* Try to fix test
2022-05-20 09:35:31 +09:00
bb24ec4a9f Upgrade Lightning lib 2022-05-19 17:37:00 +02:00
5a4b675791 Upgrade Lightning lib; add and pass cancellation tokens in Greenfield 2022-05-19 17:37:00 +02:00
5328303c32 Align settings in properties and docker-compose (#3761)
Maps the LND gRPC port, which is used in the launch settings and fixes the LND REST port.
2022-05-19 23:58:04 +09:00
3f6212e799 Payout Processors: Use friendly name in delete confirmation
Closes #3758.
2022-05-19 13:15:38 +02:00
1803d3ee2b Fix NRE introduced by previous commit 2022-05-18 21:49:42 +09:00
421a2b0cd9 Pull payment code improvements (#3756)
* Controller syntax improvements

* Improve Payout Processors protip
2022-05-18 21:40:26 +09:00
533ae0ea89 fix unwanted alert list marker for single error, issue #3583 (#3704)
* fix unwanted alert list marker for single error, issue #3583  https://github.com/btcpayserver/btcpayserver/issues/3583

* Update ViewPullPayment.cshtml

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2022-05-18 21:38:10 +09:00
df5add04e2 Wallet display improvements (#3755)
* Improve fiat value text group display

* Improve generate/cheat button display

* Improve PSBT table display
2022-05-18 15:45:59 +09:00
174e743904 Improve invoice list performance (#3742) 2022-05-18 15:44:58 +09:00
76a6d94bbe Exchange api no kraken (#3679)
* WIP New APIs for dealing with custodians/exchanges

* Simplified things

* More API refinements + index.html file for quick viewing

* Finishing touches on spec

* Switched cryptoCode to paymentMethod as this allows us to differentiate between onchain and lightning

* Moved draft API docs to "/docs-draft"

* WIP baby steps

* Added DB migration for CustodianAccountData

* Rough but working POST /v1/api/custodian-account + GET /v1/api/custodian

* WIP + early Kraken API client

* Moved service registration to proper location

* Working create + list custodian accounts + permissions + WIP Kraken client

* Kraken API Balances call is working

* Added asset balances to response

* List Custodian Accounts call does not load assetBalances by default, because it can fail. Can be requested when needed.

* Call to get the details of 1 specific custodian account

* Added permissions to swagger

* Added "tradableAssetPairs" to Kraken custodian response + cache the tradable pairs in memory for 24 hours

* Removed unused file

* WIP + Moved files to better locations

* Updated docs

* Working API endpoint to get info on a trade (same response as creating a new trade)

* Working API endpoints for Deposit + Trade + untested Withdraw

* Delete custodian account

* Trading works, better error handling, cleanup

* Working withdrawals + New endpoint for getting bid/ask prices

* Completed withdrawals + new endpoint for getting info on a past withdrawal to simplify testing, Enums are output as strings,

* Better error handling when withdrawing to a wrong destination

* WithdrawalAddressName in config is now a string per currency (dictionary)

* Added TODOs

* Only show the custodian account "config" to users who are allowed

* Added the new permissions to the API Keys UI

* Renamed KrakenClient to KrakenExchange

* WIP Kraken Config Form

* Removed files for UI again, will make separate PR later

* Fixed docs + Refactored to use PaymentMethod more + Added "name" to custodian account + Using cancelationToken everywhere

* Updated withdrawal info docs

* First unit test

* Complete tests for /api/v1/custodians and /api/v1/custodian-accounts endpoints + Various improvements and fixes

* Mock custodian and more exceptions

* Many more tests + cleanup, moved files to better locations

* More tests

* WIP more tests

* Greenfield API tests complete

* Added missing "Name" column

* Cleanup, TODOs and beginning of Kraken Tests

* Added Kraken tests using public endpoints + handling of "SATS" currency

* Added 1st mocked Kraken API call: GetAssetBalancesAsync

* Added assert for bad config

* Mocked more Kraken API responses + added CreationDate to withdrawal response

* pr review club changes

* Make Kraken Custodian a plugin

* Re-added User-Agent header as it is required

* Fixed bug in market trade on Kraken using a percentage as qty

* A short delay so Kraken has the time to execute the market order and we don't fetch the details too quickly.

* Merged the draft swagger into the main swagger since it didn't work anymore

* Fixed API permissions test

* Removed 2 TODOs

* Fixed unit test

* Remove Kraken Api as it should be separate opt-in plugin

* Flatten namespace hierarchy and use InnerExeption instead of OriginalException

* Remove useless line

* Make sure account is from a specific store

* Proper error if custodian code not found

* Remove various warnings

* Remove various warnings

* Handle CustodianApiException through an exception filter

* Store custodian-account blob directly

* Remove duplications, transform methods into property

* Improve docs tags

* Make sure the custodianCode saved is canonical

* Fix test

Co-authored-by: Wouter Samaey <wouter.samaey@storefront.be>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-05-18 14:59:56 +09:00
6d76771b16 Lightning: Allow specifying explicit amount for invoices (#3753)
* Upgrade Lightning lib

* Lightning: Allow specifying explicit amount for invoices

* Fix tests
2022-05-18 14:57:36 +09:00
fca066fe52 Add endpoint for creating POS app 2022-05-17 21:26:33 -07:00
aa3c0346c8 Add GreenfieldAppsController 2022-05-17 21:26:33 -07:00
bafec0d974 Move PointOfSaleSettings class into own file 2022-05-17 21:26:33 -07:00
f3f605a90f Fix DivideByZeroException raised if crowdfund's target amount is 0 (#3747) (#3748) 2022-05-17 14:34:06 +09:00
a9a9f26aa0 Remove mailto: handling in bitpayjs 2022-05-14 10:57:08 +09:00
4eb143c265 Fix a bunch of open redirect vulns 2022-05-13 10:26:20 +09:00
e597b2177c Re-add StoreNavPages.Integrations with deprecation warning 2022-05-12 13:32:40 +02:00
2ae4501de6 Rewording: Integrations become (store) plugins
We're keeping the `store-integrations-list` extension point name for backwards compatibility, otherwise I renamed all "integration" occurences in the views and also the routes.

Note: We still refer to external software like WooCommerce, Drupal, Magento and such as "integrations", I think that distinction makes sense.

Closes #3594.
2022-05-12 13:32:40 +02:00
f1029fceff Fix webhooks test
Re-adds two classes used by the tests, that got removed in #3716.
2022-05-12 12:04:31 +02:00
b67d3a504b Add responsive table wrap where necessary 2022-05-12 07:54:12 +02:00
12a5998a07 ui+invoice: improve webhooks section styling 2022-05-12 07:54:12 +02:00
fbe2096098 Set pull payment auto approve flag when creating the model
fix #3693
2022-05-12 07:45:54 +02:00
d7faa0a0fd Improve payout processors UI
Some quick fixes, closes #3697.
2022-05-10 15:27:39 +02:00
8bd54493a3 add pgp verif 2022-05-09 14:00:21 +02:00
225243ba93 1.5.2 changelog (#3730)
* 1.5.2 chaneglog

* bump
2022-05-09 20:58:49 +09:00
21bd35accd Fix shopify id / order no (#3718)
fixes #3636
2022-05-09 20:58:05 +09:00
4acca4c6f5 Try fix selenium test error (#3728) 2022-05-09 14:13:51 +09:00
c106ff8290 bump selenium (#3723) 2022-05-06 12:07:53 +09:00
296ba4606d Redirect to payment method setup (#3721)
Closes #3651.
2022-05-06 11:14:56 +09:00
54dd602be4 Implementing tables fix per dennisreimann suggestion 2022-05-05 15:17:44 +02:00
9cac8d36ad A few tables in the Cart checkout were having bad width and margins which caused misalignments. 2022-05-05 15:17:44 +02:00
d407e9ffba Add dark mode option for public pull payment and payment request views
Closes #3706. Closes #3705.
2022-05-04 14:36:37 +02:00
26025b564e Lightning: Catch and display external service errors
Prevent crashes like in #3700 and display the error to the user.
2022-05-04 14:30:07 +02:00
4cacc2a9e6 bump LNURL package 2022-05-04 14:08:02 +02:00
16ef405670 bump LNURL package 2022-05-04 13:31:15 +02:00
642aad28ac Update validation of crowdfund app settings (#3708) 2022-05-04 10:34:40 +02:00
B
e5feda69c8 Updated Payout processor Label for setting interval (#3698) 2022-05-04 10:34:31 +02:00
aa89d1dffe Makle plugin packer store in dir with plugin name 2022-05-04 09:01:17 +02:00
662f269a94 Fix return type of webhooks get so that plugins can use it 2022-05-03 11:15:08 +02:00
6f80100ee6 Plugin Packer: Generate versioned dir and also SHA256SUMS (+ asc file is on windows with gpg and powershell installed) 2022-05-03 08:12:25 +02:00
38d3154ddf Dashboard: Prevent y-axis labels from getting cut off (#3702)
Fixes #3692.
2022-05-02 21:32:24 +09:00
e16a718bde Do not always provide counting in list views (#3696) 2022-05-02 16:35:28 +09:00
a40429e219 Fix possible NRE 2022-05-02 09:43:55 +09:00
e5602a86a2 bump 2022-04-30 12:58:58 +09:00
7d4d8bff93 Do not show balance if can't get the balance (#3695) 2022-04-30 12:56:05 +09:00
d028ebfdf1 Improve performance of Invoice count (#3688) 2022-04-30 12:54:44 +09:00
a5aeb2a3c1 Fix performance issue on dashboard for big wallets (#3694) 2022-04-30 12:54:12 +09:00
410bd5ab9c Remove logs about pending invoices 2022-04-29 16:01:25 +09:00
f4823d962a Do not crash if /apps/{appId} do not exists 2022-04-29 16:00:27 +09:00
9aa35f3488 add missing docs 2022-04-29 08:58:17 +02:00
d2a7e5dc4d get pgp verified commit 2022-04-28 16:05:33 +02:00
f7cb44c343 fix crash on not found perk items (#3685) 2022-04-28 16:03:19 +02:00
ae67cc8a51 bump 2022-04-28 22:06:03 +09:00
454d628f93 1.5.0 changelog (#3680)
* 1.5.0 changelog

* Apply suggestions from code review

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

* Update Changelog.md

Co-authored-by: d11n <mail@dennisreimann.de>
2022-04-28 22:04:47 +09:00
e60e8dc9ba reduce payout processor logs 2022-04-28 14:43:01 +02:00
382fe5cd47 Auto approve refunds (#3682) 2022-04-28 20:50:28 +09:00
86e53552c0 Upgrade Lightning library (#3683) 2022-04-28 12:49:43 +02:00
6296d63197 Local API client: Allow for cancellation of GetPayment calls (#3681)
I missed adding those in #3674.
2022-04-28 09:51:21 +09:00
ed1a7bb887 Allow auto approval of claims for pull payments (#1851)
* Allow auto approval of claims for pull payments

closes #1780

* fix
2022-04-28 09:51:04 +09:00
273bc78db3 Allow Users to be disabled/enabled (#3639)
* Allow Users to be disabled/enabled

* rebrand to locked for api

* Update BTCPayServer/Views/UIAccount/Lockout.cshtml

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

* fix docker compose and an uneeded check in api handler

* fix

* Add enabled user test

Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2022-04-26 21:27:35 +09:00
261a3ecee3 Greenfield: Allow for cancellation of Lightning method calls (#3674) 2022-04-26 10:29:20 +09:00
8f0ac61634 Refactoring: Extract Safe module to Abstractions (#3676)
So that it can be used by plugins as well.
2022-04-26 10:28:49 +09:00
5a7b275ee3 Fix CanCreateAppPos 2022-04-25 17:37:46 +09:00
54e106ec74 LNURL: Use Lightning description template in LNURL metadata (#3667)
* LNURL: Use Lightning description template in LNURL metadata

Unifies the invoice description for the Lightning and LNURL payment methods and fixes #3634.

* Add POS Order ID for consistency with Crowdfund

* LNURL: Add POS item metadata to invoice

For consistency with the Lightning payment method. Closes #3655.
2022-04-24 20:36:10 +09:00
51690b47a3 Transfer Processors (#3476)
* Automated Transfer processors

This PR introduces a few things:
* Payouts can now be directly nested under a store instead of through a pull payment.
* The Wallet Send screen now has an option to "schedule" instead of simply creating a transaction. When you click on schedule, all transaction destinations are converted into approved payouts. Any options relating to fees or coin selection are discarded.
* There is a new concept introduced, called "Transfer Processors".  Transfer Processors are services for stores that process payouts that are awaiting payment. Each processor specifies which payment methods it can handle.  BTCPay Server will have some forms of transfer processors baked in but it has been designed to allow the Plugin System to provide additional processors.
* The initial transfer processors provided are "automated processors", for on chain and lightning payment methods. They can be configured to process payouts every X amount of minutes. For  on-chain, this means payments are batched into one transaction, resulting in more efficient and cheaper fees for processing.
*

* fix build

* extract

* remove magic string stuff

* fix error message when scheduling

* Paginate migration

* add payout count to payment method tab

* remove unused var

* add protip

* optimzie payout migration dramatically

* Remove useless double condition

* Fix bunch of warnings

* Remove warning

* Remove warnigns

* Rename to Payout processors

* fix typo

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2022-04-24 12:19:34 +09:00
9ab129ba89 More URL id parameter fixes (#3673) 2022-04-22 15:52:57 +02:00
b39a67534c Greenfield: Proper response for store not found (#3658)
* Greenfield: Proper response for store not found

Previously the "network not configured" error message was also displayed when indeed the store could not be found. This is misleading, hence we should have a separate error for that case.

* Use StoreNotFound method
2022-04-22 12:17:20 +02:00
2d717cbf01 Fix payment request redirect URL (#3672) 2022-04-22 10:28:46 +02:00
c4f284aaf1 Lightning: Add GetPayment methods to local client (#3657)
I missed adding them in #3557.
2022-04-22 09:28:11 +09:00
e40a9089e0 Merge pull request #3666 from dennisreimann/ivpn
Add IVPN as supporter to README
2022-04-21 16:02:33 +02:00
8cf849e590 Add IVPN as supporter to README 2022-04-21 15:50:46 +02:00
03e113b063 Merge pull request #3665 from dennisreimann/ivpn
Add IVPN logo for supporters section
2022-04-21 15:36:38 +02:00
d9305b1e63 Add IVPN logo for supporters section
We are not displaying it in the app, but linking to it from various other sites (docs, website, etc.)
2022-04-21 15:34:09 +02:00
182fa7d803 Upgrade Lightning lib (#3662) 2022-04-21 21:47:10 +09:00
4dd41cffe3 Order swagger's docs tags 2022-04-21 12:30:49 +09:00
9bf3df1e87 Fix Swagger, replacing additionalProperties by allOf 2022-04-21 12:12:30 +09:00
2e08c29c64 Remove replace hardcoded BTC string to default network (#3654) 2022-04-20 10:20:39 +09:00
75afd30008 Design updates (#3653)
* Design updates

Contains:

- btcpayserver/btcpayserver-design#12
- btcpayserver/btcpayserver-design#33
- btcpayserver/btcpayserver-design#35
- btcpayserver/btcpayserver-design#37
- btcpayserver/btcpayserver-design#39

* Improve input focus styles
2022-04-20 09:42:14 +09:00
7652d2c7e3 LN Address - db schema fix method (#3638)
* LN Address - db schema fix method

* pr changes

* shorten
2022-04-19 16:58:31 +09:00
7e6a2d08e2 Add label filter for onchain tx API endpoint (#3588)
* Add label filter for onchain tx API endpoint

close #3587

* Add Swagger docs

* Add test for filtering by transaction label
2022-04-18 11:20:15 +09:00
c1dbe235dc Hide empty plugins section (#3643)
Closes #3617. Implementation of @bolatovumar's [proposal](https://github.com/btcpayserver/btcpayserver/issues/3617#issuecomment-1094173005) - we might be able to replace it with a better solution, that would avoid rendering that section in the first place. For now that solves the issue though.
2022-04-18 10:25:00 +09:00
eb2ccf06a5 Fix typos in README file (#3644)
* Fix typos in README file

* Update BTCPayServer.Tests/README.md

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

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
Co-authored-by: d11n <mail@dennisreimann.de>
2022-04-18 10:24:17 +09:00
e202f24592 Wallet view: Minor display improvements (#3647)
* Label improvements

* Fix erratic display bug in ToTimeAgo helper
2022-04-18 10:23:32 +09:00
d11f87f0cc Pay Button: Re-add Vue handlers to currency input (#3646)
Fixes a regression introduced in #3642: The pay button preview and code sample do not update without the Vue handlers.
2022-04-16 18:38:51 +02:00
8f54ec4f4a add currency-selector input on Payment Request and Pay Button pages (#3642) 2022-04-15 13:53:37 +09:00
64534efe71 Fix broken "CanCreateRefunds" test (#3635) 2022-04-14 14:07:10 +09:00
1235ced355 htmlcoin altcoin updates (#3601)
* remove old logo

* add new logo

* switch name from Althash to Htmlcoin

* increment version NBXplorer.Client

* fix KeyPath BIP-0044, fix name

https://github.com/BEPAL/slips/blob/master/slip-0044.md

* revert increment version
2022-04-14 13:18:12 +09:00
23d383be67 Add transaction info PATCH endpoint (#3561)
* Add transaction info patch endpoint

* Add "#nullable enable" to LabelFactory

* Add Swagger docs

* Update OnChain to onchain

* update feeRate to feerate

* Add test

* replace "Onchain" with "onchain"
2022-04-14 13:17:22 +09:00
fb90ff2fbb updates (#3631) 2022-04-14 13:09:37 +09:00
4706aa95e6 Minor Dashboard Adjustments (#3629)
* improves border-radius

* adjusts CF widget wording
2022-04-14 13:08:43 +09:00
8981414705 API: Add Lightning Payment info endpoint (#3557)
* Upgrade Lightning lib

* API: Add Lightning Payment info endpoint
2022-04-12 18:01:58 +09:00
7ec978fcdb Dashboard (#3530)
* Add dashboard and chart basics

* More widgets

* Make widgets responsive

* Layout dashboard

* Prepare ExplorerClient

* Switch to Chartist

* Dynamic data for store numbers and recent transactions tiles

* Dynamic data for recent invoices tile

* Improvements

* Plug NBXPlorer DB

* Properly filter by code

* Reorder cheat mode button

* AJAX update for graph data

* Fix create invoice button

* Retry connection on transient issues

* App Top Items stats

* Design updates

* App Sales stats

* Add points for weekly histogram, set last point to current balance

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-04-12 16:55:10 +09:00
d58803a058 Specify PayJoin enabled in Payment Link heading (#3614)
* Specify PayJoin enabled in Payment Link heading

* Fix for non bitcoin payments
2022-04-12 11:05:09 +09:00
fe6b7dc1e3 Fix visual bug when user clicks on "Create refund" without selecting an option (#3624)
* Add missing refund option validation error element

* Add missing hidden inputs for text elements

* Move validation element above button

* Update validation error message
2022-04-11 17:53:52 +09:00
c9f0988b95 Handle possible error when bumping fee (#3608)
fix #3600
2022-04-11 17:53:10 +09:00
cd9a52706c Use the store's default currency when creating entities (#3585)
* Use default currency for new pull payments

Closes #3582.

* Pull payment: Improve create form

* Use default currency for new invoices

Closes  #3581.

* Clean up old invoice form code

* Use default currency for new payment requests

* Test fixes
2022-04-11 17:50:30 +09:00
bfdb1b4af9 Design updates (#3565)
* Design updates

* Improve table styles

* Form input color improvements

* Form input shadows

* Increase accordion button padding

* Hover transition for checkboxes and radio buttons

* Improve checkbox and radio button spacings

* Improve input styles

* Secondary button updates

* Clear pager floats

* Link improvements

* Don't display border for last table row
2022-04-11 17:49:57 +09:00
e5174b4a29 Lightning: Link to services directly (#3593)
* Allow to access fake LN services in dev mode

* Link directly to Lightning services

Closes #3552.

* Fix typo
2022-04-11 17:49:28 +09:00
8feb60c30d Add ability to set default payment method for pay button (#3606)
* Add ability to set default payment method for pay button

close #3604

* Add "#nullable enable" to UIStoresController

* Add PaymentMethodOptionViewModel

* Add explicit "Use the store’s default" option
2022-04-11 17:48:12 +09:00
6bd7fb64ab CI test fixes (#3609)
* Test fix


Logs

* Add test logs

* Test change

* Use async overloads in CanPayWithTwoCurrencies test

* Bump NBXplorer

* More test updates

* More logs

* More waiting

* More waiting

* Update GoToUrl calls

* Log request status

* More logs

* More logs, more waits, idk

* Click checkboxes using JS

* Go to url directly

* Double timeout
2022-04-08 18:58:01 +09:00
b9602243d3 Fix tests for litecoin 2022-04-08 13:03:51 +09:00
b7a930ef18 Adjust user search input width (#3577)
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-04-05 07:34:56 -04:00
add206ae2d Fixes #3598 by adding overflow scrolling to StoreSelectorMenu (#3599)
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-04-05 07:34:14 -04:00
28ce095fb4 Merge pull request #3602 from phershbe/master
Link to local development environment instructions corrected
2022-04-05 09:01:00 +02:00
13952a4b79 Bump NBX (#3607) 2022-04-05 14:46:42 +09:00
05ec398346 Update CoinGeckoRateProvider 2022-04-04 14:47:50 +09:00
dea2dd52be Link to local development environment instructions corrected
As noted here: https://github.com/btcpayserver/btcpayserver/issues/3590

The link to the local development environment instructions was broken and now is correct.
2022-04-01 22:18:43 -04:00
debe3cda4b fix typo 2022-04-01 13:45:30 +02:00
5b5aa2c721 bump btcpay 2022-04-01 13:22:24 +02:00
e201ddd74c Plugins: Fix plugin installer 2022-04-01 13:20:19 +02:00
4a1580169d Merge pull request #3595 from pavlenex/shopify 2022-03-31 15:15:26 +02:00
001ca7de60 Fix UI to match Shopify's 2022-03-31 14:51:16 +02:00
184be4e27b Merge pull request #3592 from Kukks/updaart 2022-03-31 13:36:11 +02:00
7652645dda 1.4.8 update 2022-03-31 12:48:10 +02:00
ef6016857b FileService: AddFile from URL (#3566) 2022-03-31 11:54:25 +02:00
e449ca2c95 Fix shopify 2022-03-31 10:13:07 +02:00
b0f00773d6 fix issues around local btcpay client and no request obj 2022-03-30 15:04:51 +02:00
451eee549b added additional inputmode attr to relevant form input fields (#3578)
* added inputmode attr to relevant input fields

* missed some numerical form inputs

* removed inputmode attribute from checkout appearnce invoice settings input field
2022-03-30 09:58:50 +02:00
77da261fea Allow plugins to extend swagger docs and fix pull payment test 2022-03-29 20:29:27 +02:00
e23c9ee608 Add missing policies in api key UI 2022-03-29 20:12:02 +02:00
37cb87a9c6 Update CircleCI config (#3586) 2022-03-29 16:35:02 +01:00
211db8e0f0 Adjust pull payment badge color (#3584)
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-03-29 12:09:30 +02:00
d074d60dad Change "was confirmed paid" to "is settled"
As detailed here: https://github.com/btcpayserver/btcpayserver/issues/3572
2022-03-27 07:56:32 +01:00
0bff5e2236 Update BTCPayServer/wwwroot/swagger/v1/swagger.template.stores-email.json
Co-authored-by: d11n <mail@dennisreimann.de>
2022-03-26 21:46:40 +00:00
dca986eb2e Add Greenfield Store Email API 2022-03-26 21:46:40 +00:00
326eb1135b added inputmode attr to relevant input fields 2022-03-26 18:27:22 +00:00
b2f7b4e6b9 Update BTCPayServer/Services/Invoices/InvoiceRepository.cs
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2022-03-25 13:21:43 +00:00
5129d6aa6b Update BTCPayServer/Services/Invoices/InvoiceRepository.cs
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2022-03-25 13:21:43 +00:00
a8cf334616 Update BTCPayServer/Services/Invoices/InvoiceRepository.cs
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2022-03-25 13:21:43 +00:00
3b4d06a1e5 Bugfix: Could not find an order by OrderId after it's OrderId was changed through the API 2022-03-25 13:21:43 +00:00
c7969476b0 Apply suggestions from code review
Co-authored-by: d11n <mail@dennisreimann.de>
2022-03-25 10:45:56 +00:00
7bf24df03a Change payment method name from "Wallet" to "Bitcoin"
As discussed here: https://github.com/btcpayserver/btcpayserver/issues/3571
2022-03-25 10:45:56 +00:00
5ef41294e4 Optimize github plugin fetching 2022-03-23 15:03:39 +00:00
2eb68655c7 FileService: Add method to check availability 2022-03-21 12:38:25 +01:00
23049439c0 API: Add description hash to CreateLightningInvoiceRequest (#3559)
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2022-03-17 10:15:27 +01:00
ce6cd40b92 Adjust wallet receive page layout (#3553)
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-03-11 10:43:31 +01:00
c36b0c16b0 New API endpoint: Send email using store SMTP (#3181)
Co-authored-by: Kukks <evilkukka@gmail.com>
2022-03-11 10:17:40 +01:00
c15f182377 Streamline JS/CSS bundles (#3520) 2022-03-11 08:41:48 +01:00
165cb345b4 Merge pull request #3551 from dennisreimann/acinq
Remove ACINQ from README
2022-03-10 11:52:57 +03:00
9b6d2beb4d Remove ACINQ from README
Closes #3546.
2022-03-10 09:50:40 +01:00
722c39a6ff Exclude ChainCoin in rate provider test 2022-03-08 12:12:01 +01:00
e344749d2f Remove Polis
As per [this comment](https://github.com/btcpayserver/btcpayserver/pull/3514#issuecomment-1059583143)
2022-03-08 12:12:01 +01:00
fe782bc3b6 Merge pull request #3519 from dennisreimann/2fa-layout
Use simple layout for 2FA views
2022-03-08 13:42:28 +03:00
d372cbad74 Fix null reference error when "destinations" field is not specified or empty when creating a new wallet transaction
fix #3537
2022-03-08 11:14:34 +01:00
1e1198f4ec Remove Kraken from README 2022-03-08 11:13:19 +01:00
5effc96cff Remove Kraken as a supporter
Closes #3539.
2022-03-08 11:13:19 +01:00
b8d4a1be05 Delete Plugins/packed directory 2022-03-08 09:57:43 +01:00
36a25e6efa Merge pull request #3543 from dennisreimann/manage-plugins
Rename Add plugin to Manage plugins
2022-03-08 11:26:35 +03:00
1240e7914d Fixes 2022-03-08 08:17:39 +00:00
e4683b1ea1 Refactoring: Extract ITempDataDictionary extensions 2022-03-08 08:17:39 +00:00
749c22a0c3 Refactoring: Extract HttpRequest extensions 2022-03-08 08:17:39 +00:00
6867774627 Refactoring: Extract StringExtensions 2022-03-08 08:17:39 +00:00
80944972e9 Rename Add plugin to Manage plugins
Closes #3540.
2022-03-08 08:04:15 +01:00
c1f608c0d8 Upgrade Lightning lib (#3531) 2022-03-08 10:02:48 +09:00
4dfbb08db3 Try test fix 2022-03-04 10:49:36 +00:00
ead1dffd98 QR container display fixes
Consistently centers the container contents.
2022-03-04 10:49:36 +00:00
5a16e4d132 Use simple layout for 2FA views 2022-03-03 13:43:22 +01:00
a89491e343 Skip Polis and OKEx in rate fetching tests 2022-03-03 10:57:55 +01:00
b1b00ae886 Scroll to checkbox before click 2022-03-03 10:57:55 +01:00
cde5bd87d8 update 1.4.7 2022-03-02 12:37:28 +01:00
3231d5d179 Allow file service to be used in plugins 2022-03-02 12:22:46 +01:00
03e49ea2bf Allow access to global invoices list
The recent changes in 19eea3a6154e73f7fc9d62ab20480134e95be3d5 prevent it to access a global/unfiltered list of invoices across all stores. This removes the fallback to the current store, which brings the global list back at `/invoices`.
2022-03-02 11:00:25 +01:00
7d3eef092c Add missing generate wallet greenfield docs 2022-03-02 10:54:05 +01:00
30d0410b49 fix shopify settings 2022-03-01 09:19:28 +01:00
eb2a887f77 Fix missing store in export for invoices
fixes #3505
2022-03-01 09:18:46 +01:00
e77b8d29cf Remove policy, set store context manually 2022-03-01 09:18:23 +01:00
490ec299c5 Fix missing store context for Lightning payouts 2022-03-01 09:18:23 +01:00
e47c2aa24d Fix redirect 2022-03-01 09:18:23 +01:00
3eb9fdca6a Syntax improvements 2022-03-01 09:18:23 +01:00
a4173a93b7 Improve display on payout confirm page 2022-03-01 09:18:23 +01:00
ad762cf239 Fix back link on payout confirm page
Fixes #3490.
2022-03-01 09:18:23 +01:00
5a478607dc Fix "Copy Link" button on pull payment and payment request pages
close #3499
2022-03-01 09:15:15 +01:00
4abc6eb387 Refactoring: Allow GreenfieldExtensions to be used by plugins 2022-03-01 09:14:51 +01:00
c313bba288 Fix mobile content z-index
I think we added this before taking proper care of the main menu z-index. Now that that is fixed we can remove the z-index of the content area, which fixes #3504.
2022-02-26 13:51:59 +01:00
73eaf97afb Fix pos print view
fixes #3503
2022-02-26 13:22:27 +01:00
8d25df5d4e Fix Pay Button code copying
Fixes #3489.
2022-02-24 12:23:03 +01:00
4a05f16050 Refactoring: Move WellKnownTempData into Abstractions.Constants
This allows plugins to reuse the status message mechanism.
2022-02-21 16:39:08 +01:00
3ef1423263 Update Changelog.md 2022-02-21 13:06:13 +01:00
898652189b Changelog: Fix usernames 2022-02-21 13:06:13 +01:00
2976edf333 Sticky header JS fix
The old version lead to an error on pages that do not contain a sticky header.
2022-02-21 13:05:50 +01:00
248be11e4d fix local client http accessor overrider 2022-02-21 11:48:40 +01:00
19ec8c36e2 Remove debug line in selenium tests 2022-02-21 16:17:36 +09:00
90d989e358 Bump 1.4.6 2022-02-21 14:54:43 +09:00
19eea3a615 Refactor how we get storeids list in invoice filter (#3483) 2022-02-21 14:53:48 +09:00
7b81b9786d Fix LNUrl comment truncating 2022-02-21 13:47:00 +09:00
292d302a3d Allow only 2k chars in LNURL comments 2022-02-21 13:27:02 +09:00
557594e34d Test LNUrl Pay payment method information, add doc 2022-02-21 13:22:17 +09:00
48393c3765 Add border for mobile menu (#3477)
In addition to #3469.
2022-02-21 12:20:04 +09:00
022cd666eb Sticky header updates (#3471)
* Add tag helper for sticky header

Encapsulates some of the CSS and JS required and makes the usage easier.

* Make sticky header span full content area horizontally

* Use sticky header on remaining list views

* Use sticky header on remaining edit and detail views

* Adapt pull payments view to be consistent with other list views

* Fix form markup

* PSBT test fix

* Update header actions

* Remove sticky header tag helper
2022-02-21 11:05:42 +09:00
2d0eedb132 CircleCI: Update build image (#3475)
CircleCI recently [deprecated build images](https://circleci.com/blog/ubuntu-14-16-image-deprecation/), including the classic ones we are using. I found this config working for me on another repo.
2022-02-21 11:04:15 +09:00
5d3d664ce6 Update BTCPayServer/Views/UIWallets/WalletTransactions.cshtml
Co-authored-by: d11n <mail@dennisreimann.de>
2022-02-18 10:13:50 +01:00
d1c12d8294 Add ability to clear tx label filter 2022-02-18 10:13:50 +01:00
947a67fcd2 adds border (#3469) 2022-02-18 10:56:05 +09:00
9b9540b857 PSBT test fix (#3472) 2022-02-18 10:55:54 +09:00
a3b748ffe3 Remove payment methods not currently configured when creating invoice (#3394)
* Add error message when wallet is not configured

* Adjust payment methods based on available ones

* Disable "Create invoice" page if there is an error

* Add test

* update HasErrorMessage

* Add method for checking if payment methods are available

* small pr fixes

Co-authored-by: Kukks <evilkukka@gmail.com>
2022-02-17 18:22:09 +09:00
9a3a7a3444 Add pull payment grouping options (#3177)
* Add grouping by payment methods

* Add filtering by pull payment state

* Hide "Archive" button for archived pull payments

* Don't show payment methods bar if there is only one

* Add "All" payment method option

* Remove filtering by payment method

* Update state queries to not run on the client

* Add filtering by future pull payments
2022-02-17 18:13:28 +09:00
5c8ca15ee2 Redesign Wallet UI (#3441)
* Update wallet navigation

* Find matching text color for label bg color

* Cleanup

* Extract WalletNav component

* Move PSBT link to Send and Rescan link to Settings

* Update transactions view

* Test fixes

* Adapt invoices list actions

* Show invoice actions only if there are any invoices

* Link wallet name and balance to tranactions list

* Move wallet related actions from list to settings

* Fix main menu z-index

Needs a value between fixed and the offcanvas backdrop, see https://getbootstrap.com/docs/5.1/layout/z-index/

* Update receive and send views
2022-02-17 18:07:41 +09:00
cd3807a3d8 Lightning payment info and fee handling (#3454)
* Lightning payment info and fee handling

Builds on the additions in btcpayserver/BTCPayServer.Lightning#59 and btcpayserver/BTCPayServer.Lightning#61.

Adds payment information (total amount and fees) to the API response and allows to set an optional maximum fee percentage when paying.

* Add max fee flat
2022-02-17 18:01:39 +09:00
2a884d6f38 removes redundant header (#3470) 2022-02-17 17:59:21 +09:00
6efeb60c41 Fix the PSBT signing flow (#3465) 2022-02-17 17:58:56 +09:00
dcdab5b218 Do not show storeid in the invoice filter 2022-02-16 13:43:33 +09:00
288fbda54f New API endpoint: Find 1 user by ID or by email, or list all users. (#3176)
Co-authored-by: Kukks <evilkukka@gmail.com>
2022-02-15 16:19:52 +01:00
03bc91fd1e switch to jobj 2022-02-15 12:23:54 +01:00
1c5cf29540 Greenfield: Invoices Payment Methods: Additional Data
closes #3154
2022-02-15 12:23:54 +01:00
631ddc0af2 Bump version 2022-02-15 14:33:25 +09:00
1d593df5af Bump lightning lib (#3453)
* Bump lightning lib

* Fix endianness of description hash text
2022-02-14 20:33:27 +09:00
1d3a8bb7bf App updates (#3437)
* Fix toggle alignment

* Crowdfund: Change defaults (disable sounds and Disqus)

* Crowdfund: Move callback notification URL into additional options

Same as with the Point Of Sale options.

* Crowdfund: Make enable toggle more prominent

* Crowdfund: Improve start and end date form group display

* Template Editor: Improve button spacing

* adjusts currency + target

* removes "other actions"

* adjusts text

* adjusts status message bottom margin

Co-authored-by: dstrukt <gfxdsign@gmail.com>
2022-02-14 18:14:21 +09:00
0dc9c183b5 Store guest shouldn't see the bump fee option 2022-02-14 18:13:22 +09:00
05ab43f309 Redirect to transactions list after wallet creation (#3451)
Closes #3450.
2022-02-14 17:09:57 +09:00
f4153ade92 Zcash integration (#3400)
* zcash

* Use Channel instead of Queue
2022-02-14 17:04:34 +09:00
44e84b46b8 Upgrade Lightning lib (#3446)
Prerequisite for btcpayserver/btcpayserver#3423.
2022-02-10 19:33:57 +09:00
3fe71e7bdc Avoid NRE on PermissionTagHelper 2022-02-10 18:37:07 +09:00
5d4d8a3422 Simplify swagger 2022-02-10 17:09:55 +09:00
f06199230c Add ability to add description to pull payment (#3363)
* Add ability to add description to pull payment

close #2625

* Add API support

* Remove 'Model.Description != "<br>"'
2022-02-10 14:54:00 +09:00
da9a6b835a Greenfield: Store Users (#3425)
* Greenfield: Store Users

* fixups

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-02-10 14:51:10 +09:00
0afc2cd2cb Add NetworkProvider.DefaultNetwork 2022-02-10 12:43:26 +09:00
9e2f7fb048 Do not register services of altcoins if not used 2022-02-10 12:36:07 +09:00
3fa694c65f Improve Lightning test scripts (#3435) 2022-02-10 12:25:14 +09:00
300d84c5d8 [UX/UI] Add CPFP (#3395)
* Add CPFP

* Sign PSBT should go back to the initial page
2022-02-10 12:24:28 +09:00
efed00f58b Setup guide: Link to first crypto if BTC not available 2022-02-10 12:23:45 +09:00
99c4ebe046 Setup guide: Link wallet setup always to BTC (#3442) 2022-02-10 12:17:15 +09:00
699231fd92 Fix payment request archival actions (#3443) 2022-02-09 23:37:15 +09:00
c18f112f31 Invoice status lookup fix (#3444)
See 4ca152da7cac87ecff7065ae077d72e0985be70b.
2022-02-09 23:35:17 +09:00
605d04580c Fix subnav on store pairing view (#3438)
Fixes #3431.
2022-02-09 12:24:25 +09:00
143211f276 Filter 'complete' = 'confirmed or settled' 2022-02-09 12:17:21 +09:00
4ca152da7c Fix paid invoice filter
Fixes #3434 by reverting the filter changes done [here](ec68d2a0e6 (diff-b7a89b0b45f062f004cdfe6ca8484f6ca519044f63485fd15986af5f7dd5ec76L219)).

The new labels are only used in the UI ­— when filtering one needs to use the old labels, as the filter docs in the view already suggest.
2022-02-09 12:12:32 +09:00
1c1f69fa50 bump 1.4.4 2022-02-08 12:21:58 +09:00
147ccd6c96 Ensure compresed public key is used for SIN generation even if uncompressed key was provided (fix #3432) (#3433) 2022-02-08 11:24:58 +09:00
c8b9906ef3 After login, redirect user to the main page even if root app configured (#3429) 2022-02-07 21:18:22 +09:00
cd94a9fac1 Make CheckNoDeadLink more reliable 2022-02-07 21:15:39 +09:00
20a9472ee2 Sticky headers (#3416)
* Make headers sticky

Closes #3344.

* Decrease headline margin bottom on mobile

* increases gap

* adds bottom padding

* Update BTCPayServer/Views/UIApps/UpdatePointOfSale.cshtml

* add "_blank" to view action

* Fix markup and tests

* Spacing updates

* Try test fix

* Re-add sticky account header and add test logs for timeout check

* Fix timeout issues

* Apply scroll padding on pages with sticky header

Co-authored-by: dstrukt <gfxdsign@gmail.com>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-02-07 18:37:45 +09:00
c652a2f122 Bumping LND to 0.14.2-beta (#3424) 2022-02-07 16:30:17 +09:00
ce174d507d Prevent initial scroll to section nav (#3411)
* Prevent initial scroll to section nav

On pages taht contain a section nav (sub navigation) the previous `scrollIntoView` led to an initial scroll position start at the section nav. See the store or server settings for examples.

This fixes it so that the scroll vertical position always starts at 0.

* Mobile: Prevent anchors from disappearing underneath the fixed header

* Add content padding top to scroll padding
2022-02-06 20:39:52 +09:00
f66b1b644f docker-entrypoint would crash if missing ssh pubkey 2022-02-06 20:39:10 +09:00
5b460f0b4e Error messages when starting BTCPay Server where not shown (Fix #3404) 2022-02-06 14:37:31 +09:00
ab8d116f11 Fix null reference exception when going to LN node settings before it's been set-up (#3410)
* Fix null reference exception when going to LN node settings before it's been set-up

* Fix-up remaining null reference errors

* Update error message
2022-02-06 12:19:42 +09:00
0535e9c68f 1.4.3 2022-02-02 20:24:56 +09:00
93b52fbdb3 Redirect on 403 page rather than crashing if permission missing 2022-02-02 20:24:22 +09:00
aab1eb0d36 Ensure Swagger docs are semantically and structurally correct (#3390)
* Remove "delete" method from "/api/v1/stores/{storeId}/invoices/{invoiceId}/payment-methods" docs

* Remove "requestBody" from "delete" method of "/api/v1/stores/{storeId}/webhooks/{webhookId}"

* Rename "API Key" to "API_Key"

* Remove "scheme" from API_Key security scheme

* Remove "name" and "in" properties from "Basic"security scheme
2022-02-02 20:12:48 +09:00
c07fcc171c Fix Plugin Local Client authorization when user is provided (#3401)
* Fix Plugin Local Client authorization when user is provided

* 1337 hax
2022-02-02 20:09:08 +09:00
8e5b7d2578 Fix crash of payment request list (Fix #3392) 2022-02-02 20:08:20 +09:00
37b1e9037f files update 2022-02-02 10:19:17 +01:00
7c0999ac9f settings + PSBT constrain 2022-02-02 10:19:17 +01:00
5ce1c9d77f send + receive constrains 2022-02-02 10:19:17 +01:00
14dcb58afa constrain to lightning settings view 2022-02-02 10:19:17 +01:00
04068025c6 fixes edit payment request 2022-02-02 10:19:17 +01:00
2cd0c7a407 Fix responsive POS and Crowdfund form display
Fixes #3375.
2022-02-02 10:19:17 +01:00
f3592c4782 Update invoice doc link
close #3366
2022-02-02 10:14:36 +01:00
1e5934895d Reference correct payment type definition for webhook events in Swagger docs 2022-02-02 10:09:58 +01:00
0f5d932726 Add test IDs for Lightning and Plugins (#3402)
I came across these when writing a Selenium test for LNbank.
2022-02-02 12:47:22 +09:00
4125726be9 Fix pay button type comparison (#3403)
Fixes #3396. We need to compare the button type value loosely, because initially the type is an integer and after it gets set by Vue it is a string.
2022-02-02 12:37:56 +09:00
bcb692caf0 Pay Button Alert: Add missing alert-link classes (#3397)
* Pay Button Alert: Add missing alert-link classes

* Update alert link styles
2022-02-02 12:37:22 +09:00
ff9a1a1f55 Delete user preferences cookie on logout (#3379)
I think it is a good practice to remove those settings on logout. Otherwise they get persisted across multiple accounts, which might not be desired.
2022-02-01 10:42:31 +09:00
faef6d82ff No error in crowdfund if canvas unavailable 2022-01-31 18:15:28 +09:00
d3a123373e No error in crowdfund if canvas unavailable 2022-01-31 17:05:42 +09:00
7c66f024ed adjust footer (#3389) 2022-01-31 16:52:50 +09:00
20c7259174 Bump z-index on header (#3393)
close #3377
2022-01-31 16:52:14 +09:00
16a4c072a9 Bump 2022-01-28 22:52:56 +09:00
254e8d48f2 Fix test 2022-01-28 22:51:12 +09:00
52fe374aaa Fix new guest store redirect after login
Fixes #3373.
2022-01-28 09:59:40 +01:00
f776725096 Guest users shouldn't see Payouts menu item 2022-01-28 17:49:21 +09:00
6e864c2631 Fix error message when trying to remove last admin 2022-01-28 17:09:54 +09:00
4221554dc8 Add back plugins link in server nav
Not all plugins appear in the side nav menu, and there is no intuitive link to view all installed plugins
2022-01-28 08:56:52 +01:00
6b50fdae43 fixes stray < text (#3374) 2022-01-28 14:52:34 +09:00
7bae6b2e8f bump 2022-01-27 17:17:20 +01:00
5c6a0f22c0 fix ln address
fixes #3367
2022-01-27 17:17:20 +01:00
a9b755fa1d Changelog 1.4.0 (#3328) 2022-01-27 22:24:39 +09:00
72bdf9e0d7 Update "Close Wallet & Lightning Setup" Path (#3362)
* update path

* updates center
2022-01-27 14:33:12 +09:00
cbf8b23385 Adapt desktop breakpoints in views (#3358)
* Add XXL breakpoint

* Unify setup guide display

* Adapt desktop breakpoints in views

* Fix POS code display

* Fix syntax in home view

* store settings + constrain update

* account settings

Co-authored-by: dstrukt <gfxdsign@gmail.com>
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2022-01-27 11:56:46 +09:00
4aacd0d23a Adapt warning message for pay button 2022-01-27 11:43:39 +09:00
69202ed752 Add loading indicator for "Pay" button in POS terminal app (#3342)
* Add loading indicator for "Pay" button in POS terminal app

close #3336

* move feature over to Vue

* replace click handler with form submit handler
2022-01-27 10:58:25 +09:00
aa762821ce Spacing fixes 2022-01-26 15:58:21 +09:00
8a7bb6bc5a Retry SaveChanges if deadlock detected in delete store 2022-01-26 15:09:06 +09:00
35cb4d4cc3 Update Plugins View (#3357)
* visual updates

* badges

* copy update
2022-01-26 15:01:49 +09:00
8ceda3eab1 Fixes (#3356)
* Improve wording

* Fix redirect action
2022-01-26 14:57:35 +09:00
cc1233e8d5 Adjust Pay Button (#3354)
* updates padding

* padding adjustments

* updates

* Redirect to paybutton enable page when disabling

* Fix test

* Fix test

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-01-26 14:55:48 +09:00
70883c0869 Simple Wallet View Inconsistencies (#3355) 2022-01-26 14:54:29 +09:00
fe9de98dd1 Merge pull request #3337 from dennisreimann/merge-general-payment
Store: Combine General and Payment settings
2022-01-25 20:26:45 +09:00
ecde91ff25 Plugins: Support plugin git remote with multiple versions of same plugins 2022-01-25 11:15:19 +01:00
240ad49a43 Add currency selection attributes 2022-01-25 06:57:55 +01:00
10adb23e71 Remove obsolete store hints 2022-01-25 06:57:55 +01:00
c2fc099439 Create store: Add default currency and rate provider fields 2022-01-25 06:57:55 +01:00
723a38da68 Store: Combine General and Payment settings 2022-01-25 06:57:55 +01:00
74037fd605 Make CanUseTorClient more reliable 2022-01-25 12:27:44 +09:00
e917796fce Set new LN defaults (#3325)
fixes #3324
2022-01-25 12:17:39 +09:00
5661798601 Allow plugins access in nav when there is no store (#3351) 2022-01-25 12:15:59 +09:00
a8adac9c5a Rename LNUrlAuthController -> UILNAuthController (#3352) 2022-01-25 11:51:14 +09:00
c62018f984 1.4.0 Final Polish (#3335)
* adds pay button icon

adds more

update icons

* reduces update app titles

* capitalize PP

* more icons

notification icon update

adds more

* Truncate long titles in nav

* Adjust "off" color state for the wallet/lightning

* Theme switch alignment

* Update store selector

* adds more space in store selector span

* Prevent form zoom on mobile Safari

* updates lightning + settings view

* updates store icon

* adjusts notification icon

* removes notifications setting button icon

* Update status colors

* Fix Lightning nav markup

* Prevent icons from shrinking

* Move main menu styles to css

* Remove max-width container for content area

* Update headlines

* Use fixed header on mobile

* Extract custom pills component

* Form field update

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-01-25 11:07:52 +09:00
06f2d4425c re-add theme ui extension 2022-01-24 13:12:12 +01:00
090da6cfb6 Add configurable BOLT11Expiration for refunds (Fix #3281) (#3341)
* Add configurable BOLT11Expiration for refunds (Fix #3281)

* Add BOLT11Expiration configuration in Payment
2022-01-24 20:17:09 +09:00
28dbf10a31 Do not rely on element's id for payment button (#3339)
* Do not rely on element's id for payment button

* Update BTCPayServer/Views/UIStores/PayButton.cshtml

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

* Update BTCPayServer/Views/UIStores/PayButton.cshtml

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

* Update BTCPayServer/Views/UIStores/PayButton.cshtml

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

* Update BTCPayServer/Views/UIStores/PayButton.cshtml

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

Co-authored-by: d11n <mail@dennisreimann.de>
2022-01-24 20:05:22 +09:00
7a66d0feda Shorten environment info (#3350)
Also uses the copyright symbol (instead of an `@`).
2022-01-24 20:01:17 +09:00
e23ddf118e Add warning about the tradeoff the paybutton (#3340)
* Add warning about the security tradeoff of the paybutton

* Update BTCPayServer/Views/UIStores/PayButtonEnable.cshtml

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

* Move message in column

Co-authored-by: d11n <mail@dennisreimann.de>
2022-01-24 20:00:42 +09:00
11d6588249 Add suggestion list for currency inputs (#3347)
* Move tagHelpers in their own directory

* Add suggestion list for currency inputs
2022-01-24 20:00:13 +09:00
30db0cd4f4 Make users table responsive (#3348) 2022-01-24 14:03:56 +09:00
692b57a1ad Fix the notification dropdown not updating without page refresh 2022-01-23 15:49:43 +09:00
7505c65401 Logo Replaced
ETB logo change with a new, more consistent logo with other liquid assets.
2022-01-21 20:49:05 +01:00
54a735ffd9 Pay Button: Fix CSP violations for custom amount and slider (#3334)
Fixes #3241.
2022-01-21 11:11:08 +09:00
6a20d9036c Refactor signed out action views (login, register, etc.) (#3333)
* Refactor signed out action views (login, register, etc.)

Extract common layout and some more cleanups.

* Optimize supporters display on mobile

* Optimize footer display on mobile
2022-01-21 11:10:03 +09:00
c338846d63 Mobile navigation (#3331)
* Mobile nav: Horizontal scrolling

* Reduce nav item spacing on mobile

* Update overlay color

* Fix modal colors

* Improve mobile nav styles

* Improve navbar on mobile Safari

* Scroll active nav item into viewport
2022-01-21 10:35:12 +09:00
c419ad68bb Remove redundant payment methods from store settings (#3323)
* Add enabled toggle to wallet settings view

* Add enabled toggle to Lightning settings view

* Remove redundant payment methods from store settings

* Rename Payment Methods to Payments

* Adapt tests

* Fix invoice state toggle on details page

* Add spacing on Lightning sett8ings page
2022-01-19 20:58:02 +09:00
51c486c15a Add Lightning page with services (#3308)
* Add Lightning page with services

* Adapt other services pages

* Display Lightning services only for internal node
2022-01-19 11:52:05 +09:00
306ff3d919 Auto-submit scanned login code
Closes #3321.
2022-01-18 15:42:09 +01:00
d667b8ae8b Add LNURL support to Crowdfund 2022-01-18 12:26:15 +01:00
72d728eb47 Update BTCPayServer/Views/UIAccount/LoginWithFido2.cshtml 2022-01-18 12:25:56 +01:00
801ab862a3 Improve 2FA auth UI 2022-01-18 12:25:56 +01:00
d7b4dd2d4c Show action button for safari browsers when using FIDO2 (#3322)
fixes #3197
2022-01-18 10:23:07 +09:00
1d3f74c8bb Home sweet home (#3313)
* Link to store home, show home only if there is no store

* Handle store guest case

* Apply correct policies to nav items
2022-01-18 10:20:59 +09:00
c3f73c0de3 Content Consistency Updates (1.4.0) (#3316)
* updates

* updates

* updates

* updates

* updates

* moves api key CTA to top right

* updates

* more updates

* more updates

* Fix active state when "Account" is selected

* Update wording in subnav: Profile becomes Account

* Fix email test

* Update Emails wording

* Try to fix email test

* Make General first tab in store settings

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-01-18 10:19:27 +09:00
1fc2fc7a11 Merge pull request #3317 from BTCparadigm/patch-1
Update LICENSE
2022-01-17 17:18:36 +09:00
13ea1898b6 Merge pull request #3314 from dennisreimann/theme-colors
Theme colors
2022-01-17 17:16:26 +09:00
586303f47e Merge pull request #3319 from NicolasDorier/wfuoi
Make sure the SubscribeAsync handlers are executed in order
2022-01-17 17:16:03 +09:00
ce86a838f2 Merge pull request #3315 from dennisreimann/2fa-login
Fix secondary login view
2022-01-17 17:15:51 +09:00
21e69251e3 CanSendIPN can't ensure received payment is sent first 2022-01-17 16:59:37 +09:00
a42323a527 Make sure the SubscribeAsync handlers are executed in order 2022-01-17 13:36:33 +09:00
14da3023d8 Merge pull request #3310 from NicolasDorier/niceurl
Use nicer urls, part2 (Fix #921)
2022-01-17 11:41:20 +09:00
7eb5f57478 Fix Rates page 2022-01-17 11:25:33 +09:00
2cb443df8a Update LICENSE 2022-01-16 16:11:22 +02:00
961769ebd0 Fix AssertNoError to detect page exception 2022-01-16 12:39:08 +09:00
3266cc8e3b Improve Lightning node toggle colors 2022-01-15 21:07:01 +01:00
3dec14b89d Fix secondary login view 2022-01-15 20:49:04 +01:00
a67f989dda Theme variable value updates 2022-01-15 20:20:52 +01:00
2d05464b17 Light theme: Use off-white bg for content 2022-01-15 19:56:38 +01:00
a39082e565 Add scrollbar styles 2022-01-15 19:54:50 +01:00
d1f567eade Add Include Error Details to postgres connection string 2022-01-15 14:54:06 +09:00
b9fdd54538 Use nicer urls, part2 (Fix #921) 2022-01-15 14:54:06 +09:00
7243aec213 Support LNURL Auth 2022-01-14 13:26:30 +01:00
1fb582c35d Rename the Fido2Controller 2022-01-14 18:34:30 +09:00
c6da0409b0 Merge pull request #3307 from NicolasDorier/fewiwqi
Update some code style enforcement
2022-01-14 18:05:50 +09:00
50d4b55f73 Warning if not using 'simple using' 2022-01-14 17:50:29 +09:00
c6a7e90c1a Warning if not using 'is not null' 2022-01-14 17:48:15 +09:00
5cbc2e96e7 Merge pull request #3261 from NicolasDorier/qfouq
Rename controllers
2022-01-14 16:23:47 +09:00
23a96c07ae Rename GreenField -> Greenfield 2022-01-14 13:46:04 +09:00
7a787fc945 Rename UI controllers 2022-01-14 13:46:03 +09:00
ce43de0c57 Rename greenfield controllers 2022-01-14 12:21:06 +09:00
eaf47d3739 Rename controllers Bitpay controllers 2022-01-14 12:21:06 +09:00
5eebdb6774 Use nicer urls (Fix #921) (#3304) 2022-01-14 12:20:50 +09:00
51db1593d6 Remove stores list (#3300) 2022-01-14 11:59:27 +09:00
223c71ce8b Fix tests 2022-01-13 23:50:33 +09:00
127afdb5c1 Store-Centric Minor Tweaks (#3276)
* padding above store selector + left & right content padding

* Adapt vertical spacing for content area

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-01-13 20:29:38 +09:00
f34706f9f0 Update lightning lib 2022-01-13 19:18:14 +09:00
f76ce54109 Fix tests 2022-01-13 18:14:27 +09:00
f67fa6a5d6 Remove right to admins to bypass permissions to modify/view invoices or stores (#3297) 2022-01-13 17:42:32 +09:00
5ad6d77973 The notification dropdown wasn't fetching events if rootPath used (#3299) 2022-01-13 17:08:33 +09:00
69d1acc797 Empty states: Setup guide for store and wallet (#3255)
* Store Selector: Create first store button

* Add setup guide to homepage

* Policy update for stores list

* Fix test

* Initial create store button as primary

* Add notifications list to homepage

* Remove back to list from store create view

* Adapt content padding on desktop

* Add store home view with setup guide

* Fix active page nav highlighting

* Test fix

* Remove What's Next section

* Rename Store Home to Dashboard

* Fix Lightning setup link

* Add tests for store setup guide

* Update BTCPayServer/Views/Home/Home.cshtml

Co-authored-by: Pavlenex <pavle@pavle.org>

* Update BTCPayServer/Views/Stores/Dashboard.cshtml

Co-authored-by: Pavlenex <pavle@pavle.org>

* Remove setup guide on global homepage

* Remove Shopify setup link from nav

* Fix content container max-width on desktop

Co-authored-by: Pavlenex <pavle@pavle.org>
2022-01-13 17:08:15 +09:00
0c0235a56e Merge pull request #3298 from NicolasDorier/wfwiouoi
Add version to svg's href files to prevent cache issues
2022-01-13 15:55:14 +09:00
7b0558dc8e Add version to svg's href files to prevent cache issues 2022-01-13 15:54:40 +09:00
77be2fa9d5 Make CanUseWebhooks less flaky 2022-01-13 13:27:02 +09:00
8f320337e0 Merge pull request #3296 from dennisreimann/clipboard
Fix clipboard copy edge case
2022-01-13 13:23:26 +09:00
2327b97fa3 Make CanUseWebhooks less flaky 2022-01-13 13:21:54 +09:00
a411a6a81a Fix copy functionality without navigator.clipboard 2022-01-13 11:50:37 +09:00
d66f1f5513 Remove duplicate event handler 2022-01-12 16:22:56 +01:00
7503fde48c Merge pull request #3295 from NicolasDorier/foiuw
Make BTCPayServer insensitive to the working directory in which it is started (Fix #1894)
2022-01-12 20:45:09 +09:00
20c8916610 Make BTCPayServer insensitive to the working directory in which it is started (Fix #1894) 2022-01-12 20:20:26 +09:00
5a2a933b64 Add more logs to the canusetor test 2022-01-12 18:26:45 +09:00
ffc0e996db Merge pull request #3294 from NicolasDorier/fewouq
Bump Clipboard.js
2022-01-12 16:59:36 +09:00
a02ad104ee Bump Clipboard.js 2022-01-12 16:06:28 +09:00
625876ff07 Merge pull request #3293 from bolatovumar/fix/vscode-browser-launch
Adjust VSCode browser launch regex
2022-01-12 14:25:34 +09:00
b935275fd9 Adjust VSCode browser launch regex
VSCode stopped launching BTCPay in a new browser tab after this commit: ab3aab9c22 (diff-2baea61aec1a18e36f951b0060f693c9bd10d9610e2681d36277e79d101005bcR66)
2022-01-11 21:11:15 -08:00
4c032e9e6a Merge pull request #3290 from dennisreimann/tor-url-in-footer
Improve footer
2022-01-12 11:19:54 +09:00
1b770c66cd Improve footer 2022-01-11 18:56:30 +01:00
96259dfb49 Merge pull request #3289 from NicolasDorier/oiufew
Do not send email twice for bitpay API, log whether IPN is an ExtendedNotification. (Fix #968)
2022-01-12 00:42:44 +09:00
e4d9e3e22e Do not send email twice for bitpay API, log whether IPN is an ExtendedNotification. (Fix #968) 2022-01-12 00:26:12 +09:00
fbfab88257 Remove obsolete code in BitpayIPNSender 2022-01-12 00:10:55 +09:00
708f8b49df [Greenfield] Let non-admin update LN payment method with internal node if it is unchanged (Fix #2860) (#3288) 2022-01-11 23:38:05 +09:00
323e5e14a3 Update Payment Request View (#3259)
* removes "back to list"

* changes currency label + formats currency and amount

* adjust sizing

* Wording: Create and Save button

* Improve search responsive behaviour

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2022-01-11 22:16:16 +09:00
5bbaa48b49 Fix change state broken in the UI and update invoice's status in payment request to new convention (Fix #3265) (#3286) 2022-01-11 21:49:56 +09:00
cd91e48713 Swagger: Added explanation for empty currency field in Create Payment Request (#3285)
* Swagger: Added explanation for empty currency field in Create Payment Request

* Added nullable true
2022-01-11 20:11:11 +09:00
7444bd06e4 [Greenfield] Fix create/update payment requests expiry field and allow null currency field (Fix #3222) (#3284) 2022-01-11 18:42:44 +09:00
0017e687db A store's guest should be able to manage lightning invoices (Fix #3212) (#3283) 2022-01-11 17:22:10 +09:00
5865fd5022 Improve Payout View (#3260)
* updates payouts

* update spacing

* improvements

* View updates

* updates spacing

* Fix spacing

* Fix markup

* Fix test

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-01-11 17:15:23 +09:00
4b941a5145 Update Invoice Views (#3264)
* updates create invoice

* updates invoice list

* formats

* updates row

* updates

* Improve invoice list markup and fix mass action form

* Responsive invoice table

* Improve spacing on invoice detail view

* Improve archive message

* Responsive status change partial

* Add test case for mass archiving

* Add mass unarchiving

Closes #3270.

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-01-11 17:14:34 +09:00
3c5d809cf9 Merge pull request #3282 from NicolasDorier/wofiq
The IPN notification manager should preserve IPN ordering
2022-01-11 15:22:07 +09:00
ba101015f6 Use the MultiProcessingQueue in IPNSender 2022-01-11 15:06:00 +09:00
6999abe1ca Rename WebhookNotificationManager -> WebhookSender 2022-01-11 13:21:38 +09:00
cb295e20d4 Rename InvoiceNotificationManager -> BitpayIPNSender 2022-01-11 13:21:38 +09:00
c6df43363f Extract MultiProcessingQueue from WebhookNotificationManager 2022-01-11 13:21:38 +09:00
81cec36b68 Merge pull request #3279 from NicolasDorier/quofwe
[Greenfield] if some json property are invalid, throw nice error instead of an exception (Fix #2795)
2022-01-10 23:56:57 +09:00
47c1ffe53f Fix doc for address preview of derivation scheme 2022-01-10 23:03:30 +09:00
90a9051827 Merge pull request #3273 from dstrukt/improve-lightning-config-view
Simple Lightning Node Selector Improvement
2022-01-10 22:13:38 +09:00
8bea3dd21e [Greenfield] if some json property are invalid, throw nice error instead of an exception (fix #2795) 2022-01-10 22:11:04 +09:00
e164b1f169 The PayButton should select the default currency of the store as default 2022-01-10 20:37:36 +09:00
383765f5fe Solve spacing via CSS 2022-01-10 12:22:12 +01:00
25a59fff4a Merge pull request #3275 from NicolasDorier/oifwuq
Improve error message for create store wallet transaction (Fix #3256)
2022-01-10 18:00:39 +09:00
03af471f65 Improve error message for create store wallet transaction (Fix #3256) 2022-01-10 11:59:13 +09:00
d189deefb4 adds secondary button look to rounded tab nav 2022-01-09 03:04:32 -08:00
e957180618 Merge pull request #3269 from btcpayserver/odqiq
Validate the name of controllers when LinkGenerator
2022-01-08 14:32:55 +09:00
47d8d3cdb1 Validate the name of controllers when LinkGenerator 2022-01-08 14:16:17 +09:00
f364451a96 Merge pull request #3262 from dstrukt/remove-back-to-list-ctas
Remove remaining "Back to list" CTAs
2022-01-08 12:21:04 +09:00
2c51b31c62 Merge pull request #3267 from dennisreimann/store-centric-account
Account menu improvement
2022-01-08 12:20:04 +09:00
0dcf240faf Account menu improvement 2022-01-07 17:25:28 +01:00
88bc1c64d2 Fix tests 2022-01-07 21:47:19 +09:00
84bd8a6e98 fix tests 2022-01-07 21:16:26 +09:00
0d657fc646 Fix tests 2022-01-07 20:54:26 +09:00
64b85ac1f9 Fix AssertNoError 2022-01-07 19:49:33 +09:00
81c1cc6728 Add rockstar friendly error 403 2022-01-07 19:46:38 +09:00
098879585a Merge pull request #3263 from NicolasDorier/qouif
Fix CookieAuthHandler and guest permission to invoice's view
2022-01-07 18:31:23 +09:00
fc91077430 A store's guest should be able to see invoice information 2022-01-07 18:10:31 +09:00
b71a04943b CookieAuthHandler shouldn't set store context if appId/payReqId/invoiceId is not found 2022-01-07 18:10:31 +09:00
dd4fb68e5b invoices - remove 2022-01-06 23:01:04 -08:00
a085a2a557 apps - remove 2022-01-06 22:58:14 -08:00
fa84e34def Fix test 2022-01-07 13:02:07 +09:00
8c3f377fc0 fix elements 2022-01-06 18:09:06 +01:00
f9d14c64ce Simple Improve Receive Wallet View (#3251)
* removes card styles

* removes card styles

* removes card style

* Minor improvements

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-01-05 20:23:36 +09:00
fc687f9fc0 Fixed LND admin macaroon hexdump command (#3252)
Argument `-plain` didn't work for me in the LND container, but `-p` did. 
The error I got was `xxd: invalid number 'ain'`

Added the `-c 256` for better readability. This param maxes out at 256.
2022-01-05 20:23:21 +09:00
57071d7bc8 Replace Square Crypto with Spiral (#3254)
Closes #3253
2022-01-05 20:22:24 +09:00
324a246189 Fix dockerfile 2022-01-03 22:11:33 +09:00
a706f81760 Fix VSCode launch.json for .NET 6 (#3242) 2022-01-03 12:09:43 +09:00
ab3aab9c22 Make BTCPayServer works with dotnet watch hot reload 2022-01-01 22:05:51 +09:00
fd2e55e444 Simplify tests to take advantage of context (#3246) 2021-12-31 22:02:53 +09:00
04b8eafacb Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
e2d0b7c5f7 Store centric UI: Part 3 (#3224)
* Set store context in cookie

* Fix page id usages in view

* Move Pay Button to nav

* Move integrations to plugins nav

* Store switch links to wallet if present

* Test fixes

* Nav fixes

* Fix altcoin view

* Main nav updates

* Wallet setttings nav update

* Move storeId cookie fallback to cookie auth handler

* View fixes

* Test fixes

* Fix profile check

* Rename integrations nav extension point to store-integrations-nav-list

* Allow strings for Active page/category for plugins

* Make invoice list filter based on store context

* Do not set context if we are running authorizer through tag helper

* Fix test and unfiltered invoices

* Add permission helper for wallet links

* Add sanity checks for payment requests and invoices

* Store context in home controller

* Fix PayjoinViaUI test

* Store context for notifications

* Minor UI improvements

* Store context for userstores and vault controller

* Bring back integrations page

* Rename notifications nav pages file

* Fix user stores controller policies

* Controller policy fixes from code review

* CookieAuthHandler: Simplify CanViewInvoices case

* Revert "Controller policy fixes from code review"

This reverts commit 97e8b8379c2f2f373bac15a96632d2c8913ef4bd.

* Simplify LayoutSimple

* Fix CanViewInvoices condition

Co-authored-by: Kukks <evilkukka@gmail.com>
2021-12-31 16:36:38 +09:00
db1a124ffb Do not check certificates for SMTP settings if local server 2021-12-29 18:24:24 +09:00
0dcfbe8581 Remove internal socks http proxy and use .net60 socks support (#3240) 2021-12-28 18:57:22 +09:00
0e1b872777 Update dotnet version in README 2021-12-28 17:40:36 +09:00
ed5b159fb6 Use ArgumentNullException.ThrowIfNull everywhere (#3239) 2021-12-28 17:39:54 +09:00
9b7ca76b99 Use Outstanding amount for shopify order invoices (#3203)
* Use Outstanding amount for shopify order invoices

* consider shopify order may have multiple transactions

* Use presentment currency not just currency

fixes #2683
2021-12-28 15:56:54 +09:00
eeebb99ca3 Consistent and simplified button CTA text (#3234)
* refine pull payments cta

* payment requests cta

* invoice cta

* add user cta

* webhooks cta

* set password cta

* removes whitespace

* set password cta

* api key cta

* change password cta

* add device 2fa cta

* create token cta

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2021-12-28 15:54:31 +09:00
e2b18cf9db Make sure dotnet test show test progress 2021-12-27 14:26:03 +09:00
955ba91770 Merge pull request #3233 from NicolasDorier/fwihqb
Bump to C#10, remove warnings
2021-12-27 14:10:23 +09:00
c0e9f91bdc Fix warnings 2021-12-27 13:58:18 +09:00
259f0b5aad Bump to C# 10 2021-12-27 13:20:57 +09:00
02419dcdd1 Migrate to .net6.0 (#3198) 2021-12-27 13:15:43 +09:00
4a66c91cac Fix app permissions (#3227)
* Fix app permissions

As pointed out by @nicolasdorier [here](https://github.com/btcpayserver/btcpayserver/pull/3205#issuecomment-999437555).

* Fix for login codes view

* Ensure app belongs to store
2021-12-26 12:20:46 +09:00
48ac996d77 Sign in with other device (quick mobile login) (#2504)
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2021-12-24 09:27:00 +01:00
82b4debcac Renamed Payment Request "Created" field to "CreatedTime" for consistancy since we already have a breaking change (#3230) 2021-12-23 14:48:10 +01:00
5f5f71bf37 Normalize greenfield responses for 404s (#3220) 2021-12-23 13:32:08 +09:00
ae33fc3031 PaymentReq "Created" field is not really a unix timestamp in JSON. Also renamed to "CreatedTime" like with invoices (#3221)
* PaymentReq "Created" is not really a unix timestamp in JSON. Also renamed to "CreatedTime" like with invoices

* Renamed field so it is not a breaking change

* Update swagger.template.payment-requests.json
2021-12-23 13:30:49 +09:00
f63a9ed1a0 Added field "StoreId" to a Payment Request in Greenfield 2021-12-22 16:17:35 +01:00
9843f66bb6 Add example to cryptoCode in greenfield doc 2021-12-22 11:39:43 +09:00
b2c1846ebb Update link in README.md (#3219) 2021-12-21 09:32:39 +01:00
8e5a9251d6 Address feedback from code review
Thanks @kukks
2021-12-21 09:24:09 +01:00
3a59e2a5c4 Cache resolved store items in HTTP context 2021-12-21 09:24:09 +01:00
38ff3e5e89 Fix footer position on large breakpoints 2021-12-21 09:24:09 +01:00
1f0653985a Apply permission tag helpers to main navigation 2021-12-21 09:24:09 +01:00
a4fa61e5f6 Authorize invoice refund route
The customer gets a pull payment route to initiate the refund, so this one is only for merchants and needs to be authorized.
2021-12-21 09:24:09 +01:00
b68eae6f7d Re-add status messages to pull payments and payout views 2021-12-21 09:24:09 +01:00
2d7c5cabab Refactor page titles and active page functionality 2021-12-21 09:24:09 +01:00
42e731369e Remove section nav for pull payments and payouts 2021-12-21 09:24:09 +01:00
7d2627551b Store Settings nav update 2021-12-21 09:24:09 +01:00
f4bde164bf Changed API policy for calculating feeRate (#3217) 2021-12-20 11:16:23 +01:00
bb751793c8 Various minor UI fixes and cleanups (#3208)
* Copy to clipboard fix

* Improve invoice status change wording and JS

* Re-add ability to delete apps

Now that the list view is gone, we need to move this option to the edit view

* Clean up app and payment request bundles

* Fix for invoice status change when dismissed
2021-12-19 13:05:10 +09:00
c68141119c [Greenfield] Send forbid 403 rather than empty results on /api/v1/stores (#3215) 2021-12-19 01:01:54 +09:00
163d1a195d Fix: DateTime passed to bitpay API weren't assumed UTC, remove DateTime.Now references (#3206) 2021-12-17 15:31:06 +09:00
6de4f6a3ac Mention the missing API permission in the response of a Greenfield request (#3195)
* Mention the missing API permission in the response header or body

* Fixes + Added a unit test. 1 TODO remains.

* Added MissingPermissionDescription to the error

* Update BTCPayServer.Tests/GreenfieldAPITests.cs

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>

* Fix tests

* [GreenField]: Make sure we are sending fully typed errors

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2021-12-16 23:04:06 +09:00
89a52703f6 Merge pull request #3204 from NicolasDorier/fixlightningapi
[Greenfield] Various store's lightning api fixes
2021-12-16 14:41:46 +09:00
4f7eeea14e Greenfield: Improve error message, do not use internal lightning node on store's lightning API 2021-12-16 14:27:34 +09:00
bbddd72780 Fix permissions required for store's lightning node in doc 2021-12-16 12:31:24 +09:00
ac099aa513 Change implementation of the Smtp server (#3202)
* Change implementation of the Smtp server

* Update BTCPayServer/Services/Mails/EmailSettings.cs

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

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2021-12-15 21:30:46 +09:00
ece5401121 Bump QR and LNURL libs 2021-12-15 10:14:20 +01:00
fd7b11518c Update changelog 2021-12-14 12:14:33 +09:00
9a70b4487c Fix: serverinfo 'available' wasn't set for BTC 2021-12-14 00:05:41 +09:00
19af02e71b Fix issue in invoice - changing the payment method (#3169) 2021-12-12 15:04:43 +09:00
619aa05e14 Update invoice state hint display (#3188) 2021-12-12 00:26:45 +09:00
cc60958b30 Upgrade Lightning lib (#3187) 2021-12-11 14:32:28 +09:00
bd2f35a241 Remove Ethereum support (#3182) 2021-12-11 14:31:41 +09:00
cf78987fab Fix LN Node availability check (#3189) 2021-12-11 14:31:25 +09:00
f8e6b51e9d Store-centric UI (#3091)
* Update layout structure and header

* Implement store selector

* Simplify homepage

* Update layout

* Use dropdown for store selector

* Hide global nav in store context

* Horizontal section nav

* Remove outer section and container from content views

* Update nav

* Set store context for invoice and payment request lists

* Test fixes

* Persist menu collapse state on client-side

* MainNav as view component

* Update app routes to incorporate store context

* Test fixes

* Display ticker for altcoins build only

* Plugins nav

* Incorporate category for active page as well

* Update invoice icon

* Add apps list to nav

* Add store context to app type controllers

* Incorporate id for active page as well

* Test fixes

* AppsController cleanup

* Nav: Display only apps for the current store

* Remove leftover from merge

* Nav styles optimization

* Left-align content container

* Increase sidebar padding on desktop

* Use min-width for store selector menu

* Store settings nav update

* Update app and payment request routes

* Test fixes

* Refactor MainNav component to use StoresController

* Set store context for invoice actions

* Cleanups

* Remove CurrentStore checks

The response will be "Access denied" in case the CookieAuthorizationHandler cannot resolve the store.

* Remove unnecessary store context setters

* Test fix
2021-12-11 12:32:23 +09:00
2b1436e303 Fix build warning in Invoice Testing Controller (#3191) 2021-12-10 12:31:04 +01:00
cf772bb9e0 Improvements for disabled plugins status indicators (#3168)
* Improvements for disabled plugins status indicators

close #3150

* Improve spacing

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-12-08 13:47:35 +09:00
fd75008499 Allow pull payments for store guests (#3128) 2021-12-08 00:40:24 +09:00
e113c12768 Fix copy pay button code (#3175) 2021-12-04 21:12:15 +01:00
3acda5b342 Fix code display (#3172) 2021-12-04 09:20:35 +01:00
bbea9d7a27 Swagger fixes (#3170) 2021-12-04 09:20:23 +01:00
b0125adfe9 Merge pull request #3165 from MsFloofie/patch-1
Fixed spelling mistake
2021-11-30 20:56:46 +01:00
d3b28a98be Fixed spelling mistake
Changed a misspelling from "synch" to "sync" ;)
2021-11-29 16:17:38 -05:00
c679654ada Send block reward to a random address instead of the invoice address. Default mine 1 block. (#3164)
* Send block reward to a random address instead of the invoice address. Default mine 1 block.

* Using a random address for the block reward
2021-11-29 19:44:56 +09:00
26f3cffe5c Fix possible null reference exception when creating a pull payment (#3162)
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2021-11-29 07:26:30 +01:00
8f0d82d219 Cheat mode to mine blocks (#3163) 2021-11-29 07:23:56 +01:00
6fec929656 Remove infinite loop in test 2021-11-27 11:40:06 +09:00
ec68d2a0e6 Remove Confirmed state in UI (#3090)
* Remove Confirmed state in UI

Closes #1789.

* Add infobox & improve refund tooltip

* Update BTCPayServer/Views/Invoice/ListInvoices.cshtml

Add @dennisreimann suggestion

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

* Add "don't show again" button

Adds a "Don't Show Again" button to the infobox. Also a bugfix that was preventing the new status from showing in the invoice details page.

* Add User blob and move invoice status notice to it

Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: Kukks <evilkukka@gmail.com>
2021-11-26 23:13:41 +09:00
f6afb9a3f0 CheatMode should use NBXplorer RPC proxy rather than hardcoded client 2021-11-26 18:34:40 +09:00
70bb6d999e Fix lightnign flaky test 2021-11-26 15:08:28 +09:00
e9074a8ec1 Test improvement exposing failing test (#3120)
* Test improvement exposing failing test

* Test fixes

* Fix test

* update alt compose

* Fix test CanUsePullPaymentsViaUI

* Fix CanChangeUserMail

Co-authored-by: Kukks <evilkukka@gmail.com>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2021-11-26 15:02:30 +09:00
9b730e784f Add pagination for API GetNotifications (#3145) 2021-11-26 11:55:59 +09:00
57852821f5 Remove sync modal from "Forgot password" page (#3159)
* Update "Forgot password" page layout

* Fix null reference error
2021-11-26 11:54:33 +09:00
87061ecfc0 Support BC-UR v1 wallet import (#3080)
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-11-25 10:25:22 +01:00
d555d2f3f6 Fix flaky alert message lookup 2021-11-25 10:24:14 +01:00
3b3fac98ad Improve Lightning settings display 2021-11-25 10:24:14 +01:00
285a30f67a Plugins: Provide extension points for Lightning setup 2021-11-25 10:24:14 +01:00
fa83304697 Improve time helper to also work with future datetimes 2021-11-25 10:24:14 +01:00
e42ef4b2f8 Plugins: Update startup for plugin compatibility 2021-11-25 10:24:14 +01:00
cc3908cdb3 Checkout: Fix UI flickering on payment method change (#3158) 2021-11-25 10:22:45 +01:00
e3def45c83 Update Bitbank API (#3157)
Co-authored-by: Kukks <evilkukka@gmail.com>
2021-11-25 09:34:49 +01:00
4fe4cdb7bf Redirect to payment requests page instead of edit page on archive action (#3142)
* Redirect to payment requests page instead of edit page on archive action

* Remove unused "using" directive
2021-11-24 20:27:56 +09:00
11a9b10a54 Minor visual improvements to various Server Settings views (#3152) 2021-11-24 09:59:19 +01:00
5164402e27 Merge pull request #3149 from btcpayserver/qoufhe
Remove Logs static singletons
2021-11-24 17:37:47 +09:00
20f32e94a8 Run tests in parallel 2021-11-23 19:17:17 +09:00
35aad4ebf9 Remove Logs static singletons 2021-11-23 13:55:34 +09:00
d60e4f8fe4 Merge pull request #3148 from btcpayserver/fweoqh
Isolate tests requiring internet access
2021-11-23 13:28:05 +09:00
e5a5eb3547 Add third party tests to the suite, skip azure test if not configured 2021-11-23 13:26:47 +09:00
fbb4b13898 Isolate tests requiring internet access 2021-11-23 12:53:05 +09:00
573f1ddf76 Move fast tests in own class (#3144) 2021-11-23 00:49:51 +09:00
ead0f284f2 Simple Invoice Detail View Cleanup (#3100)
* changes copy to "unarchive", more clear

* adds semibold custom class

* adds class to TH elements & uppercases labels

* whitespace and padding patches

* uppercase patches

* removes class in site.css + updates class name

* Fix test

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-11-22 13:57:20 +09:00
6ff659fb99 Simple Payment Request and Pull Payment Views Improvements (#3127)
* adds border radius to payment request view

* adds border radius to pull payments view

* spacings + font weights

* paddings + font weights

* updates text color

* updates font weights + text colors

* padding consistency

* switches padding to empty state

* update

* another padding fix

* Add "no details provided" when empty description

Co-authored-by: Samuel Adams <samuel.atwood@gmail.com>
2021-11-22 13:56:43 +09:00
194c0f14cb Format perk value correctly in crowdfund app (#3141)
close #3109
2021-11-22 13:55:07 +09:00
7ab78fff3f Invoice View Improvements (#3092)
* view improvements

* improves label, adds section headers, re-orders

* Available payment methods as checkboxes

* adds required label

* Update default payment method label

Thanks @woutersamaey for the suggestion.

* Move POS data and notifications to additional options

* Update display names

* adds checkbox to pull payments

* updates label

* Revert "updates label"

This reverts commit 9ed320e863951534d0dd359c13ec7dbaa4e1bd56.

* Revert "adds checkbox to pull payments"

This reverts commit 28ea6bfb6ed17df8cc44117814bffdfc80c12e70.

* removes required label

* Select all supported tx currencies by default

Slight modification to the checkbox list.

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: Samuel Adams <samuel.atwood@gmail.com>
2021-11-22 13:54:42 +09:00
eabe24bb3e changelog and bump 2021-11-20 22:45:21 +09:00
c01fae5fcd Bump LND (#3130) 2021-11-20 22:41:35 +09:00
c088e0fd55 add extension point in ui 2021-11-18 16:07:54 +01:00
cb1dbe7662 Improve invoice warning for no payment method configured
Closes #3085.
2021-11-18 10:05:37 +01:00
03f8d6693d Improve Access Tokens View (#3118)
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-11-18 10:04:20 +01:00
6813a6ea63 Refactoring: Invoice UI Controller cleanups
Simple and IDE proposed changes and cleanups I came across while working on #3092.
2021-11-18 10:02:24 +01:00
4cd18a1b28 Improve Pay Button View (#3112)
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-11-18 09:58:29 +01:00
90907c6306 Improve Store User View (#3117) 2021-11-18 09:56:25 +01:00
c67b2be9d2 Fix Taproot checks after code removal
Necessary additions to 8d6c5dcd651c661e27f7dd7bfeac1e9a30540afa
2021-11-17 13:40:55 +01:00
8d6c5dcd65 Remove useless code 2021-11-16 21:02:25 +09:00
e5fa6fa55a Updates Pull Payment Payment Method (#3107)
* adds checkbox to pull payment

* adds label improvement

* removes "back to list"

* Remove superfluous style block

Seems to be a copy and paste remainder

* Make custom CSS additional options

* Fix input name and test

* Improve display for case with only one payment method

* Fix test

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-11-16 12:58:17 +09:00
748c92436f Improve Rates View (#3105)
* updates headers + changes copy

* type improvement

* updated copy

* updates copy

* updates copy

* Advanced rate rule scripting toggle

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-11-16 12:50:35 +09:00
e98c6e69d4 Update POS accordion 2021-11-15 16:43:59 +01:00
c389aa0b99 Apply form styles to rich text editor 2021-11-15 16:43:59 +01:00
8696710ad1 Update app accordions 2021-11-15 16:43:59 +01:00
ce3bf91b29 Move custom CSS into additional options 2021-11-15 16:43:59 +01:00
2f5f397d33 Remove taproot activation code 2021-11-15 23:03:10 +09:00
b196bad75f Update changelog 2021-11-15 22:50:13 +09:00
b97dfa841a make elements regtest start with dynfed 2021-11-15 13:10:00 +01:00
31cf2671f5 Optimize admin user list 2021-11-15 10:28:45 +01:00
56c8e43ce8 Test fix 2021-11-15 09:35:56 +01:00
d7dc70c679 adds required label dot 2021-11-15 09:35:56 +01:00
ed0d7b75b5 updates left nav 2021-11-15 09:35:56 +01:00
7649f88173 updates title 2021-11-15 09:35:56 +01:00
e9b8035eae adds title and exposes delete 2021-11-15 09:35:56 +01:00
46486704ab notification updates 2021-11-15 09:35:56 +01:00
a6cee23591 2FA updates 2021-11-15 09:35:56 +01:00
33b5ade2b1 padding 2021-11-15 09:35:09 +01:00
0299eb1d24 whitespace 2021-11-15 09:35:09 +01:00
4f9ea39554 updates title 2021-11-15 09:35:09 +01:00
a2a49636e0 cleans up api key list view 2021-11-15 09:35:09 +01:00
609fd131eb Fix indentation. 2021-11-15 09:33:12 +01:00
08a3fb76fb Adding job to rebuild docs (swagger api) on new tag. 2021-11-15 09:33:12 +01:00
d5c38ef336 Add crypto code for invoice and pull payment payout API response (#3099)
* Add "cryptoCode" for invoice payment method API endpoint response

* Add "cryptoCode" for pull payment payout API endpoint response

* Add "#nullable enable" to GreenFieldInvoiceController

* Add "#nullable enable" to GreenfieldPullPaymentController
2021-11-15 14:25:59 +09:00
03d2b6eabe Checkout page of 0 amount invoices shouldn't crash, but 404 2021-11-15 13:51:36 +09:00
cbcd59c996 Prevent creation of on-chain invoices below the dust limit (#3082)
* Prevent creation of on-chain invoices below the dust limit

Fixes #3071.

* Apply suggestions from code review

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>

* small fix

* Fix selenium test

0.000000012 BTC (whether rounded or not) is below the dust threshold, causing this test to fail.

* fix CanCreateTopupInvoices test

Don't apply dust threshold conditional for topup invoices.

* Fix test, and minor changes

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2021-11-15 13:48:07 +09:00
c5dc7475a6 Fix type of property cryptoCode (#3088) 2021-11-15 13:15:48 +09:00
40dff0381b Fix bug with fraction amount display in crowdfund app (#3098)
* Update formatting

* Adjust formatting

* Adjust formatting

* Fix bug with BTC fraction amount display
2021-11-15 13:14:55 +09:00
39a1834a75 Merge pull request #3093 from satwo/fix-pull-payout-bug
Fix payout/pull payment crash when no payment method bug
2021-11-15 13:13:40 +09:00
84694d55ad Merge pull request #3101 from bolatovumar/fix/crowdfund-public-display-text
Show correct note when crowdfund is publicly visible
2021-11-15 13:10:07 +09:00
605920b421 Merge pull request #3102 from bolatovumar/fix-transaction-row-display-issues
Fix transaction row display issues
2021-11-15 13:09:32 +09:00
c2a420a291 Fix typo: "Prioriy" -> "Priority" (#3103) 2021-11-15 13:09:15 +09:00
037a77a573 Update Swagger docs for webhook event types (#3104)
close #2999
2021-11-15 13:08:54 +09:00
b366e5dbf7 Fix issue with too much padding in comment input box 2021-11-14 16:18:59 -08:00
a277072968 Fix issue with weird label buttons 2021-11-14 16:17:16 -08:00
5523b554f1 Fix issue with giant label input group button 2021-11-14 16:07:27 -08:00
6ae9dee982 Fix giant "Save comment" button issue 2021-11-14 16:02:32 -08:00
dae4577b43 Fix label display issue 2021-11-14 16:02:11 -08:00
6ac9c74028 Show correct note when crowdfund is publicly visible
See discussion here: https://github.com/btcpayserver/btcpayserver/discussions/2968
2021-11-14 15:34:18 -08:00
a7ef9c7c27 Fix payout/pull payment crash when no payment method bug
Fixes #3084.
2021-11-12 20:09:32 -05:00
08f57558da Fake payment fixes (#3058)
Fixes and various minor improvements for the fake payment form.
2021-11-11 18:31:15 +09:00
28694859c9 Wallet settings merge (#3072)
* Wallet settings merge

Merges both wallet settings screen from the wallets and the store section. Closes #2626.

* Improve wallet transactions view

* Remove unnecessary row/col construct
2021-11-11 14:30:19 +09:00
be7cef29d8 UI changes
Removes the separate column for view style and instead appends it to the App Type column.
2021-11-10 10:52:14 +01:00
e914c84ad3 Adds View Style to Apps list 2021-11-10 10:52:14 +01:00
193b209c92 Add setup links for LN URL integration (#3046) 2021-11-10 10:50:39 +01:00
d5b25dde3d Add admin badge to user list (#3033)
Co-authored-by: d11n <mail@dennisreimann.de>
2021-11-10 10:49:16 +01:00
931aa297cd Fix LockSubscription bug (#3081)
This addresses an obscure issue where `LockSubscription` is unintentionally set to `true`,
which results in a large number of tests failing. h/t to @NicholasDorier for the assist.
2021-11-10 12:28:54 +09:00
fa10249893 Update Changelog.md 2021-11-10 10:49:56 +09:00
14a708b3df bump 2021-11-09 23:34:03 +09:00
d9f535f98a Update changelog 2021-11-09 23:10:18 +09:00
e51cb43283 updates display names (#3036) 2021-11-08 22:24:28 +09:00
bbcdd5ed0d Bootstrap: Fix table styles (#3079) 2021-11-08 20:16:57 +09:00
3c13d6c195 Add test verifying JS files that we ship 2021-11-08 19:09:00 +09:00
61d89d1777 Upgrade Bootstrap to v5.1.3 (#3078)
Regular maintenance upgrade.
2021-11-08 18:53:42 +09:00
bede4a3a42 Fix: Do not crash when redirect url is not provided to Authorize page 2021-11-08 09:24:12 +01:00
befa436087 Fix: Disable LNURL if Lightning gets disabled. 2021-11-08 08:51:21 +01:00
59cf53e083 Fix: Paging in payouts did not take additional parameters in consideration 2021-11-08 08:21:07 +01:00
76a4e9e520 Fix: Payout actions button was misaligned 2021-11-08 08:15:08 +01:00
af635cdc0d Fix: Amount validation for payout creation min amount was missing 2021-11-08 08:14:49 +01:00
cbf3b3e9ea Print view improvements (#3050)
* Add ln enable link

Add print button + print-related css classes

* Modify print-specific css

-Adds @dennisreimann css suggestions to prevent page-breaks cutting off QR codes
-Removes item image and description in print view
-Add comment to explain purpose of print-specific styling in site.css

* Streamline POS print view

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-11-06 00:21:33 +09:00
b0be248ca5 Attempt to fix CanUseLNAddress flakyness 2021-11-05 13:06:35 +09:00
2828ec76b4 Fix CanUseTorClient test flakyness 2021-11-05 12:30:28 +09:00
de1f94a596 Update Changelog 2021-11-05 12:20:59 +09:00
d16d4d83ea Fix maintenance view (#3068) 2021-11-05 12:20:04 +09:00
ff8adbbd37 bump 2021-11-05 12:18:13 +09:00
a47ba2df3c Add more details to lnaddress not found errors, make sure lnaddress is only for BTC (#3067)
* Add more details to lnaddress not found errors, make sure lnaddress is only for BTC

* Update BTCPayServer/LNURL/LNURLController.cs

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

* Update BTCPayServer/LNURL/LNURLController.cs

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

* Update BTCPayServer/LNURL/LNURLController.cs

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

Co-authored-by: d11n <mail@dennisreimann.de>
2021-11-05 12:16:54 +09:00
909fc71543 Make test CheckNoDeadLink less flaky 2021-11-05 00:36:05 +09:00
7f13f6f915 Changelog for 1.3.2 2021-11-05 00:29:05 +09:00
f58fc9b531 Logs all events in development 2021-11-05 00:13:40 +09:00
82649dad39 Do not logs all internal events 2021-11-05 00:09:38 +09:00
7e3cda904a Fix: Lightning address pay fails if millisatoshi is not 0 mod 1000 on LND (#3056) 2021-11-04 23:55:58 +09:00
c921b2ca7b Fix: Test Connection for lightning setup was hidding cause of failure 2021-11-04 23:28:26 +09:00
2afd02152d Fix: By default, BTC On chain, the BTC Lightning BOLT11 should be preferred 2021-11-04 18:21:38 +09:00
f3e9e2ec5f Fix: Creating a new invoice in payment request with LNURL activated would crash 2021-11-04 18:03:54 +09:00
d39ae86915 Improve error reporting in create invoice page (#3065) 2021-11-04 17:12:17 +09:00
51f0c2a5f8 Apply better messages 2021-11-04 08:53:44 +01:00
003927418c Improves maintenance domain name form element (#3045)
* switch to flexbox

* removes whitespace

* updates spacings & text color class

* more spacing updates

* updates

* back to row & col

* back to flex + removes text-secondary class
2021-11-04 16:34:51 +09:00
da92cabe4c Fix crowdfund topup issue (#3064)
closes #3048
2021-11-04 16:34:24 +09:00
45a58e1a39 Crowdfund: Fix perk value display (#3060)
Previously this didn't take into account the target currency. This leads to wrong values if the target currency is SATS and the invoice currency is BTC. This updates the value to be calculated with the rate and also takes into account the network fee. (Basically adjusting it to how the contribution values are calculated)
2021-11-04 16:34:11 +09:00
0e1a6a3d5f Bugfix #3049: Price type of edit item in PoS shows only "fixed" (#3052) 2021-11-02 21:02:33 +01:00
34969519d4 Improves upload button for files (#3044)
* reorders form, removes header

* adds flexbox + button formatting

* adjusts whitespace & flexbox class

* adjusts class for mobile
2021-11-02 00:49:12 +09:00
4f235e1d62 resolves Issue #3042 add archive status to invoice response (#3043) 2021-11-01 15:53:33 +09:00
7d0dc49435 fixes visual error with label (#3037) 2021-10-31 20:03:45 +09:00
8fed8f77ad PR for Issue #3038 adds params for getInvoices pagination (#3039)
* ##3038 add pagination elements

* correct skip to take

* updated swagger docs

* set take nullable to true
2021-10-31 19:47:12 +09:00
1c2728bbfb adds spacer (#3035) 2021-10-31 19:44:55 +09:00
fd543bcee1 Improve test flakyness 2021-10-31 14:20:43 +09:00
24b7705094 List webhook URLs (#3034)
Addresses #3000.

I limited the width of the URL field and made the full URL visible with a tooltip. The UI could probably use some sprucing up.
2021-10-30 22:40:26 +09:00
6b96f9b446 bump 2021-10-30 14:00:25 +09:00
933dc6be31 Fix: The checkout page would reload the page when changing payment method 2021-10-30 13:57:24 +09:00
d6e3fb46ee bump 2021-10-29 23:41:02 +09:00
efc05edca3 Update Changelog.md (#2993)
* Update Changelog.md

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* Update

* Update

* Update Changelog.md

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

* Update

* Update

* Update

Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2021-10-29 23:25:44 +09:00
aa3d384f47 Add status message partial (#3030)
Along with #3029, this closes #2991.
2021-10-29 23:13:04 +09:00
a5aa5cf059 Fix tests 2021-10-29 23:09:19 +09:00
ccd8859d7f Add missing attribute for textSearch in get invoice 2021-10-29 22:27:21 +09:00
a28399e31d Add warning on ln address if install using rootpath 2021-10-29 22:18:33 +09:00
61f63a9996 POS Light: Add Bootstrap bundle (#3029)
So that the alert can be closed. Brought up by @satwo in this [Mattermost discussion](https://chat.btcpayserver.org/btcpayserver/pl/3f46i9yociydmkk4apncxp7shw).
2021-10-29 21:57:37 +09:00
de93c5c9d6 Fix test warning 2021-10-29 21:51:53 +09:00
94865815c7 Quick fixes before release 2021-10-29 14:50:18 +02:00
33754933d5 Add Azerbaijan language 2021-10-29 20:54:09 +09:00
560b6db480 fix refund button part 2 2021-10-29 13:46:24 +02:00
4c71167535 Fix refund button 2021-10-29 13:20:54 +02:00
707484709a Display and update App Name in settings (#3027)
* Edit and view app name in app settings

Currently the "name" property is not exposed at all in an app's settings/update page, which can result in confusion about which app is being updated, and also a general confusion between the `Title` property and the `Name` property.
This PR gives visibility to the app name in settings, and allows updating of the same.
I also changed the display label for `title` and `name` to make them more distinct and specific.

* Fix tests

* Update AltcoinTests.cs

* Update SeleniumTests.cs

* fix tests

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2021-10-29 19:29:02 +09:00
274be7c1bc Disable build warning in layout (#3028) 2021-10-29 19:06:15 +09:00
3f176a6b6b fix lnurl setter bug 2021-10-29 11:27:36 +02:00
fc8a5ff95f Lightning address support (#2804)
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-10-29 11:01:16 +02:00
25f84d000b LNURL POS Support (#3019) 2021-10-29 10:27:33 +02:00
31b7826dce make input readonly for fixed cart items 2021-10-29 09:58:59 +02:00
2d4aa52fa5 Restructure store and payment settings (#2995)
Co-authored-by: Kukks <evilkukka@gmail.com>
2021-10-29 08:25:43 +02:00
eee8008bb2 Make sure migration for apps does not crash 2021-10-28 12:23:21 +02:00
a5ae509f9f Make sure invoice show lnurl instead of bolt11 labels 2021-10-28 10:39:49 +02:00
8f117b5079 Add ability to require refund email from app level (#3013)
* Add ability to require refund email from app level

* Add ability request refund email when creating invoice manually

* Adjust labels

* Add UI tests

* Add Greenfield API support

* Rename RequiresRefundEmailType to RequiresRefundEmail

* Fix build

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2021-10-27 23:32:56 +09:00
0b5d0349d4 Do not fire InvoiceExpired twice if invoice partially paid (Fix #3004) 2021-10-27 19:27:19 +09:00
8a0660cbd6 Add support for CryptoMarket exchange rates (#3012)
* Add support for CryptoMarket exchange rates

* Add unit test for CryptoMarket
2021-10-27 15:19:34 +09:00
f7a0b91ec1 Add boolean overPaid to the invoice settled webhook 2021-10-27 14:51:42 +09:00
1ecd1c1e54 LNURL: Add missing logic from lnurl merges and rebases 2021-10-26 14:08:09 +02:00
fccbbb6fb7 LNURL tests and small fixes 2021-10-26 13:55:59 +02:00
d1886b039e Wallet: Make account number an input instead of select (#3018) 2021-10-26 18:00:01 +09:00
79c61f01c8 Make supporter logos work across browsers (#3017) 2021-10-26 11:15:01 +09:00
e50c9266b4 [Fix] If the local culture of the server was not english, numeric values greenfield were not properly interpreted 2021-10-26 00:46:28 +09:00
fd27bd94e2 Add ability to accept tips in POS terminal (#2983)
* Add ability to accept tips in POS terminal

* Add logic for showing and hiding sections specific to a POS app type

* Fix issue with floating point error
2021-10-25 19:06:32 +09:00
05f99f3855 Merge pull request #3007 from bolatovumar/fix/typo-inlude
Fix typos
2021-10-25 18:46:23 +09:00
31ef763c05 Merge pull request #3011 from bolatovumar/add-number-formatting-crowdfund-app
Add number formatting in crowdfund app
2021-10-25 18:45:45 +09:00
c0abcbea24 Merge pull request #3015 from NicolasDorier/ewfoufeoiu
Fixes of bugs happening when using rootpath
2021-10-25 16:55:00 +09:00
a73383cd87 When creating a new apps, the default currency of the store should be used 2021-10-25 16:54:36 +09:00
951bfeefb1 LNURL Payment Method Support (#2897)
* LNURL Payment Method Support

* Merge recent Lightning controller related changes

* Fix build

* Create separate payment settings section for stores

* Improve LNURL configuration

* Prevent duplicate array entries when merging Swagger JSON

* Fix CanSetPaymentMethodLimitsLightning

* Fix CanUsePayjoinViaUI

* Adapt test for new cancel bolt invoice feature

* rebase fixes

* Fixes after rebase

* Test fixes

* Do not turn LNURL on by default, Off-Chain payment criteria should affects both BOLT11 and LNURL, Payment criteria of unset payment method shouldn't be shown

* Send better error if payment method not found

* Revert "Prevent duplicate array entries when merging Swagger JSON"

This reverts commit 5783db9eda17c29908a60fdef2c3ebe130a8b059.

* Fix LNUrl doc

* Fix some warnings

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2021-10-25 15:18:02 +09:00
fc7125b8cd Fix: Fonts and Home background not loading properly when using rootpath 2021-10-25 15:14:05 +09:00
26bcdbc766 Fix: Many SVG assets were not showing properly if rootpath is used 2021-10-25 15:14:05 +09:00
fb1fcbe0b9 Fix: The redirect url of crowdfund invoices wasn't set correctly if rootpath is used (Fix #2992) 2021-10-25 15:13:52 +09:00
2c45f803e4 Fix: favicon wasn't shown if using rootpath 2021-10-25 15:13:52 +09:00
fbdd2fc470 Fix flaky test for ripio exchange 2021-10-25 15:10:44 +09:00
0558631982 Improve store/selectlist labeling (#3014) 2021-10-25 13:15:08 +09:00
63e1c5807e Add number formatting in crowdfund app 2021-10-24 14:33:47 -07:00
a3cc1f2ef0 Fix typos 2021-10-23 23:14:36 -07:00
5318684e5c fix build 2021-10-23 22:10:54 +09:00
b3b9651cd8 Use buster rather than bulleyes for arm32 2021-10-23 22:09:13 +09:00
86e528e5df Use NBitcoin's Network.UriScheme rather than our own (#3005) 2021-10-23 14:47:15 +09:00
c46a69e1bd Add Paging to Pull Payments (#2997) 2021-10-22 15:10:59 +09:00
9b0d1a23dc Decouple Pull payment from wallets (#2987)
* Decouple Pull payments from wallet

* Update _Nav.cshtml

* Fixes
2021-10-22 11:17:40 +09:00
db038723f4 Payout Destination Handling (#2985)
* Payout Destination Handling

fixes #2765
This PR:
* reactivates the BIP21 support for payouts.
* allows LNUrl destinations to be reusable.
* allows addresses to be reused in claims as long as the other claims are in a final state

* Ensure bolt amount matches the payout amount

* fixes

* reduce duplicate parsing of bolt

* make hash the id of bolt

* better bolt11 tostring

* use cached payment request from lnurl
2021-10-22 00:43:02 +09:00
a193e1cbf3 Scanner: Improve QR data display 2021-10-21 17:05:44 +02:00
493f1b98c2 Upgrade vue-qr-code-reader and fix scanning issue 2021-10-21 17:05:44 +02:00
926b60df3d Fix camera scanner CSP issue 2021-10-21 17:05:44 +02:00
d8a162fb6e [Fix] CurrencyValue parsing shouldn't depend on locale 2021-10-21 19:15:02 +09:00
4cf3249e0b Add ability to set default currency for a store (#2998) 2021-10-20 23:17:40 +09:00
407f26b1dc fix netehreum warnings 2021-10-20 13:08:50 +02:00
0159588eed Merge pull request #3001 from dennisreimann/supporters
Supporters: Fix SVGs that are referenced in READMEs
2021-10-20 12:27:57 +02:00
6f7be7eb09 Supporters: Fix SVGs that are referenced in READMEs 2021-10-20 12:14:30 +02:00
09a53718bb Abort payjoin request after 30 sec of timeout 2021-10-20 17:06:27 +09:00
5655f22397 Fix default payment bug (#2975)
* Fix default payment bug

This attempts to fix the default payment bug described in #2963.

Update to complete #2986

This takes into account #2986 and @NicolasDorier 's suggestion to add a default payment type as an empty (valueless) option that is selected by default.

* Fix tests

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2021-10-20 14:34:04 +09:00
791d0abb34 Clarify payment method criteria error message (#2989)
As requested by @BTCBellyButton, this clarifies the error message shown resulting from an invalid payment method criteria.
https://github.com/btcpayserver/btcpayserver/pull/2975#issuecomment-945218280
2021-10-20 14:02:20 +09:00
13d9930955 Improve supporters display (#2994) 2021-10-20 14:01:55 +09:00
c4f40d68e9 Fix cryptic error message issue (#2978) 2021-10-18 10:42:53 +02:00
9951370321 Fix logo issue (#2977) 2021-10-18 10:41:34 +02:00
0119ad452b Order language dropdown in CheckoutExperience
Solves the same issue as described in the first part of #2971 and solved in #2972, except in the Settings instead of the checkout UI.
2021-10-18 10:40:17 +02:00
3d3016fdca Fix fallback logic for default payment method (#2986) 2021-10-18 16:56:47 +09:00
262798d577 Refactor by adding extension FindPayoutHandler (#2984) 2021-10-18 15:00:38 +09:00
cf206e64a7 Add Lightning payout support (#2517)
* Add Lightning payout support

* Adjust Greenfield API to allow other payment types for Payouts

* Pull payment view: Improve payment method select

* Pull payments view: Update JS

* Pull payments view: Table improvements

* Pull payment form: Remove duplicate name field

* Cleanup Lightning branch after rebasing

* Update swagger documnetation for Lightning support

* Remove required requirement for amount in pull payments

* Adapt Refund endpoint to support multiple playment methods

* Support LNURL Pay for Pull Payments

* Revert "Remove required requirement for amount in pull payments"

This reverts commit 96cb78939d43b7be61ee2d257800ccd1cce45c4c.

* Support Lightning address payout claims

* Fix lightning claim handling and provide better error messages

* Fix tests

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-10-18 12:37:59 +09:00
5ac4135a13 fix crowdfund js 2021-10-15 12:53:45 +02:00
5176eaf4ba fix test 2021-10-15 12:53:45 +02:00
514417e888 Rename to custom and fix small css 2021-10-15 12:53:45 +02:00
f83e85dc36 addd test 2021-10-15 12:53:45 +02:00
9592a77cff use more concrete types for price type in app items 2021-10-15 12:53:45 +02:00
33a893ba31 Replace addLoadEvent with better practice 2021-10-15 12:53:45 +02:00
f89cdadde8 fix btn text 2021-10-15 12:53:45 +02:00
7d2aa28e1f Support Topup Invoices in Apps 2021-10-15 12:53:45 +02:00
9df4429fc2 Remove unreachable code (#2961) 2021-10-15 16:34:40 +09:00
843a2491ef Improve language dropdown UX/Update jquery-prettydropdowns to 4.17.0 (#2972)
* Improve language dropdown UX

Several improvements to the language selector dropdown list.

* Apply suggestions from code review

Incorporate styling suggestion from @dennisreimann

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

Co-authored-by: d11n <mail@dennisreimann.de>
2021-10-15 14:27:52 +09:00
d64fb15ac2 Greenfield: Provide negative undue when overpaid. (#2936)
* Greenfield: Provide negative undue when overpaid.

closes #2935

* Invoice's due can be negative, fix Amount field of invoice

* Update swagger.template.invoices.json

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2021-10-15 14:23:34 +09:00
3671e7f18c Fix test 2021-10-15 14:19:40 +09:00
899bf98f45 Fix tests 2021-10-15 12:50:33 +09:00
4230ba513f Add support for rpio exchange rate (close #2960) 2021-10-15 12:18:02 +09:00
18f1b4d8c1 Bump NBitcoin (Fix perf problem on signing of big transaction) 2021-10-14 01:01:32 +09:00
75776687bc Fix bug: Importing seed with Is hot wallet checked was not working (#2966) 2021-10-12 18:37:13 +09:00
b5ebd14589 Fix NRE in BaseService.StopAsync 2021-10-12 17:39:48 +09:00
67ba64b0a1 Fix build 2021-10-12 15:45:55 +09:00
b26e8311c1 Bump NBitcoin 2021-10-12 15:42:20 +09:00
0033aab03e Remove types from BTCPayServer.Client 2021-10-11 18:01:32 +09:00
1037fe0b14 Remove unused ExpireInvoiceResponse type 2021-10-11 17:58:01 +09:00
6c688b9684 Make sure cheater scan rpc capabilities 2021-10-11 17:49:04 +09:00
601e17ed0f Fix altcoins docker-compose 2021-10-11 17:39:12 +09:00
ad86c16bc9 Bump Tor 2021-10-11 12:35:26 +09:00
791db983c7 Bumping LND to 0.13.3-beta (#2964) 2021-10-11 12:32:58 +09:00
d7a7382d00 Introduce cheat mode (#2965) 2021-10-11 12:32:09 +09:00
e842a00402 Easier payment testing (#2672)
* Easier payment testing

* WIP, more TODOs and some cleanup. Help is appreciated.

* Added dummy button to expire monitoring (doesn't work yet)

* Added TODO

* Make fake tab default if present

* Split controller and change wording from fake to testing

* Extract and simplify checkout testing UI

* Restrict testing access to regtest

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-10-11 11:11:02 +09:00
78a8c8c1be Add Passport hardware wallet option to the wallet import screens (#2962)
* Add option for Passport

* Add Passport option to QR import

* Add Passport import option
2021-10-10 15:54:46 +09:00
a7c093a0eb Allow email notifications when creating invoices from Web UI (#2959)
Currently invoice email notifications are only sent when the invoice is created via the API. This commit adds an option to set an email address for notifications when an invoice is created from the Web UI.
2021-10-10 15:54:25 +09:00
86956c1e7b More CSP fixes (#2955)
* Fix CSP issue with time format switch on wallet transactions page

* Fix CSP issue with invoice modal link on invoices list page

* Fix CSP issue on FIDO2 auth page

* Fix JS error on FIDO2 auth page

* Minor UI code improvements
2021-10-10 15:52:39 +09:00
54539001f1 Allow User to delete own account (#2949)
* Allow User to delete own account

* Add User delete e2e test

* fix test

* Apply suggestions from code review

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

Co-authored-by: d11n <mail@dennisreimann.de>
2021-10-09 12:18:37 +09:00
4321cbf41a Coin selection improvements (#2956)
* Improve coin selection toggling

* Improve coin selection display

Fixes #2948.

* Improve remove destination button

* Display hide unconfirmed only if there are any unconfirmed UTXOs

* Improve label styles

* Test fix

* Add top margin for non-JS coin selection
2021-10-09 10:39:34 +09:00
8d9941bfd2 Update toggle styling to have pointer cursor (#2957) 2021-10-08 14:26:17 +09:00
f9e38deee7 Fix warnings 2021-10-07 19:08:53 +09:00
89fd044b00 Replace pruning wallet by wipe transactions (#2857) 2021-10-07 16:54:22 +09:00
039f88d14c Match Lightning payment based on payment hash if BOLT11 is not the same. (#2773)
* Match Lightning payment based on payment hash if BOLT11 is not the same.

* Fixup

* Fixup

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2021-10-07 16:53:27 +09:00
d3f9eb38a9 Fix annoying err message in logs when a websocket is cancelled 2021-10-07 15:35:19 +09:00
768d97ac6c Fix remaining Safari inline JS CSP issues (#2954)
* fix modfiy webhook inline JS issue

* fix uncofirmed warning issue in Safari

* fix inline JS Safari issues in checkout
2021-10-07 12:27:48 +09:00
154078d46f Fix docker images 2021-10-07 11:20:50 +09:00
d74c6a30c8 Improve perk card styles 2021-10-06 19:32:26 +02:00
1407d5be8d Decrease font size and weight in selection overlay 2021-10-06 19:32:26 +02:00
721c06e157 Crowdfund: Hide theme switch when custom theme is set 2021-10-06 19:32:26 +02:00
a0265f18d9 Crowdfund: Better customization input grouping 2021-10-06 19:32:26 +02:00
8948475cad Crowdfund: Add theme switch to footer 2021-10-06 19:32:26 +02:00
faed5349fb Make theme switch a view component 2021-10-06 19:32:26 +02:00
7bcaf956e7 Grerenfield: Add availableStatusesForManualMarking to Invoice Data (#2934)
closes ##2933
2021-10-06 18:19:34 +09:00
31c2a80758 Add ability to set invoice status from details page (#2923)
* Add ability to set invoice status from details page

* Remove unnecessary "using" statements

* Add print styles

* Fix Safari issues

* Simplify JS

* Update status badge class names

* Update dropdown toggle padding

* Adjust dropdown menu padding
2021-10-06 14:49:57 +09:00
150e4b842c Make sure the process doesn't crash if exception raised in Subscribe 2021-10-06 13:22:55 +09:00
b970f64639 Remove build warnings 2021-10-06 12:53:41 +09:00
08bd13b2cd Make CanUseWebhooks more resilient 2021-10-06 11:25:21 +09:00
6e3d6125c2 Payment Settled Webhook event (#2944)
* Payment Settled Webhook event

resolves #2691

* Move payment methods to payment services
2021-10-05 18:10:41 +09:00
143d5f69c1 Fix CSP for inline handlers in Safari (#2946)
* Fix CSP for inline handlers on LND seed backup page

* Fix CSP for inline handlers on checkout page

* Fix CSP for inline handlers on wallet sign pages

* Fix CSP for inline handlers on invoices list page

* Fix CSP for inline handlers on payouts page

* Fix CSP for inline handlers on confirm API key page

* Fix CSP for inline handlers on store rates page

* Fix CSP for inline handlers on notifications page

* Fix CSP for inline handlers on dynamic DNS page

* Fix CSP for inline handlers on checkout experience page
2021-10-05 15:52:14 +09:00
156ddd24fa Make CanUsePayjoinForTopUp more resilient 2021-10-05 15:47:57 +09:00
cf2c147f4f Bumping versions of libraries and dockerfile 2021-10-05 15:29:26 +09:00
ce1903b2fa Bumping versions of libraries and dockerfile 2021-10-05 15:26:40 +09:00
ccdfe5ac86 Detect websocket connection dropping in vault 2021-10-05 14:41:03 +09:00
b0ef98dd63 Keep websocket connection alive on notifications and vault 2021-10-05 14:30:01 +09:00
5c8e62bd90 Websocket ping message for notifications and vault 2021-10-05 14:14:22 +09:00
6674d76d6d Add missing file 2021-10-05 13:58:40 +09:00
dea747a9a9 Keep connection alive on checkout page by sending ping messages 2021-10-05 13:37:30 +09:00
a32ace1dcb Shorten balance assignment 2021-10-04 17:10:07 +02:00
4785f0a4dd Remove unused Network property 2021-10-04 17:10:07 +02:00
8249d8a0f5 Fix indentation in view 2021-10-04 17:10:07 +02:00
234bc30369 Update in adherence to the design 2021-10-04 17:10:07 +02:00
b7a081b9a4 Show total balances for each currency on List Wallets Page 2021-10-04 17:10:07 +02:00
88c925017d Apply suggestions from code review 2021-10-04 17:06:11 +02:00
a3c2a9ac61 Censor based on permissions 2021-10-04 17:06:11 +02:00
7cad6302b7 Fixed wrong API permission
Viewing store payment methods needs CanViewStoreSettings instead of CanModifyStoreSettings as per the docs
2021-10-04 17:06:11 +02:00
4b34090376 Adjust invoice details header layout 2021-10-04 17:02:57 +02:00
ac554a27b6 Merge pull request #2947 from dennisreimann/faq-links
Fix FAQ links
2021-10-04 14:03:47 +02:00
e1ea7200cf Fix FAQ links
Once more (and for the last time ;)) those linsk changed in btcpayserver/btcpayserver-doc#967
2021-10-04 13:42:31 +02:00
802fec6bf3 Move payment related properties 2021-10-04 09:50:36 +02:00
67aee9bdc6 Improve display and structure of payment related configuration 2021-10-04 09:50:36 +02:00
975ad2f8ab Crowdfund: Display contributions value (#2938) 2021-10-04 07:54:06 +02:00
b0814166f5 Merge pull request #2941 from git-sgmoore/patch-1
Update README.md
2021-10-02 13:23:54 +02:00
8f397865fd Update README.md
Remove one apostrophe
2021-10-01 23:10:43 -07:00
8ffa7525c5 Merge pull request #2939 from dennisreimann/docs-links
Fix documentation links
2021-10-01 18:34:41 +02:00
6048a26511 Fix documentation links
Some links changed with the recent docs restructuring. I've also added recirects for these on the docs side now.
2021-10-01 18:18:54 +02:00
1a8a7fc27f Crowdfund: Limit max width of embedded content like video
Closes #2782.
2021-09-29 07:58:50 +02:00
64901dfc22 Bump postgres 2021-09-29 13:16:53 +09:00
6a28497d33 Fix: Impossible to see relative time of transaction in wallet list 2021-09-29 13:10:00 +09:00
ed1ec2300d Remove Coinswitch entirely 2021-09-28 10:33:11 +02:00
edfde494fa bump bitcoin core 2021-09-28 12:47:34 +09:00
a3cc573e4d Do not test hot reload in CanCreatePayRequest (unreliable) 2021-09-28 12:20:40 +09:00
44fe70ae44 Make CanCreatePayRequest more resilient 2021-09-28 12:05:46 +09:00
d05a9295b3 Make a test more resilient 2021-09-28 11:22:35 +09:00
7aa4cd8104 Plugins: Pass the current Model to the Ui extension points 2021-09-27 14:16:38 +02:00
4a6088b6b9 Bump NBX Client and Plugins packages 2021-09-27 10:26:42 +02:00
d949680d5a fix: Plugins disabled message never dissappers even after re-enabling it. 2021-09-27 09:03:59 +02:00
0cd7380af0 Make CSP accessible to plugins 2021-09-27 08:45:55 +02:00
a3afcd2a6e Crowdfund public UI re-design (#2918)
* Patch bootstrap-vue modal close button

For Bootstrap v5 compatibility, which bootstrap-vue does not have currently.

* Crowdfund: Use common global layout head (and themes)

* Crowdfund: Display disabled alert also for simple variant

* Crowdfund: Unify non-JS/simple and JS-enabled view

* Improve fireworks animation

* Improve layout

Inspired by the Bitcoin Smiles compaign, see  #2783

* Cleanup and remove views

* Fix typo

* Fix test
2021-09-27 11:46:56 +09:00
bd6c7a8c3d Properly handle InvoiceMetadata string properties (Fix #2906) 2021-09-27 11:44:55 +09:00
920955657d Fix camera not working on wallet send (Fix #2922) 2021-09-27 10:32:03 +09:00
d975ea1509 bump 2021-09-26 14:33:36 +09:00
ba5c49a8df Update Changelog 2021-09-26 14:33:36 +09:00
9f6c7180b2 Greenfield quality of life improvements from feedback (#2880)
* Greenfield quality of life improvements from feedback

fix #2854

* Greenfield quality of life improvements from feedback

fix #2855
2021-09-25 14:04:34 +09:00
ef70f4d547 Simplify code with PaymentMethodId.TryParse 2021-09-24 14:21:30 +09:00
8c061b1f07 Attempt cover scenarios of switching back to Bitcoin only after taint (#2881) 2021-09-24 14:16:25 +09:00
0aed8fdb5b Improve app update buttons (#2915)
Better responsive behaviour and clearer distinction between primary and secondary actions. Also improves the wording ("View Crowdfund/Point of Sale" vs. "View app") and gets rid of the superfluous "Back to apps list" button.
2021-09-24 14:13:38 +09:00
6125a99381 Should not be able to activate a payment method on an invoice which is not new 2021-09-24 00:12:12 +09:00
83b54b7be1 Fix infinite loop happening if payment method unavailable with on invoices with lazy activation (#2914) 2021-09-24 00:00:55 +09:00
047222b3ee Fix offcanvas on desktop 2021-09-23 13:45:05 +02:00
2fe1ab83f5 Improve offcanvas nav animation 2021-09-23 13:45:05 +02:00
5372058c33 Use offcanvas nav for mobile 2021-09-23 13:45:05 +02:00
a08261a798 Update dark mode footer colors 2021-09-23 13:44:48 +02:00
869985f005 Finetune footer; remove obsolete images 2021-09-23 13:44:48 +02:00
97b5c473c1 Removes the "Let's Get In Touch!" block from the homepage 2021-09-23 13:44:48 +02:00
337db3daab Align social links to appear above copyright 2021-09-23 13:44:48 +02:00
10da82607d Adds social links to Layout
This removes the logo credits in the base Layout and adds the
links to Github, Mattermost and Twitter.
2021-09-23 13:44:48 +02:00
7f49824783 Improve public LN node info (#2876)
* Add store name to LN info unavailable pae

* Display multiple node info items if available

Allows to view clearnet and Tor connection info side by side.

* Re-add preferOnion for certain cases

* HTML compatible node ids

* Display more node connection failure details

* Fix syntax error

* Update BTCPayServer/Payments/Lightning/LightningLikePaymentHandler.cs

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>

* View updates

* Revert previous variable change

* Keep logic out of the view

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2021-09-23 20:36:42 +09:00
5d8bc73063 Reset "all stores" values to default 2021-09-23 10:11:37 +02:00
82675384c4 Don't adjust store mode if user is performing an action 2021-09-23 10:11:37 +02:00
3dc663f4d8 Adjust view 2021-09-23 10:11:37 +02:00
2b0fcdf95c [WIP] Fix issues with Authorization Request page
closes #2858
2021-09-23 10:11:37 +02:00
d0120f1427 Fix Selenium flakyness on Circle CI (#2904) 2021-09-22 21:31:44 +09:00
ac34109da3 Support preview/codegen for custom currencies in pay button (#2896) 2021-09-22 13:10:52 +09:00
d5c96eee32 Add test 2021-09-21 09:45:41 +02:00
7b252369e9 Add GetPOSItems method 2021-09-21 09:45:41 +02:00
9d48358f2a Rename Unavailable to Disabled 2021-09-21 09:45:41 +02:00
2dcd7db797 Filter unavailable items in controller 2021-09-21 09:45:41 +02:00
c267cf0e9c Rename "hidden" to "unavailable" 2021-09-21 09:45:41 +02:00
403820cf14 Add ability to hide a product from POS app
See discussion here: https://github.com/btcpayserver/btcpayserver/discussions/2827
2021-09-21 09:45:41 +02:00
6d667e2d78 bump redoc 2021-09-21 12:52:31 +09:00
258a19fdf5 Make CSP more specific for docs 2021-09-21 12:47:46 +09:00
1a593a1ced Fix documentation page broken by CSP 2021-09-21 12:43:50 +09:00
b8ac57a5b3 Merge pull request #2893 from bolatovumar/fix/show-qr-padding
Remove padding from "Show QR" button
2021-09-20 11:37:48 +02:00
b93f3ff445 Remove padding from "Show QR" button 2021-09-18 21:31:23 -07:00
5984edb7f4 Disallow cancelling payment request when "Allow payee to create invoices in their own denomination" is not enabled (#2843)
* Disallow cancelling payment request when "Allow payee to create invoices in their own denomination" is not enabled

close #2802

* Disallow cancelling pending invoice on BE

* Update non-JS version of payment request view to disallow cancelling

* Update CanCancelPaymentWhenPossible

* Fix typo
2021-09-17 10:24:48 +09:00
603bd2692e Summernote: Fix source map reference; remove unused files 2021-09-16 07:30:33 +02:00
2e61bdf88f Update swagger example 2021-09-16 07:29:18 +02:00
e6aa73197a Move GetDefaultPaymentId out of InvoiceExtensions 2021-09-16 07:29:18 +02:00
b2f9353be1 Add tests 2021-09-16 07:29:18 +02:00
5cba59932b Add ability to specify default payment method through Greenfield API 2021-09-16 07:29:18 +02:00
809340e629 Add ability to select default payment method for invoice through UI 2021-09-16 07:29:18 +02:00
bb6a188883 bump nbx in both docker compose envs 2021-09-16 07:19:54 +02:00
24674d354c removes slack + updates columns 2021-09-16 07:18:31 +02:00
e93562b1db Do not publish NewTransactionEvent if GetValidOutputs did not match with the network's. 2021-09-15 07:28:17 +02:00
f7099cf6aa Bump NBX and elements 2021-09-15 07:28:17 +02:00
d88f012d82 Improve warning when creating invoice without wallet (#2844)
* Improve warning when creating invoice without wallet

close #2834

* Update link class name
2021-09-13 14:24:10 +09:00
f96767d3dc Bootstrap update (#2870)
* Update Bootstrap

* Fix notification checkbox styling
2021-09-13 14:23:10 +09:00
6666786b7a Unify Fido2 authentication under two-factor tab (#2866)
* Unify Fido2 authentication under two-factor tab

Closes #2754.

* Improve UI and wording

* Improve register FIDO2 device page
2021-09-13 10:16:52 +09:00
eccbe8e018 Sanitize UrlRoot in PayButton 2021-09-12 20:33:51 +09:00
aac87539ae Fix pay button CSP issue when using modal (#2872)
* Fix pay button CSP issue when using modal

Fixes #2864.

* Use event handler, refactor csp tags

* Fix script indentation

* Fix onsubmit event handler integration

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2021-09-12 20:31:35 +09:00
a8995d2bed Fix unit test fail bc shitcoin 2021-09-10 15:35:51 +09:00
7f40698bba Fix interactive XSS when entering javascript: in store's website. 2021-09-10 10:56:48 +09:00
c4f4c3138c Update Changelog 2021-09-10 00:27:27 +09:00
3b9c7db481 The page could crash if the user clicks too many time on Notificate 'Mark as Seen' 2021-09-10 00:22:33 +09:00
649f650da6 Fix build 2021-09-10 00:16:28 +09:00
4c83265de4 Update Changelog 2021-09-10 00:14:45 +09:00
ad7b62fa3d Fix CSP when there is a theme 2021-09-10 00:14:26 +09:00
650df97e50 Fix Summernote XSS possibility (#2859) 2021-09-09 22:49:30 +09:00
6f75125cf5 bump 2021-09-09 22:17:46 +09:00
26c05a8d5f Changelog 2021-09-09 22:17:22 +09:00
fc4e47cec6 Add CSP at the website level (#2863) 2021-09-09 21:51:28 +09:00
c39f1341aa Fix warnings 2021-09-09 20:31:35 +09:00
a39d1e0886 fix broken plugin page 2021-09-09 13:12:44 +02:00
435f51a777 Fix for crowdfund perk editor
With no title entered, the editor got stuck in an endless loop, because it recursively invoked the save function without checking for the ID fallback being present.

Fixes #2862.
2021-09-09 10:59:03 +02:00
de2c12c1df Fix warning 2021-09-08 18:45:12 +09:00
ae43af999b update HWI lib 2021-09-08 18:27:36 +09:00
14a10eeef8 Remove useless code (#2852) 2021-09-07 19:18:56 +09:00
180be49824 Add "#nullable enable" 2021-09-07 10:39:36 +02:00
5faa756f1c Add check for empty theme URI before saving theme settings 2021-09-07 10:39:36 +02:00
06db29dd43 Delete confirmation modals (#2614)
* Refactor confirm view: separate modal

* Add delete confirmation modals for apps and FIDO2

* Add delete confirmation modals for 2FA actions

* Add delete confirmation modals for api keys and webhooks

* Add delete confirmation modals for stores and store users

* Add delete confirmation modals for LND seed and SSH

* Add delete confirmation modals for rate rule scripting

* Test fixes and improvements

* Add delete confirmation modals for dynamic DNS

* Add delete confirmation modals for store access tokens

* Add confirmation modals for pull payment archiving

* Refactor confirm modal code

* Add confirmation input, update wording

* Update modal styles

* Upgrade ChromeDriver

* Simplify and unify confirmation input

* Test fixes

* Fix wording

* Add modals for wallet replace and removal
2021-09-07 11:55:53 +09:00
6d317937c7 Do not generate payment methods when 0 amount invoice (#2776)
* Do not generate payment methods when 0 amount invoice

* Add test for 0 amoutn invoices
2021-09-07 00:23:41 +09:00
522c990278 Allow creating top-up invoice when min/max payment amount criteria is active
closes #2831
2021-09-06 10:44:10 +02:00
e584ebe7de Decouple taproot activation from support in generate wallet (#2837) 2021-09-04 22:07:09 +09:00
1422bd8540 Decrease notification badge padding (#2841)
Fixes #2840.
2021-09-04 22:06:56 +09:00
fe18e71538 Refactor themes (#2794)
* Remove Bootstrap/Creative CSS file customizability

Customizations should be done using themes

* Remove deprecated Casa and Classic themes

They are still available in the design system repo and should be added as custom theme CSS file

* Use either standard or custom theme

* Remove deprecated themes

* Improve theme select UI

* Finish and refactor theme switching

* updates theme copy

* Update BTCPayServer/Views/Server/Theme.cshtml

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

* Combine creative.css and site.css

Co-authored-by: dstrukt <gfxdsign@gmail.com>
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-09-03 16:16:36 +09:00
e5699f674b Taproot support for wallets (#2830)
* Support taproot for HotWallet

* Support taproot for hardware wallets

* Fix NBX version

* Undo formatting

* Do not show Taproot when not supported

* Create taproot wallet from xpub

* Bug Fix
2021-09-03 15:37:12 +09:00
203db44b4e Patch summernote to fix issues in Chrome/Chromium
As we are using a customized version for the Bootstrap 5 compatibility anyways, with this we are also including the changes proposed in summernote/summernote#4034 to fix #2816.
2021-09-02 15:35:32 +02:00
69c5f5b9e5 Reduce navbar padding 2021-09-02 12:36:02 +02:00
5a16dfced3 Cleanup site.css 2021-09-02 12:36:02 +02:00
cb46ef9e6c Revert semibold links 2021-09-02 12:36:02 +02:00
3b810e9b8d revert left sidebar font size 2021-09-02 12:36:02 +02:00
663dcecb8e Cleanup home styles 2021-09-02 12:36:02 +02:00
fbb5671f89 Cleanup styles 2021-09-02 12:36:02 +02:00
47d348359f Use util classes for navbar padding 2021-09-02 12:36:02 +02:00
ab2f460f35 converts to rem 2021-09-02 12:36:02 +02:00
c77e3a9396 navbar queries added 2021-09-02 12:36:02 +02:00
014c43f79b updates section 2021-09-02 12:36:02 +02:00
21fb3813dd adds section + media query 2021-09-02 12:36:02 +02:00
9a039a747a Move site customizations to design system 2021-09-02 12:36:02 +02:00
17578a4615 Bootstrap updates
- Increase vertical navbar padding
- Update alert close button styles
- Use semibold font for links
2021-09-02 12:36:02 +02:00
abb68d6f59 Improve fee rate component 2021-09-02 12:36:02 +02:00
3c443344a5 Ensure round notification badge 2021-09-02 12:36:02 +02:00
2887017d12 updates line-height, removes sm-table hack 2021-09-02 12:36:02 +02:00
f2286fb1be updates copy to reduce button size 2021-09-02 12:36:02 +02:00
bdd11a14ff adjusts logo size for future size update 2021-09-02 12:36:02 +02:00
18f6e5af4d left sidebar navigation updates 2021-09-02 12:36:02 +02:00
83b07e0caf Refactor tables, remove old customizations 2021-09-02 12:36:02 +02:00
840a5ac4b4 Refactor Bootstrap colors 2021-09-02 12:36:02 +02:00
4923311168 Update Bootstrap and theme variables 2021-09-02 12:36:02 +02:00
748423dfe8 Add UpdateOnChainPaymentMethodRequest 2021-09-02 10:42:41 +02:00
2f4e610900 Add UpdateLightningNetworkPaymentMethodRequest 2021-09-02 10:42:41 +02:00
d39ec97b9a Remove "enabled" option from address preview endpoint 2021-09-02 10:42:41 +02:00
0d08bd3ad1 Minor syntax changes 2021-09-02 10:39:35 +02:00
3343738bb3 Remove back links to POSTed pages 2021-09-02 10:39:35 +02:00
373b0b7850 Remove superfluous export command 2021-09-02 10:39:35 +02:00
aa24da72b9 Improve raw export options 2021-09-02 10:39:35 +02:00
aecc5f3c6e Update wording 2021-09-02 10:39:35 +02:00
3d4ef48ceb View cleanup 2021-09-02 10:39:35 +02:00
9bb74a17d8 Refine views and use cases 2021-09-02 10:39:35 +02:00
b654dfb237 Cleanup initial PSBT input view 2021-09-02 10:39:35 +02:00
1bca8c81a4 Fix Selenium test 2021-09-02 10:39:35 +02:00
4d35fd4ab3 Fix test 2021-09-02 10:39:35 +02:00
bf5ea23bc6 Streamline views 2021-09-02 10:39:35 +02:00
b4c1f695a8 Remove psbt ready view
The transaction info is now shown on the decoded PSBT page.
2021-09-02 10:39:35 +02:00
de3d966835 WIP 2021-09-02 10:39:35 +02:00
bcdb1ab1d8 Improve review/broadcast flow and fix test 2021-09-02 10:39:35 +02:00
63944792b0 Move signing views into wizard 2021-09-02 10:39:35 +02:00
3895b133a3 Move PSBT flow into wizard 2021-09-02 10:39:35 +02:00
4371b81ef3 Adjust existing PSBT views for consistency 2021-09-02 10:39:35 +02:00
cd93a5ab6b Add separate signing flow for PSBT 2021-09-02 10:39:35 +02:00
d9a8443081 lang update 2021-08-31 16:02:26 +09:00
918d3b46f0 The checkout would crash for some client if automatic detection of language was checked, and the browser was not setting the accepted language 2021-08-31 16:01:16 +09:00
f53597845e bump btcpayserver 2021-08-31 15:54:38 +09:00
e65a3efc3c Add payjoin fix to changelog 2021-08-31 15:38:14 +09:00
d74fcad9f4 update changelog 2021-08-31 15:36:01 +09:00
19b88fd986 Fix: Impossible to send to two more than two destination (Fix #2825) 2021-08-31 15:23:56 +09:00
12105ab85c Fix rounding error for the first refund option (#2778) (#2810)
* Fix rounding error for the first refund option (#2778)

* Fix rounding issue
2021-08-31 15:08:33 +09:00
723817e3f8 Fix payment request cloning and unexpire if necessary (#2820)
* Unexpire payment requests without expiry date

* Unset expiry date when cloning payment request

* Syntax and code improvements
2021-08-31 15:07:54 +09:00
101fc51787 Bump NBX (#2818) 2021-08-30 16:42:22 +09:00
58a5f88943 Hide due amount on invoice if it's zero (#2798)
address #2790
2021-08-27 16:02:20 +09:00
2e35d0e178 Fix coldcard wallet export path (#2809) 2021-08-27 16:00:57 +09:00
319efbeb4b Bump c-lightning on docker-compose altcoins 2021-08-26 15:55:07 +09:00
04e6833e22 Bump c-lightning on docker-compose altcoins 2021-08-26 14:44:57 +09:00
748c882ba1 Bump libraries 2021-08-26 14:34:20 +09:00
ab7d2959ea Update clightning 2021-08-23 13:09:29 +02:00
56d3485d49 Removed the tagline character limit in the crowdfunding app 2021-08-23 13:08:55 +02:00
119ab7b2c0 attempt EnsureNewLightningInvoiceOnPartialPayment test fix 2021-08-23 12:34:36 +02:00
d1ea4e4fa4 Fix bug with top-up invoices when used with "Only enable the payment method after user explicitly chooses it" enabled (#2780)
* Fix bug with top-up invoices when used with "Only enable the payment method after user explicitly chooses it" enabled

* Remove unused "using" directives

* Add "#nullable enable" directive

* check for top-up invoice in LightningLikePaymentHandler
2021-08-23 15:13:26 +09:00
de5ab80038 Fix typo 2021-08-15 08:26:02 +02:00
2d23f3e5d4 bump 2021-08-13 15:51:46 +09:00
77d1580ee3 Fix Display app on website root feature 2021-08-13 15:50:26 +09:00
a20906bc12 Fix paybutton like when no amount set 2021-08-12 10:04:23 +09:00
ffbf70d72b Bump BTCPayServer.Lightning nuget 2021-08-10 10:11:16 +02:00
caa3ff616c Add fix to changelog 2021-08-10 10:11:16 +02:00
7a102ee920 Bumpo Clightning to 0.10.1 2021-08-10 10:11:16 +02:00
8451f34302 Revert "Bumpo Clightning to 0.10.1"
This reverts commit e4bd8e310624aee71a84bf7210da79d57d857625.
2021-08-10 09:31:14 +02:00
e4bd8e3106 Bumpo Clightning to 0.10.1 2021-08-10 09:16:25 +02:00
bc4945c584 Fix hotwallet migration 2 2021-08-10 12:13:00 +09:00
fa96deb1de Fix hotwallet migration 2021-08-10 12:07:13 +09:00
a27217dc62 bump 2021-08-09 23:55:31 +09:00
2dfb637e2f Enhance files actions to accept arrays of fileids (#2735)
* Enhanced Files action by modifying it to accept a list of SelectedFileIds

* Added checks to verify all files passed to the files action exist, Updated tests

* Enhanced Files action to accept an array of fileIds

* Removed redundant fileId list
2021-08-09 23:40:55 +09:00
9387c2c771 1.2.0 Changelog (#2737)
Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
Co-authored-by: Pavlenex <pavlenex@btcpayserver.org>
2021-08-09 15:54:03 +02:00
e7e8ed55c2 Remove support for payout to a Bitcoin Url (#2766) 2021-08-09 22:43:38 +09:00
cf067ca51b Update successful refund message (#2764) 2021-08-09 20:57:29 +09:00
1b7517c05c Add example for orderId query string param in /api/v1/stores/{storeId}/invoices (#2759) 2021-08-09 20:33:56 +09:00
103b3b916b Show new store warning icon only if neither on-chain wallet nor LN is configured (#2760)
close #2755
2021-08-09 20:32:43 +09:00
fa91174b1a Fix finnish 2021-08-09 16:59:52 +09:00
10e3595a82 Fix bulgarian 2021-08-09 16:40:42 +09:00
965beebc66 Fix kazath 2021-08-09 16:37:55 +09:00
83ab1a3b7c Use ulong for configKey of LND rather than uint 2021-08-07 21:52:49 +09:00
7ac83575d4 Update langs 2021-08-05 20:19:51 +09:00
831f73d715 Fix: Swagger Onchain fee rate endpoint mislabeled 2021-08-05 09:28:19 +02:00
245b4ebe63 Remove missing js file from bundles 2021-08-05 07:59:56 +02:00
060f30d0bf Payouts: Unify confirm external payment and manually mark as paid actions (#2751) 2021-08-05 14:47:25 +09:00
f84b2c5160 Add proper error message if node/nbxplorer doesn't support taproot (#2752) 2021-08-05 13:56:31 +09:00
4e56ef636b Make system plugins shown as system plugins
fixes #2741
2021-08-04 16:50:25 +02:00
59d0cf666f Update Clightning to altcoin compose too 2021-08-04 16:12:39 +02:00
54cc574405 Update to Clightning 0.10.0 2021-08-04 15:02:24 +02:00
97d16523b5 Wallet send UI improvements (#2750)
* Remove autocompletion for output fields

* Use consistent wording for available balance

* Set min value and hide number spins for amount inputs

* Move add destination button to destination input field

* Fix fiat amount display for multiple destinations case

* Improve display of multiple destinations

* Fix formatting
2021-08-04 20:58:46 +09:00
80086d76a8 Improve Payment Request view (#2748)
* Improve Payment Request view

Closes #2747.

* Fix payment request invoice listing condition
2021-08-04 16:13:33 +09:00
5bf1161884 PoS UI fixes (#2744)
Fixes  #2743
2021-08-04 13:24:25 +09:00
f49954223a Merge pull request #2746 from dennisreimann/wallet-import-wording
Improve wallet import wording
2021-08-03 14:23:57 +02:00
98d9efc8d6 Merge pull request #2745 from dennisreimann/api-keys-text
Add a period in API Keys description
2021-08-03 14:22:38 +02:00
59f338a0b7 Improve wallet import wording
Closes #2740.
2021-08-03 14:22:26 +02:00
e1eac5c390 Add a period in API Keys description
Fixes #2742
2021-08-03 14:10:48 +02:00
4c818d0359 Implement topup invoices (#2730) 2021-08-03 17:03:00 +09:00
63d4ccc058 Fix missing master fingerprint/account key path on wallet import (#2727)
* Fix missing master fingerprint/account key path on wallet import

Re-adds the view model properties that got removed in 8a1d5bbc57176377a3e76fe3f55f6942bc3fe457 and passes them through the confirm addresses form.

* Add test

This test fails on current master
2021-08-03 14:27:04 +09:00
1b85ab8b54 Improve UI of immature balance, show available balance in wallet list (#2732) 2021-08-01 22:13:12 +09:00
906c7eb7ec Show Immature Balance in walletsend page (#2731)
* Wallet Send page also shows immature balance

* changes ans to and

* Immature Balance msg is not tooltip

* Make msg more clear
2021-08-01 21:12:00 +09:00
2207d836f1 Update NBXplorer again 2021-08-01 14:32:04 +09:00
a9cd27e012 Bumping LND to 0.13.1-beta (#2729) 2021-08-01 09:20:40 +09:00
eb24cf5f84 Merge pull request #2728 from dennisreimann/bg-image
Add white background to Baillie Gifford logo
2021-07-30 19:56:46 +02:00
fae396dc0d Add white background to supporter logo
Addresses btcpayserver/foundation.btcpayserver.org#19. This SVG is also used in the docs.
2021-07-30 19:43:31 +02:00
c70393c7ef Add BG to supporters readme and login page (#2726)
* add Baillie Gifford supporter in readme and login page

* re-format img
2021-07-30 17:48:07 +02:00
a9da79cc58 Use PaymentUrlBuilder for ensuring proper formatting of BIP21 addresses (#2723) 2021-07-30 18:47:02 +09:00
4c57405945 Properly clip taxIncluded and invoice's amount (#2724) 2021-07-30 18:46:49 +09:00
ad8f347989 Refactoring: Allow ViewsRazor extension to be used by plugins
Moves the `ViewsRazor` extension into Abstractions, so that it can be used by plugins.

Separated out of #2701, prerequisite for the LNbank plugin integration.
2021-07-30 08:27:33 +02:00
68595be323 Improved the names of the Invoice webhooks to reflect the event type in code + better descriptions (#2598)
* Improved the names of the Invoice webhooks to reflect the event type in code + better descriptions

* Gave proper name and better description.

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

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

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2021-07-30 14:33:23 +09:00
69b855a1e7 Improves create crowdfund view (#2647)
* adds sizings

* adds section headers

* adds section headers and re-ordering

* more re-ordering

* redorder change

* adds switches

* reorders checkmark

* removes spacer + updates header

* adds sizings

* adds section headers

* adds section headers and re-ordering

* more re-ordering

* redorder change

* adds switches

* reorders checkmark

* removes spacer + updates header

* Upgrade flatpickr and adapt styles

* Improve display names

* Toggle and collapse additional options

* Add missing link attributes

* adds switch + title for enabling public crowdfund

* Add helper text for public crowdfund option

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-07-30 14:31:44 +09:00
6ea96efe68 Update NBitcoin, fix warnings on nullable (#2718) 2021-07-29 20:29:34 +09:00
499a231432 Fix: Payment Request status does not update on invoice marked events or when pr amount is changed (#2700)
fixes #2689
2021-07-28 22:38:26 +09:00
0054fe0886 Refactor copy to clipboard
Separated out of #2701, prerequisite for the LNbank plugin integration.
2021-07-28 08:44:32 +02:00
c59798e9c4 GreenField: Generate Store OnChain Wallet (#2708)
* GreenField: Generate Store OnChain Wallet

* Greenfield: Do not generate wallet if already configured
2021-07-27 23:53:44 +09:00
80483ba76f Start with camera off 2021-07-27 15:31:12 +02:00
5c792c9e09 Make QR Scanner able to switch between sources 2021-07-27 15:31:12 +02:00
fdae221ca5 Allow QR code multiple display modes 2021-07-27 15:31:12 +02:00
ba165ddd4f Local Greenfield Client for Plugins (#2410)
* wip

* Local GreenField Client for Plugins

* support notification handlers being missing

* Initial support for scoped btcpay client

* test out scoped local client

* wip

* small fix

* Throw exception if using local greenfield client and it has not been implemented yet

* adapt based on new changes in BTCPay

* update

* fix tests

* Allow Local client to bypass authorization handler

* Add Misc endpoints to Local API Client

* Add new endpoints

* Apply code review changes
2021-07-27 21:11:47 +09:00
14e4d2d675 Make CSSThemeManager really only focus on theme (#2457)
* Make Settings Repository cache in memory

* Make use of SettingsRepo directly instead of CssThemeManager

* Completely remove CssThemeManager
2021-07-27 21:08:54 +09:00
d505771d96 Make CanUseInternalLightningNode a sub policy of CanModifyServerSettings (#2709)
SInce CanModifyServerSettings can trivially modify any policy around lightning node sharing, it should automatically have access to the lightning node usage perm
2021-07-27 19:23:20 +09:00
d8c1c51a21 Auto-detect language on payment page (#2552)
* Auto-detect language on payment page

based on the requst Accept-Language header, which is the language you configured in your browser/OS and this 99.99% accurate

* Update BTCPayServer/Services/LanguageService.cs

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

* Update BTCPayServer/Services/LanguageService.cs

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

* Update BTCPayServer/Services/LanguageService.cs

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

* Update BTCPayServer/Services/LanguageService.cs

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

* Added loop for all locales in Accept-Language sorted by weight + check if know this language

* New public method so a unit test can be created for it

* Unit test for language detection

* Fix language service when not in browser context

* fall back to default lang

* Auto-detect setting + ?lang=auto support

* Added invoice param "?lang=auto" info to docs

* Using null-coalescing assignment operator

* Reduce complexity and http dependency in language service

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2021-07-27 08:17:56 +02:00
71cbe716f9 fix sync modal styling 2021-07-26 16:44:41 +02:00
f4df850d25 Greenfield: Rename enabledOnly to enabled?
Allows the filter to work in both directions instead
2021-07-26 12:03:11 +02:00
4d538c61b1 Refactor Get Store Payment Methods
Add tests + docs + new pluggbale format for fetching payment method data + client
2021-07-26 12:03:11 +02:00
17e6179fec Add "stores/{storeId}/payment-methods" endpoint
address #2545
2021-07-26 12:03:11 +02:00
b7b2f16925 Improves create point of sale view (#2646)
* re-ordering

* adds section header

* updates label on "products"

* changes button to primary

* moves description

* updates partial

* re-ordering + section headers

* more section heads and ordering

* redorders

* Toggle custom amount and tips settings

* Use display name for point of sale app type

* Use switches for enabling options

* Add space before required indicator

* Set and consolidate view model display names

* Move redirects and custom CSS to additional options

* Revert to checkbox for discounts

* adds padding

* removes bs-parent for multiple open elements on accordion

* adds helper text to discount checkbox

* updates "default view" label text

* wording cleanup

* more wording adjustments

* updates

* Add display names for app types

* Extract template editor inline styles

* updates helper text

* Display names for app types

* Typo fix

* Move template back to editor

* Fix selenium test

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-07-23 12:57:19 +02:00
a7f6bcf36c Updated status message when adding files and related test 2021-07-22 08:49:21 +02:00
590ca4ef56 add support for uploading multiple files to server 2021-07-22 08:49:21 +02:00
04726b3ee4 Payouts: Detect External OnChain Payouts (#2462)
* Refactor and decouple Payout logic

So that we can support lightning + external payout payments

Fixes & refactoring

almost there

final

Remove uneeded payment method checks

Refactor payouts to handle custom payment method specific actions

External onchain payments to approved payouts will now require "confirmation" from the merchant that it was sent by them.

add pill tabs for payout status

* Improve some UX around feature

* add test and some fixes

* Only listen to address tracked source and determine based on wallet get tx call from nbx

* Simplify isInternal for Payout detection

* fix test

* Fix Noreferrer test

* Make EnsureNewLightningInvoiceOnPartialPayment more resilient

* Make notifications section test more resilient in CanUsePullPaymentsViaUI
2021-07-16 09:57:37 +02:00
eb2b523800 Re-enable "Create" button for invoices on correct form input (#2694)
* Re-enable "Create" button for invoices on correct form input

fix #2693

* Use a more specific selector for form inputs
2021-07-14 23:49:06 +09:00
73b461f8d0 Greenfield: add text search terms to an invoice (#2648) 2021-07-14 23:32:20 +09:00
15be593bbd Save paymentRequestId in Metadata when creating invoice for Payment Request (#2644)
* Save paymentRequestId in Metadata when creating invoice

* Added Payment Request ID + link on invoice detail page

* Added paymentRequestId to the webhook payload

* Removed PaymentRequestId from webhook payload (rolled back previous change)

* Using strongly typed InvoiceMetadata

* Added OrderUrl metadata field to invoice + link

* Added Metadata.OrderUrl to docs

* Made orderUrl visible when no orderId is present
2021-07-14 20:43:13 +09:00
73c89ac28d Auto-select store when creating a new invoice (#2680)
* Auto-select store when creating a new invoice

* Set types as nullable in InvoiceController.UI.cs
2021-07-14 20:40:18 +09:00
45679fa29e fix typo in test/[...]/index.cshtml
Fix typo reported by following comment: 179520a211 (r53423646)
2021-07-14 11:04:21 +02:00
861e5b1530 Add webhook delivery status indicator (#2679)
* Add webhook delivery status indicator

As discussed in: https://github.com/btcpayserver/btcpayserver/discussions/2616

* Add relative delivery time to tooltips
2021-07-12 21:58:11 +09:00
d5019f61ce Expose ExplorerClientProvider to plugins via interface 2021-07-12 14:17:25 +02:00
78dd1b0476 Fix store javascript after bootstrap5 update 2021-07-12 14:16:41 +02:00
72d5c11811 Greenfield: Add CanModifyInvoices Permissions (#2595) 2021-07-11 00:30:01 +09:00
aefb81b7f0 Add "skip" and "limit" params for onchain txs API endpoint (#2688)
Discussed here: https://github.com/btcpayserver/btcpayserver/discussions/2667
2021-07-10 13:04:01 +09:00
55cc32ce0f Fix new docker compose incompatibility 2021-07-08 12:53:47 +02:00
060fc46e4f Fix system plugins resource loading 2021-07-08 12:53:34 +02:00
4bb3d60b6c Add misc/permissions to document the hierarchical structure (#2654) 2021-07-08 14:34:10 +09:00
4222d24d51 Fix: Invoice Search Text crashes invoice creation when value is too long (#2675)
This fix truncates the data to the column's max length to avoid this situation. Fixes #2641. Maybe also fixes #2585
2021-07-08 12:59:44 +09:00
6c76866f28 Update InvoiceConfirmed to InvoiceSettled in swagger (#2681)
fix #2580
2021-07-08 12:41:03 +09:00
50be6595bd update InvoiceStatusMark Swagger definition (#2674)
close #2597
2021-07-07 13:27:04 +09:00
91136d2551 remove unused code in fireworks.js (#2673)
relates to #2639
2021-07-07 13:25:34 +09:00
2e822c5878 Hiding NetworkFee row in invoice if not applicable 2021-07-06 21:20:13 +02:00
894dca2eef Update BTCPayServer/Views/Shared/Bitcoin/ViewBitcoinLikePaymentData.cshtml 2021-07-06 21:20:13 +02:00
48355129c5 Properly counting transactions that impact NetworkFee 2021-07-06 21:20:13 +02:00
edc9429e84 Displaying NetworkFee if it was present for the invoice 2021-07-06 21:20:13 +02:00
f1a222fbb3 New unit test to scan for external links/forms and if they have rel="noreferrer noopener" (#2668)
* Unit test to check for (possibly) external links

* Add rel="noreferrer noopener" to all external links so unit test passes

* Update BTCPayServer.Tests/UnitTest1.cs

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

* Update BTCPayServer.Tests/UnitTest1.cs

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

* Fixed bad merge from master

* PascalCasing

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2021-07-06 10:35:42 +02:00
40bbc5850f Greenfield doc error. Should be singular. Rewording to focus on a single result. (#2657)
* Should be singular. Rewording to focus on a single result.

* Update BTCPayServer/wwwroot/swagger/v1/swagger.template.stores-wallet.on-chain.json

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

* Update BTCPayServer/wwwroot/swagger/v1/swagger.template.stores-wallet.on-chain.json

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

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2021-07-06 10:19:18 +02:00
70baa4087c Hide referer URL to hide our BTCPay Server URL (#2655) 2021-07-05 13:51:00 +09:00
8e4f56bd52 Improves notification view (#2645)
* removes hr, adds notification settings link

* adds if else to show "no notifications" or table view

* adds icon to settings button

* Fix link to notification settings

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-07-05 12:22:24 +09:00
3800780ef2 PoS: Fix images in cart view (#2649)
Fixes an issue I overlooked in #2449 and which was brought up by @dstrukt [on Mattermost](https://chat.btcpayserver.org/btcpayserver/pl/jzxqs7xw33rjfe5itorxygifbe).
2021-07-02 11:28:38 +09:00
6e154f6cbc Merge pull request #2642 from dennisreimann/patch-1
2FA: Fix login partial name
2021-06-30 12:26:19 +01:00
673b6d6733 2FA: Fix login partial name
Fixes a typo in the filename, which leads to an exception on login when 2FA is enabled.
2021-06-30 13:11:27 +02:00
6185b93b59 Upgrade to Bootstrap v5.0.2 (#2638) 2021-06-30 19:03:43 +09:00
9bbaae9dea Fix visual bug with invoices search help text overlapping invoice action buttons (#2583)
* Fix visual bug with invoices search help text overlapping invoice action buttons

close #2582

* Update BTCPayServer/Views/Invoice/ListInvoices.cshtml

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

Co-authored-by: d11n <mail@dennisreimann.de>
2021-06-30 17:05:34 +09:00
6c856aba48 Introduce Server paging for Payouts List (#2564)
* Introduce Server paging for Payouts List

* Add paging params

* Minor code and formatting improvements

* View updates

* Apply suggestions from code review

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

* fix tests

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-06-30 16:59:01 +09:00
33de4cccfc Add permission key to API page (#2599)
* Better API key page

Now we can see the permission code + Fixed a margin-bottom when selecting a specific store

* Improve responsiveness of API key permissions

* Improve webhook editing UX

Jumps to edited item after submit

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-06-30 16:57:38 +09:00
6a79c8a27a Improve create payment request view (#2627)
* formatting

* more edits

* adds section headers

* updates wording

* Update BTCPayServer/Views/PaymentRequest/EditPaymentRequest.cshtml

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

Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
2021-06-30 16:56:28 +09:00
631deb9ce7 Removes lightning setup & wallet setup back button (#2628)
* removes back button

* removes wallet back on setupwallet page

* removes navbar section completely

* remove back button on modify wallet page

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-06-30 14:48:28 +09:00
cb2dd464f1 GreenField: Add StoreId to Invoice model (#2592) 2021-06-24 23:15:51 +09:00
dca376cb46 Add files via upload (#2615) 2021-06-24 23:13:06 +09:00
89d6c83504 Improves Create Store & Create App views (#2608)
* improves create store

* redorders form elements
2021-06-24 23:06:55 +09:00
2ea3baf36e Minor UI improvements (#2606)
* Added "Checkout" button to invoice detail page

* Added missing icon

All other pages have a "plus" icon on the primary button, except this page

* Button icons are always in front, not after like here was
2021-06-24 19:52:41 +09:00
3338dcac1c Richtext editor fixes (#2613)
* UPdate summernote with Bootstrap 5 integration

* Unify summernote options
2021-06-24 19:51:35 +09:00
0b9a2ee8ec Merge pull request #2581 from JimiHFord/fix-invoice-typo
fix invoice typo
2021-06-20 08:14:26 +02:00
78ac1ee15d fix invoice typo 2021-06-19 20:02:55 -07:00
886e9ab511 Update WebhookDataBase Swagger definition (#2578)
close #2577
2021-06-18 11:01:23 +09:00
3c80621dac Add payjoin option to hot wallet setup (#2450)
* Add payjoin option to hot wallet setup

Enables payjoin by default when creating a hot wallet and offers the user an opt-out.

Test fix

* Display PayJoin option only if it is available

* Test fixes

* Update hot wallet checks

* Test fix after rebase

* Use toggle buttons for enabling options
2021-06-18 10:25:17 +09:00
6b4ff4ce2c Merge pull request #2575 from NicolasDorier/refactor/wallet-cleanup
Cleanup some old code in wallet setup
2021-06-17 21:20:28 +09:00
b22aa778e1 Better webhook UI. Full URLs are visible. (#2572)
* Better webhook UI. Full URLs are visible.

* Using Bootstrap CSS class instead of a new class

* Created the generic class .sm:text-nowrap

* Renamed class

* Changed "sm" to "md"
2021-06-17 19:43:47 +09:00
1c440ed36c Update Maintenance.cshtml (#2576)
* Update Maintenance.cshtml

* fix BTCPay Server maintenance error

* Rephrase "derivation settings" to "wallet settings"

* Pay button text fix

* rephrase CoinSwitch description
2021-06-17 19:40:08 +09:00
70f56d5920 Encrypt WalletSetupViewModel.Config 2021-06-17 19:26:50 +09:00
8a1d5bbc57 Remove outdated code in UpdateWallet 2021-06-17 16:39:55 +09:00
956370592f Create a dedicated IsHotwalletProperty in the DerivationSchemeSettings 2021-06-17 15:36:22 +09:00
afd479ac69 Remove the DerivationSchemeViewmodel.Enabled property 2021-06-17 15:08:04 +09:00
39a4be5641 Remove HintAddress 2021-06-17 14:11:01 +09:00
70fcd053cd Signing context cleanup (#2568)
* Signing Context cleanup

Removes extra NBXSeedAvailable property in SigningContext, which got introduced in #2559. It is not needed since each view model involved already has it.

* Fix button in link
2021-06-15 17:35:23 +09:00
c9869922f7 Merge pull request #2569 from pavlenex/pnxbet
add pnxbet to readme
2021-06-14 18:27:15 +02:00
8b6a333cd2 add pnxbet to readme 2021-06-14 18:17:40 +02:00
ae329e371a fix link test 2021-06-14 11:32:35 +02:00
cf7c3c2bf7 LightningSupportedPaymentMethod.CryptoCode is never null 2021-06-14 18:22:00 +09:00
3d21d2724e Fix bug with LN payment method API endpoint throwing 500 (#2567)
close #2566
2021-06-14 18:19:52 +09:00
df64a93808 add pnxbet supporter 2021-06-14 08:42:05 +02:00
6068d384a4 fix missing bundle tag helper 2021-06-14 08:18:03 +02:00
3c0292f074 Wallet: Signing UI improvements (#2559)
* Refactoring to generalize wizard layout

* Wallet: Add intermediate signing options view

* Update BTCPayServer/Views/Wallets/WalletSigningOptions.cshtml

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

* Skip signing options for hot wallets

* Update signing options wordings, add PSBT doc link

* Fix test

* Remove form route params

* Use decode command for PSBT

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
2021-06-14 14:06:56 +09:00
371acc84a8 Do not retrieve all payouts in GetPullPayment every time 2021-06-10 18:54:27 +09:00
cd9feccf6e Mark Payouts as Paid (#2539)
* Mark Payouts as Paid

This PR allows users to mark payouts as paid manually through the UI  and through the API. It also sets up the payout proof system to be able store a manual proof that will in a later PR allow you to specify a proof of payment (link or text)

* add docs, test and greenfield client

* remove extra docs stuff

* Update BTCPayServer.Tests/GreenfieldAPITests.cs

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

* clean up pull payment/payouts fetch code

* Ensure payoutis are retrieved with pull payment

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
2021-06-10 18:43:45 +09:00
f1f3dffc97 Column improvements quick patch (#2562)
* removes title, switches search input with title

* adds CSS change

* Update BTCPayServer/Views/Server/ListUsers.cshtml

Breakpoint improvement

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

* Update BTCPayServer/wwwroot/main/site.css

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

* github revision fix

* spacing

* Simplify file details display

* Resolve users list conflict

* Indent fix

* Fix Tor casing

Co-authored-by: d11n <mail@dennisreimann.de>
2021-06-09 17:53:24 +09:00
e4f298acac Set lightning invoice fallback in QR code as uppercase (#2492)
* Set lightning invoice fallback in QR code as uppercase

On the lightning payment view the invoice is encoded as uppercase inside the QR code; however this is not true for the on-chain payment QR code if the invoice is set as fallback option.

This commit sets the fallback invoice as uppercase inside the QR code.

* Adds test case for uppercase fallback lightning invoice

* Apply suggestions from rockstar's review

Co-authored-by: Kukks <evilkukka@gmail.com>
2021-06-08 12:24:17 +09:00
e93b030bfe Update HWI library, warn users to run newer version (#2544)
* Update HWI library, warn users to run newer version

* Update BTCPayServer/wwwroot/js/vaultbridge.ui.js

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

* Update BTCPayServer/wwwroot/js/vaultbridge.ui.js

Co-authored-by: Pavlenex <pavle@pavle.org>

Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
Co-authored-by: Pavlenex <pavle@pavle.org>
2021-06-06 21:02:15 +09:00
64a7abe53a Bootstrap migration fixups (#2534)
* Remove xxl breakpoint

* Remove code bg

* Form updates

* Update PoS accordion

* Update forms

* Fix webhook password toggle

* Update highlight js styles

* Page updates

* Style unformatted checkboxes

* Fix typo

* Update accordions

* Update policies domain mapping

* Update toggles and checkboxes

* Update storage pages

* Fix specter logo filename casing

* Update checkout experience view

* Update webhook view

* Re-add used negative margins

* Update bootstrap

* POS layout fixes

* Decrease size of info icon in main headline

* Update BTCPayServer/Views/Stores/ModifyWebhook.cshtml

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

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
2021-06-06 20:44:54 +09:00
784a40e2ed Server Settings Bootstrap/UI Tweaks (#2558)
* server > services columns cleanup

* server > services column patch

* server > files adds text-end to table action column

* server > maintenance updates column

* removes title, switches search input with title

* adds CSS change

* Update BTCPayServer/Views/Server/ListUsers.cshtml

Breakpoint improvement

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

* Update BTCPayServer/wwwroot/main/site.css

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

Co-authored-by: d11n <mail@dennisreimann.de>
2021-06-06 20:41:14 +09:00
9ecd27dc85 Merge pull request #2474 from bolatovumar/feat/test-webhooks
Add ability to send test webhook call
2021-06-04 13:01:57 +02:00
72ef23786b Merge pull request #2340 from bolatovumar/feat/greenfield-api-delete-user
Add DELETE action for api/v1/users endpoint
2021-06-04 12:30:36 +02:00
28da78fc78 Improve tests and small refactoring 2021-06-04 12:20:45 +02:00
c345e81902 Simplify template 2021-06-03 21:16:27 -07:00
1b39742919 Simplify FirstOrDefault method call 2021-06-03 21:16:27 -07:00
bc33b32522 Add delivery ID to test webhook succes message 2021-06-03 21:16:27 -07:00
4671f08b64 Augment webhook test error message 2021-06-03 21:16:26 -07:00
9f6f74df59 Show success/error message after sending test webhook 2021-06-03 21:16:26 -07:00
872c99e033 Rename SendDelivery to SendAndSaveDelivery 2021-06-03 21:16:26 -07:00
cb6e8a6937 Simplify TestWebhook method 2021-06-03 21:16:26 -07:00
7c16f8f134 Allow specifying WebhookDeliveryData webhookid right away 2021-06-03 21:16:25 -07:00
ad11b61af2 Formatting 2021-06-03 21:16:25 -07:00
120b82ae00 Update webhook test page design 2021-06-03 21:16:25 -07:00
7cf6c97d3f Return view after webhook test POST call 2021-06-03 21:16:25 -07:00
2262acf12b Add ability to send test webhook call 2021-06-03 21:16:24 -07:00
ca3f97c42f Add missing API key type description 2021-06-02 20:12:53 -07:00
8731055786 Use UserNotFound instead of NotFound 2021-06-02 20:02:31 -07:00
e943c55a91 Add basic tests for delete user endpoint 2021-06-02 20:02:31 -07:00
be05b6aa90 Specify correct return type on delete user methods 2021-06-02 20:02:31 -07:00
0b4d94faf2 Remove unnecessary null check 2021-06-02 20:02:30 -07:00
9f8f677125 Remove unused IsAdmin method 2021-06-02 20:02:30 -07:00
949d6bf584 Replace admin check with CanModifyServerSettings authorization policy 2021-06-02 20:02:30 -07:00
9fc2d2b76b Remove CanDeleteUser constraint from "/api/v1/users/{userId}" endpoint 2021-06-02 20:02:29 -07:00
d9935ada9d Add "/api/v1/users/me" endpoint 2021-06-02 20:02:29 -07:00
b4076b53e8 Add IsAdminUser method to UserService 2021-06-02 20:02:28 -07:00
53c81918a5 Enable nullable reference checking in UsersController 2021-06-02 20:02:28 -07:00
7c11736992 Enable nullable reference checking in UserService 2021-06-02 20:02:28 -07:00
49f168b7b3 Update delete user swagger description 2021-06-02 20:02:27 -07:00
104092702a Simplify DeleteUser method 2021-06-02 20:02:27 -07:00
2ed8341403 Add IsRoleAdmin to user service 2021-06-02 20:02:26 -07:00
e5a196918f Add user service 2021-06-02 20:02:26 -07:00
907ae760e0 Add CanDeleteUser policy 2021-06-02 20:02:25 -07:00
37f7c4e0f9 Add DELETE user Swagger docs 2021-06-02 20:02:25 -07:00
fe107cd23f Add DELETE action for api/v1/users endpoint 2021-06-02 20:02:22 -07:00
a830c1e812 Use ~ prefix for local PoS image references 2021-06-01 14:34:06 +02:00
8eb85acb88 Self-host PoS sample images
As brought up in #2447 and previously been worked on in #1039.
2021-06-01 14:34:06 +02:00
ea8f510eff Merge pull request #2536 from pavlenex/remove-supporters
Remove supporters
2021-05-30 17:43:58 +02:00
cbec44bb73 Fix QR Code shower 2021-05-30 10:38:21 +02:00
ac44ed56e0 fixx broken shopify links 2021-05-26 13:11:59 +02:00
dbf2f99c4e Fixing issue with mysql migration and maxLength (#2541) 2021-05-25 16:03:49 +09:00
3b04ca229f remove unused images 2021-05-20 11:05:11 +02:00
5b1a171d27 remove supporters from the front page
- BTSE (Expired)
- OkCoin (Expired)
- DGLab (Expired)
- ACINQ (Remove due to front-page tier)
2021-05-20 11:02:18 +02:00
9138c6c70a remove past supporters from the readme
Remove:
- BTSE
- OKCoin
- DGLabs
2021-05-20 10:59:27 +02:00
f1092f910a bump 2021-05-19 20:19:22 +09:00
ebc9ddfeb1 changelog 1.1.2 2021-05-19 20:18:09 +09:00
201b4d6ec0 Fix Shopify parsing (#2530) 2021-05-19 16:26:54 +09:00
3b375929c1 Support wider server sync info in greenfield server info (#2511)
fixes #2498
2021-05-19 13:07:28 +09:00
ed7031981b Bootstrap v5 migration (#2490)
* Swap bootstrap asset files

* Update themes and color definitions

* Move general bootstrap customizations

* Theme updates

Theme updates

* Remove BuildBundlerMinifier

This lead to an error, because BuildBundlerMinifier and BundlerMinifier.Core seem to conflict here. Details: https://stackoverflow.com/a/61119586

* Rewplace btn-block class with w-100

* Update badge classes

* Remove old font family head variable

* Update margin classes

* Cleanups

* Update float classes

* Update text classes

* Update padding classes

* Update border classes

* UPdate dropdown classes

* Update select classes

* Update neutral custom props

* Update bootstrap and customizations

* Update ChromeDriver; disable smooth scroll

https://github.com/SeleniumHQ/selenium/issues/8295

* Improve alert messages

* Improve bootstrap customizations

* Disable reduced motion

See also 7358282f

* Update Bootstrap data attributes

* Update file inputs

* Update input groups

* Replace deprecated jumbotron class

* Update variables; re-add negative margin util classes

* Update cards

* Update form labels

* Debug alerts

* Fix aria-labelledby associations

* Dropdown-related test fixes

* Fix CanUseWebhooks test

* Test fixes

* Nav updates

* Fix nav usage in wallet send and payouts

* Update alert and modal close buttons

* Re-add backdrop properties

* Upgrade Bootstrap to v5 final

* Update screen reader classes

* Update font-weight classes

* Update monospace font classes

* Update accordians

* Update close icon usage

* Cleanup

* Update scripts and style integrations

* Update input group texts

* Update LN node setup page

* Update more form control classes

* Update inline forms

* Add js specific test

* Upgrade Vue.js

* Remove unused JS

* Upgrade Bootstrap to v5.0.1

* Try container related test updates

* Separate jQuery bundle

* Remove jQuery from LND seed backup page

* Remove unused code

* Refactor email autofill js

* Refactor camera scanner JS

* Re-add tests

* Re-add BuildBundlerMinifier

* Do not minify bundles containing Bootstrap

Details https://github.com/madskristensen/BundlerMinifier/issues/558

* Update bundles

* Cleanup JS test

* Cleanup tests involving dropdowns

* Cleanup tests involving collapses

* Cleanup locale additions in ConfigureCore

* Cleanup bundles

* Remove duplicate status message

* Cleanup formatting

* Fix missing validation scripts

* Remove unused unminified Bootstrap js files

* Fix classic theme

* Fix Casa theme

* Fix PoS validation
2021-05-19 11:39:27 +09:00
0eace936b0 Bump 2021-05-14 17:21:32 +09:00
0d70743a47 Do not spam logs with events 2021-05-14 17:17:46 +09:00
778a0f7e8d Fix: Lightning Listener not listening on Lightning payment after activating when using lazy payments (#2524) 2021-05-14 17:17:07 +09:00
a8cf6ee8a2 add coinswitch changelog 2021-05-14 10:03:13 +02:00
06a150a558 Changelog for 1.1.1 2021-05-14 16:20:47 +09:00
c551e5cd0a Make sure to only select accounted payments where we should (#2523) 2021-05-14 16:16:19 +09:00
776ded0b7e Fix Coinswitch enabledflag and nav category 2021-05-14 09:08:32 +02:00
9e3d99ec39 Do not automatically apply our datetimeoffset binder 2021-05-14 15:47:19 +09:00
6c9c7328bb Fix: Payout Transaction not matching when rate provided longer decima… (#2518)
* Fix: Payout Transaction not matching when rate provided longer decimal precision

fixes #2513 most likely

* Do not sue rounding and ensure crypto amount is saved with correct decimal places

* Round pull payment payout to the nearest digit supported by network

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2021-05-13 17:50:08 +09:00
2961a2ed53 Merge pull request #2506 from Kukks/fix-pay-button-steps
Fix Pay Button steps and range validation
2021-05-13 17:33:34 +09:00
12836b9f60 Merge pull request #2512 from NicolasDorier/udoqnf
Make sure BTCPayServer does not take the culture of the server
2021-05-13 17:32:05 +09:00
17cef99ce8 Spelling improvement (#2520) 2021-05-13 17:31:08 +09:00
2194fe43d2 Do not show payments which are not accounted in Payment request 2021-05-12 17:46:57 +09:00
06fef563e3 Fixed 2 typos (#2514)
* Fixed 2 typos

* Update BTCPayServer/Controllers/ManageController.APIKeys.cs

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

* Update BTCPayServer/Controllers/ManageController.APIKeys.cs

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

Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-05-07 18:51:10 +02:00
c38eeddc55 Update BC-UR bundle and support decoding hex format of wallet (#2505) 2021-05-08 00:35:43 +09:00
84ec33afb3 Update BitCore branding (#2501)
Co-authored-by: dalijolijo <dalijolijo@v220200132547106119.bestsrv.de>
2021-05-08 00:34:38 +09:00
4b30132d06 Make sure BTCPayServer does not take the culture of the server 2021-05-06 20:28:02 +09:00
38942aef25 remove log 2021-05-05 12:19:35 +02:00
200e8330d8 Fix Pay Button steps and range validation
There were numerous issues around different button types and the amount range validation. Also fixes #2503
2021-05-05 11:27:02 +02:00
86092fc955 Wrap more plugin loading logic in try catch to not crash fatally 2021-05-03 08:35:54 +02:00
50cd4cb3ce bump version 2021-04-29 12:52:55 +09:00
7c857118fa Update Changelog (#2480) 2021-04-29 12:51:35 +09:00
4e1b18e2bb do not crash invoice if wellknown metadata keys used with different e… (#2448)
* do not crash invoice if wellknown metadata keys used with different expected types

* fix

* add bits from alt PR
2021-04-28 16:49:10 +09:00
5fe3c1c61f U2fremove (#2496)
* Remove U2F support and JS

* fix final changes

* fix more final stuff
2021-04-28 16:22:09 +09:00
270bd98a10 Remove test code from Fido2 that got merged 2021-04-28 06:26:59 +02:00
02bf5afe0b Migrate existing U2F to Fido2 (#2484)
* Migrate existing U2F to Fido2

This seamlessly switches all u2f registrations over to the new FIDO2 support. Please note that I have not yet added a way to drop the u2f DB and its UI so that we can test the migration works properly for all.

* add testing logic

* fix u2f tests

* remove duplicate status message

* fix test and namespaces

* fix test
2021-04-28 13:14:15 +09:00
c878f63f99 Fix: Double entry for Api Key nav item in Account navigation menu 2021-04-27 14:06:34 +02:00
8083935b47 Greenfield: Deleting a store in the server, should delete only webhooks of this store 2021-04-27 18:55:38 +09:00
c7d11132e5 Merge pull request #2491 from dennisreimann/wallet-enabling-fix
Offer enabling toggle only for wallets that are set up
2021-04-27 11:16:10 +02:00
69442a49f1 Offer enabling toggle only for setup wallets 2021-04-27 09:27:52 +02:00
5f9ef0ff62 Greenfield: Human friendly error if webhook or delivery not found 2021-04-27 15:38:42 +09:00
0888cc4f97 Fix: Add Fido2 log filter to tests 2021-04-27 08:18:01 +02:00
6821a9a0a4 Fix: Coinswitch plugin missing nav specification 2021-04-27 07:37:08 +02:00
003e8a979b Fix: Plugins integrations formatting text wrap 2021-04-27 07:36:42 +02:00
08e8050ca5 Add button to copy API key to clipboard (#2439)
* Add button to copy API key to clipboard

* Update "copy API key to clipboard" button appearance
2021-04-27 11:30:26 +09:00
8d5c3c5cdd ModelBinders should not throw exception, but return error on ModelState 2021-04-26 12:55:03 +09:00
dcc4214dcb Make sure model binder error are returning error 422, use DateTimeOffsetModelBinder 2021-04-26 12:37:56 +09:00
ded55a1440 customized api/v1/invoices query parameters to filter results (#2461)
* customized api/v1/invoices query parameters to filter results

* customized api/v1/invoices query parameters to filter results

* update swagger and make parameters as arrays

* change startDate and endDate types to UnixTimestamp

* update invoice status type in swagger and better handle dateTimeoffset

* change status type to array of InvoiceStatus to match controller

* change status type to array of InvoiceStatus to match controller

Co-authored-by: somera <somera@tesla.com>
2021-04-26 11:32:44 +09:00
e0ff03068a add altcoin support for althash / htmlcoin (#2485)
* Switch Althash, keypath, hitbtc ticker

* add Althash

* add Althash

* switch to coingecko provider

* add Althash logo

* Fix stacking issue with rate call

* bump NBitcoin to 5.0.77

* bump NBXplorer.Client to 3.0.21
2021-04-26 11:31:00 +09:00
60c05cab55 Merge pull request #2477 from dennisreimann/lightning-setup-redesign
Lightning setup redesign
2021-04-22 17:39:05 +09:00
9c480580ba Merge pull request #2483 from dennisreimann/mobile-unread-count
UI: Fix unread count badge on mobile
2021-04-21 17:43:12 +02:00
f3c3f397eb UI: Fix unread count badge on mobile 2021-04-21 17:38:17 +02:00
f6c7f61ec3 Update BTCPayServer/Views/Stores/SetupLightningNode.cshtml
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-04-21 14:52:45 +02:00
aae5cce175 Improve custom node details toggling 2021-04-21 14:38:53 +02:00
8a9bea4603 Wording and display improvements 2021-04-20 14:52:00 +02:00
0e3f6acb0a Final tweaks and test fix 2021-04-20 12:23:50 +02:00
bbe621109f Lightning setup redesign 2021-04-20 12:09:27 +02:00
35f47bdfb7 Add and update theme colors 2021-04-20 12:09:26 +02:00
8ca0be5a4d Merge pull request #2453 from bolatovumar/unify-pos-app-card-markup
Unify POS app card markup
2021-04-20 18:29:50 +09:00
b6bd7cce6d Merge pull request #2446 from NicolasDorier/fweihnq
Give better error for greenfield API
2021-04-20 18:25:10 +09:00
a7cbb3941a Give better error for greenfield API 2021-04-20 18:21:26 +09:00
8957720c94 Merge pull request #2469 from dennisreimann/store-payment-method-toggling
Move payment method enabling toggle to store overview
2021-04-20 17:25:34 +09:00
452915478b UI: Fix duplicate status messages (#2481)
The status message is included in the NavLayout, hence the pages that use this layout should not include the status message.

Fixes #2478.
2021-04-20 16:16:21 +09:00
962c80fff8 Remove permission check
Ensured via the controller, see https://github.com/btcpayserver/btcpayserver/pull/2469#discussion_r616289628
2021-04-20 09:10:23 +02:00
aef06c7f61 Wording updates
Thanks @Zaxounette!
2021-04-20 09:09:32 +02:00
52be5746c6 Update BTCPayServer.Tests/SeleniumTester.cs
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-04-20 09:03:40 +02:00
b2ff64733d Update BTCPayServer/Controllers/StoresController.Onchain.cs
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-04-20 09:03:39 +02:00
85cf36ac4a Update BTCPayServer.Tests/SeleniumTester.cs
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-04-20 09:03:38 +02:00
5fda21373e Move enabling toggle to store overview 2021-04-20 09:03:37 +02:00
1ada87ca31 Fix: Do not crash if plugin folder mismatches plugin identifier 2021-04-20 08:38:37 +02:00
0554565b30 FIDO2/WebAuthN Support (#2356)
* FIDO2/WebAuthN Support

This adds initial support for WebAuthN/FIDO2 as another MFA mode. U2F is still intact and runs alongside it for now. Once this is merged, I will start work on migrating U2F support to happen over the FIDO2 protocol instead.

* Refactor and future proof system (prep work of seamless u2f migration)

* attempt js fix for mobile devices

* Apply suggestions from code review

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

* fix fido name saving

* do not spam logs and hide loader when failed

* PR Changes

* Apply suggestions from code review

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

* attempt fido2 bump

* add name if not named for credentials

Co-authored-by: d11n <mail@dennisreimann.de>
2021-04-20 14:06:32 +09:00
315284d5f5 Fix typo of webhook events property 2021-04-20 12:36:20 +09:00
99b1e391a6 bump NBitcoin 2021-04-20 12:05:48 +09:00
9b50e85d0d Merge pull request #2455 from btcpayserver/feat/improving-files-page
Improving File Storage page
2021-04-20 11:06:14 +09:00
e394474dad Update BTCPayServer/Views/Server/Files.cshtml
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-04-20 11:05:53 +09:00
7d1761de4f Coin Selection: Confirmed filter (#2467)
Allows provides confirmation count to Greenfield UTXO GET api
2021-04-20 11:02:06 +09:00
dfd4c967b7 fix null reference exception when no tor settings are provided 2021-04-19 07:43:11 +02:00
71305461d4 Cleaning up edit pages for storage providers not to have summary error
Error sandwich be gone
2021-04-18 14:05:12 -05:00
04a29ece3b Only display storage providers that can actually be set in dropdown 2021-04-18 14:03:22 -05:00
99dd6f3e50 Apply suggestions from code review
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-04-18 13:42:25 -05:00
8f6048191d Improving navigation between files and storage services and rewording info text 2021-04-18 13:42:17 -05:00
ee0fa71605 Refactor TorService (#2388)
* TorServices Refactor to make value passing easier

* Allow specifying Tor services through config

Format:

BTCPAY_TORSERVICES: "BTCPAYSERVER:URL.ONION:VIRTUALPORT;BTC-P2P:URL.ONION:VIRTUALPORT;BTC-RPC:URL.ONION:VIRTUALPORT;SOMEOTHERONIONSERVICE:URL.ONION:VIRTUALPORT"

* add tests

* Optimize Tor Services loader and ensure it is loaded as a hosted service

* Remove Task from Tor service loader

* Use options to parse Tor services

* Fix booboo

* Fix test after fixing booboo

* Adding timeout on long running CanEnumeratetorServices test

(cherry picked from commit 274b77e3175960158b803410037e2c7ff31984be)

* Renaming timeout variable to better name

* Only allow one of torrcfile or torservices

Co-authored-by: Kukks <evilkukka@gmail.com>
Co-authored-by: rockstardev <rockstardev@users.noreply.github.com>
2021-04-18 11:26:06 +09:00
475a68924e Allow accessing "misc/lang" endpoint with Greenfield auth schemes (#2471)
closes #2437
2021-04-18 11:22:50 +09:00
c0a544351b Can disable the modification of SSH settings in BTCPay Server (#2468)
* Can disable the modification of SSH settings in BTCPay Server

* Update BTCPayServer/Controllers/ServerController.cs

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

* Update BTCPayServer/Controllers/ServerController.cs

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

* Update BTCPayServer/Views/Server/SSHService.cshtml

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

Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-04-17 13:29:50 +09:00
15201a927e UI fixes (#2463)
* Fix formatting in bootstrap.css

This looks like it got introduced when resolving a merge conflict.

* Fix typos in views

* Fix semibold style definition
2021-04-16 15:02:40 +09:00
efa567f965 Unify POS app card markup 2021-04-14 20:00:01 -07:00
e1df1c255a Add user id in log when log in 2021-04-15 11:19:06 +09:00
64e34d0ef5 Seaparate CoinSwitch as a plugin (#2390)
* Separate coinswitch as a system plugin

* Decouple Coinswitch from Checkout UI

* remove dummy csproj

* Remove CoinSwitchTests.cs per @NicolasDorier feedback

Co-authored-by: rockstardev <rockstardev@users.noreply.github.com>
2021-04-13 20:19:48 +09:00
2e12befb8b Refactor and decouple Payout logic (#2046)
* Refactor and decouple Payout logic

So that we can support lightning and more complex flows like allowing external payments to payouts.

* fix dropdown align

* switch to simpler buttons

* rebase fixes

add some comments

* rebase fixes

add some comments

* simplify enum caveman logic

* reduce code duplication and db round trips

* Fix pull payment date format

* fix issue with payouts to send page not working correctly

* try fix some style issue

* fix bip21parse
2021-04-13 17:36:49 +09:00
98eee27b93 Remove warnings 2021-04-13 17:06:11 +09:00
8ed853a3b3 Attempt to make selenium less flaky 2021-04-13 15:12:09 +09:00
8fd4a816a6 Allow Payjoin for wallet receive addresses (#2425)
* Allow Payjoin for wallet receive addresses

* wip

* show bip21 and additional work

* style better

* add to docs

* pr changes

* remove from state when unreserved
2021-04-13 12:26:36 +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
6729827645 Update greenfield-development.md 2020-06-15 12:45:05 +02: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
6c828a29ec Update greenfield-development.md 2020-06-12 14:10:43 +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
34239dc383 Update docs/greenfield-development.md
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2020-06-04 12:03:56 +02:00
67758609a7 Add Onion-Location HTTP header
Closes #1626.
2020-06-04 08:53:55 +02:00
6af3b4a51d Update greenfield-development.md 2020-06-03 11:12:26 +02:00
16afca8058 Create GreenField Api Development Docs 2020-06-03 10:28:37 +02:00
f2bb24f6ab Fix build error #1588 2020-06-03 15:49:27 +09:00
44ee7c66ce Merge pull request #1620 from NicolasDorier/additionaldata
[GreenField] Add additional data to allow roundtrip of upper version fields
2020-06-01 19:23:35 +09:00
117622200b Merge pull request #1622 from Kukks/network-rates-decouple
Remove dependency on Common from Rating
2020-06-01 15:25:19 +09:00
340ba5c714 fix symbol 2020-06-01 08:13:39 +02:00
9e16b506e5 Small esthetic refacotring 2020-06-01 13:10:21 +09:00
e865d85c2c Merge pull request #1619 from NicolasDorier/adddoc
[Greenfield] Document store API
2020-06-01 11:47:16 +09:00
284e66c730 fix test 2020-05-31 20:54:50 +02:00
587f244f1d Remove dependency on Common from Rating
replaces #1591 and #1592 , closes #1571 Replaces the Currencies.txt to a json format which includes the networks too ( there is also a test to check now) Also makes CurrencyPair not depend on network and instead use CurrencyNameTable
2020-05-31 20:54:50 +02:00
379e5741e7 fix broken bootstrap theme generator link 2020-05-31 20:54:24 +02:00
ec4c346e0a [Greenfield] Document store API 2020-05-31 12:04:23 +09:00
5099f98d2a [GreenField] Add additional data to allow roundtrip of upper version fields 2020-05-31 11:51:36 +09:00
ebc99adc58 Merge pull request #1615 from NicolasDorier/refactor/timespan
Always use second based TimeSpan in Greenfield
2020-05-31 10:55:40 +09:00
048dff7e9e Always use second based TimeSpan in Greenfield 2020-05-31 08:52:32 +09:00
a70934938a Merge pull request #1605 from dennisreimann/pos-refactoring
Point of Sale Refactoring
2020-05-30 13:14:50 +09:00
d9a93f996f Merge branch 'master' of https://github.com/btcpayserver/btcpayserver 2020-05-29 18:47:40 +09:00
3456d87bb5 Merge pull request #1612 from Kukks/api/swaggerln
Api/swaggerln
2020-05-29 18:47:25 +09:00
4947fa4d45 Add also money json converter 2020-05-29 10:15:01 +02:00
37f4b34b5e Add Lightmoney json converter + do swagger defs for ln api 2020-05-29 10:04:28 +02:00
66206399e1 Rename LightningPrivateRouteHint =>privateRouteHints 2020-05-29 09:03:07 +09:00
1e3f62718d GreenField: Cross-implemenation Lightning Node API (#1566)
* GreenField: Cross-implemenation Lightning Node API

* switch to hard unrsstricted check

* fix

* set LightningPrivateRouteHints in swagger + stores api

* add priv route hint

* rename models and add swagger defs to models
2020-05-29 09:00:13 +09:00
114ab98059 Merge pull request #1611 from Kukks/fix/pr-expiry-big
Fix: Paid payment requests are not marked as completed if there is an expiry date set
2020-05-29 08:58:58 +09:00
47baa219fd Merge pull request #1609 from NicolasDorier/pj3
Adapt PJ implementation to latest BIP
2020-05-29 08:58:38 +09:00
96509717cb Fix: Paid payment requests are not marked as completed if there is an expiry date set 2020-05-28 17:45:06 +02:00
89bbcb6092 Merge pull request #1610 from pavlenex/supporter-new
Add new supporter to readme
2020-05-29 00:05:21 +09:00
95dbb65612 GreenField: Payment Request property missing jsonconverter 2020-05-28 16:57:03 +02:00
7db8d52624 add missing title in swagger payment request def 2020-05-28 16:53:50 +02:00
77073fa78c fix swagger schema 2020-05-28 16:42:47 +02:00
9e315f99d0 POS: Updates from code review 2020-05-28 12:50:08 +02:00
16ad3ee7fe Add test for payment request payment status update in greenfield 2020-05-28 09:48:47 +02:00
559015c70d POS: Test fixes 2020-05-28 09:40:34 +02:00
15d02dab4f Add new supporter to readme 2020-05-28 09:28:42 +02:00
332a1da167 POS: Updates from code review 2020-05-28 08:59:48 +02:00
e12aa9e657 POS: Use views instead of partials 2020-05-28 08:50:04 +02:00
9503e07dc8 Adapt PJ implementation to latest BIP 2020-05-28 13:35:48 +09:00
9b44370832 support version revision tags 2020-05-27 16:56:39 +02:00
568015c58f add new supporter 2020-05-27 16:41:50 +02:00
58f56eac90 POS: Updates from code review
Thanks @kukks
2020-05-27 14:20:21 +02:00
03532e4063 Merge pull request #1604 from janoside/master
Clarify/clean up warning shown when adding a lightning node
2020-05-27 12:34:36 +09:00
de6081c2dc Merge pull request #1602 from Kukks/electrum-file
Rename Coldcard to Electrum/Airgapped hardware wallets
2020-05-27 12:33:43 +09:00
197b46880c POS: Separate static and cart views 2020-05-26 21:53:23 +02:00
b7ec22ee89 POS: Set ViewType via optional URL parameter
Falls back to the DefaultView defined in the POS settings.

POS: Fix POST-Route
2020-05-26 21:53:22 +02:00
fad53a9fa2 POS: Replace EnableShoppingCart with DefaultView 2020-05-26 16:48:47 +02:00
5b4fec11ed Merge pull request #1596 from NicolasDorier/random-rbf
Randomize RBF if the user does not care
2020-05-26 03:23:33 +09:00
0ef4602a65 Clarify/clean up warning shown when adding a lightning node 2020-05-25 13:42:58 -04:00
c8f182f13f Rename Coldcard to Electrum/Airgapped hardware wallets
Also adds support to read the xpub from the file directly ( Cobo Vault support)
2020-05-25 15:49:44 +02:00
36630d9586 Randomize RBF if the user does not care 2020-05-25 19:46:42 +09:00
32f2acee53 Removed unexisting file in csproj 2020-05-25 16:08:16 +09:00
3be2ef5c91 Merge pull request #1599 from NicolasDorier/removeledger
Remove LedgerWallet direct integration
2020-05-25 07:50:33 +09:00
7e5d269c39 Remove LedgerWallet direct integration 2020-05-25 07:41:30 +09:00
6e0c090622 Merge pull request #1597 from NicolasDorier/refactor/wallet-param
Refactor parameter passing in wallet functions
2020-05-25 07:15:52 +09:00
cccf3ca617 The signing context should not be passed to PSBT screen 2020-05-25 07:05:01 +09:00
9e9b5945fe Ensure the payjoin can generate a high R signature if the payer is sending it 2020-05-25 06:47:43 +09:00
77f6019d82 Use EnforceLowR suggestion of NBXplorer for signing 2020-05-25 06:34:49 +09:00
35432d919c Refactor common data structure for wallet into SigningContext 2020-05-25 06:29:06 +09:00
25e6f82aa3 Refactor parameter passing in wallet functions 2020-05-25 04:55:28 +09:00
d22993871f Bump NBXplorer 2020-05-24 20:19:06 +09:00
80563de587 Add support for Bitpay invoice create property "paymentCurrencies" (#1589) 2020-05-24 19:11:26 +09:00
b5102c4269 Bump NBX (#1595) 2020-05-24 17:59:43 +09:00
9d215ea27d Reuse same html and handling of commands for PSBT signing/ Wallet Send (#1587)
* Reuse same html and handling of commands for PSBT signing/ Wallet Send

* fix ledger
2020-05-24 04:31:21 +09:00
cdf6886c39 Require loggedin user for docs? (#1567)
* Require loggedin user for docs?

We had talked before that docs should be for authorized users only. We had it in when we had Nswag but must have lost it after we switch to manual swagger files

* fix
2020-05-24 04:18:51 +09:00
79b034b505 GreenField: Add properties to Store API (#1573)
* GreenField: Add properties to Store API

* Update StoreBaseData.cs

* fix api

* fix swagger
2020-05-24 04:13:18 +09:00
bfba105aec Update packages (may fix #1590) 2020-05-22 19:23:37 +09:00
1bbdaa1251 Make sure replaced transactions have linethrough in the invoice list 2020-05-21 01:50:39 +09:00
ca462bec84 Merge pull request #1585 from btcpayserver/feat/private-route-hints
Adding private route hints based on store settings
2020-05-20 08:10:08 +09:00
eb5dcab32d Upgrading to BTCPayServer.Lightning to 1.1.15 2020-05-19 18:00:35 -05:00
ca3acdacdc Setting PriveRoute hints when creating lightning invoices 2020-05-19 16:47:26 -05:00
33f63508e8 Adding setting in checkout experience for inclusion of private route hints 2020-05-19 16:27:06 -05:00
5033cb3186 Support specifying payment method through apps (#1539)
* Support specifying payment method through apps

closes #1525
This is great if you want to offer items with an incentive to use a specific payment method without messing with the rates.
For example, you can have `Item A` which costs 25$ and your store is configured for USDT and BTC. You can create two items, with different prices, where Item A costs 20$ if you pay with bitcoin or 25$ if you paid in dirty fiat pegs

* make code cleaner

* Add Test

* fix test

* fix test
2020-05-20 03:54:24 +09:00
3d1122be7c Merge pull request #1583 from NicolasDorier/refactor/serverinfo
Refactor server info data structure
2020-05-20 03:43:39 +09:00
1d092a15fb Refactor server info data structure 2020-05-20 03:27:06 +09:00
501a21b89e bump .net core on dockerfile 2020-05-20 03:10:30 +09:00
b9006e4417 fix rebase
# Conflicts:
#	BTCPayServer.Tests/GreenfieldAPITests.cs
2020-05-19 20:09:19 +02:00
5b3b96b372 GreenField: Payment Requests CRUD (#1430)
* GreenField: Payment Requests CRUD

* fixes

* fix swagger

* fix swag

* rebase fixes

* Add new permissions for payment requests

* Adapt PR to archive

* fix tst

* add to contains policxy

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

* do not register decimal json converter as global

* fix cultureinfo for json covnerter

* pr changes

* add json convertet test

* fix json test

* fix rebase
2020-05-20 02:59:23 +09:00
338a0f9251 Merge pull request #1576 from dennisreimann/api-server-info
GreenField: Add Server Info API basics
2020-05-20 02:31:16 +09:00
29ba761d7c Merge pull request #1581 from NicolasDorier/syncpj
Sync payjoin receiver implementation to the bip
2020-05-19 21:10:35 +09:00
b96e668dfd Sync payjoin receiver implementation to the bip 2020-05-19 20:57:04 +09:00
de3753d04e Rename payjoin optional parameters, implement sender minFeeRate 2020-05-19 20:57:03 +09:00
2a030fe7fb Use different close button color variable (#1580)
fix #1579
2020-05-18 21:52:26 +02:00
f595d823b6 Decode item description on POS app page (#1578)
fix #938
2020-05-18 21:51:58 +02:00
78d191f7d8 Incorporate code review feedback 2020-05-18 16:51:21 +02:00
3b6dbe76c5 Add sync state 2020-05-18 16:02:15 +02:00
e3b348b55c GreenField: Add Server Info API basics 2020-05-18 15:29:04 +02:00
cf012a7946 fix dead link (#1575) 2020-05-18 08:44:12 +02:00
8d1ff01ee8 Adapt payjoin implementation to the BIP (#1569) 2020-05-17 05:07:24 +09:00
e9bda50054 Bumping LND to v0.9.2-beta in dev 2020-05-13 18:06:14 -05:00
8ca2824b00 Open wallet with BIP21 links (#1565)
* Open wallet with BIP21 links

https://i.imgur.com/IWefMKB.gifv

* remove debugger;

* Move to settings
2020-05-12 22:32:33 +09:00
f7d70daff3 Add invalid-transaction as wellknown error 2020-05-12 21:42:51 +09:00
42d27d69dc Merge db migrations 2020-05-10 00:53:21 +09:00
5a9d1e3257 Merge pull request #1560 from Kukks/archive-pr
Archive Payment reqeusts
2020-05-10 00:51:59 +09:00
9cc9a16bb9 Merge pull request #1556 from Kukks/invoice-archive
Archive Invoice
2020-05-10 00:51:11 +09:00
a3efe9a9dc Merge pull request #1561 from NicolasDorier/bp/new
Refactoring of payjoin to support new spec
2020-05-10 00:50:40 +09:00
94b0b9498d adapt tests 2020-05-09 15:17:59 +02:00
bb322d6bf3 add e2e test 2020-05-09 15:05:52 +02:00
b0f820e95a Implement noadjustfee, feebumpindex and v parameters for payjoin 2020-05-09 21:22:00 +09:00
da588380ed Remove httpCode from error message 2020-05-09 19:33:48 +09:00
8fa65408ed Archive Payment reqeusts
closes #1588
2020-05-08 12:33:47 +02:00
2d68d0da63 Redo App template editor with Vue based app (#1544)
* Redo App template editor with Vue based app

* fix styles better

* remove debug

* support methods

* make price required

* fix styling for validation errors

* show create or edit in title based on context

* add border bottom when image present

* escape/unescape

* more validation fixes

* fix responsive style

* Toggle template field

* add errors to the app

* enhance validation
2020-05-08 05:37:59 +09:00
2bc7fa0316 Show warning when enabling Payjoin but supported payment methods are not using a hot wallet (#1545)
* Show warning when enabling Payjoin but supported payment methods are not using a hot wallet

https://i.imgur.com/RXBhr0n.png fixes #1474

* expose p2p port
2020-05-08 05:37:10 +09:00
55f416c48c apply window scroll offset to copied notification offset (#1550)
resolves #1549
2020-05-08 05:35:25 +09:00
aff91f49ef Make fee rate options pretty (#1554) 2020-05-08 05:34:39 +09:00
ba02372d13 Try to tell browser that autocomplete is not welcome in generate wallet (#1555)
fixes #1553
2020-05-07 21:41:37 +09:00
e5a3ef3e22 Archive Invoice 2020-05-07 12:50:07 +02:00
137c3ef2ce Add changelog 2020-05-05 19:19:27 +09:00
87352f0b62 Make sure wallet support decimal fee, and allow user to select different fee rate based on expected confirmation time 2020-05-05 19:10:53 +09:00
2226884946 add qrcode margins (#1547)
addresses #1537 by adding a margin to the qrcodes in ShowLightningNodeInfo and WalletReceive (use same settings as Checkout)
2020-05-05 10:26:57 +02:00
9d2cd46464 fix tests and bump 2020-05-05 07:23:00 +09:00
f3b2b350ce Fix build 2020-05-05 07:06:32 +09:00
96c04481da bump NBXplorer 2020-05-05 06:55:19 +09:00
dad2642fa7 Make sure we match the user's sequence 2020-05-05 04:45:10 +09:00
59bdb943dd Reverting invoice row display so AM/PM is not cut off 2020-05-04 01:42:02 -05:00
67da6ee379 Decimal precision and filter valid transaction (#1538)
The liquid transactions list was showing all transactions to the wallet, even when it had nothing to do with the specific crypto code (e.g sending LBTC txs in USDT, LCAD in USDT, etc). This PR fixes that.

It also uses the previously introduced checkout decimal precision fix to the Wallets screen, specifically the balance amount on wallet llist and balance change on transaction list.
2020-05-04 01:04:34 +09:00
9c9c102e74 fix PadRight formatter 2020-05-03 09:32:10 +02:00
26241be6fa Ensure dropdown option doesn't overflow container (#1533)
fix #1526
2020-05-03 01:39:39 +09:00
2bb4dd5d01 Fix decimal points shown in Checkout UI based on currency ( always showed btc decimal precision before) (#1529)
* Fix decimal points shown in Checkout UI based on currency ( always showed btc decimal precision before)

* cleanup ShowMoney
2020-05-03 01:28:35 +09:00
5312bb1dee Merge pull request #1535 from Kukks/elementsbump
Bump elements and fix test
2020-05-02 20:47:22 +09:00
bf6f5aa335 Bump c-lightning 2020-05-02 20:33:55 +09:00
4a58763f98 Bump elements and fix test 2020-05-02 13:26:55 +02:00
b8202da7aa Fix tests 2020-05-02 00:59:36 +09:00
edfc82ac75 Merge pull request #1522 from Kukks/view-seed
Add View seed to wallet settings
2020-05-01 21:36:27 +09:00
b28fc85974 Fix: Do not returns HTML content if authentication to API fails 2020-05-01 21:33:42 +09:00
ab1b36bcdc add test for view seed 2020-05-01 13:34:11 +02:00
5443ac4688 Merge pull request #1531 from Kukks/api/store/prep
GreenField: Prep store for more data
2020-05-01 18:49:29 +09:00
d92d8ba0e4 Merge pull request #1524 from Kukks/txlist-labelfix
Add top Label filter + fix label link inconsistency
2020-05-01 18:47:48 +09:00
0f19d303eb Merge pull request #1527 from Kukks/app-inv-clean
Make App Inventory Updater run updates in order
2020-05-01 18:46:08 +09:00
1332f597e5 Merge pull request #1528 from Kukks/payjoin/ui-linkfix
Payjoin: Fix payjoin detection in checkout UI
2020-05-01 18:44:50 +09:00
de004074b7 Fix typo 2020-05-01 18:43:40 +09:00
29741f39ac Merge pull request #1523 from Kukks/sender-payjoin-label
Tag payjoin for sender too
2020-05-01 05:27:33 +09:00
33ea8984fc format 2020-04-30 16:44:27 +02:00
85517b0344 GreenField: Prep store for more data
refactored things around a bit to make it cleaner for when we add more properties to the store model
2020-04-30 16:43:16 +02:00
74c574255e Payjoin: Fix payjoin detection in checkout UI
sometimes, it would think there is a payjoin enabled invoice when really, it was just the address or asset id that has `pj` in it
2020-04-30 09:05:17 +02:00
70d4e98dff Make App Inventory Updater run updates in order
followed the same logic we used in the new auto labelling
2020-04-29 14:51:37 +02:00
f1900d30f2 clean format 2020-04-29 11:21:47 +02:00
463567cb07 Add top Label filter + fix label link inconsistency 2020-04-29 10:11:23 +02:00
53b0e675c3 Tag payjoin for sender too 2020-04-29 09:09:16 +02:00
d323bb35cc Add View seed to wallet settings 2020-04-29 08:28:13 +02:00
3e13e478ad Fix click on label 2020-04-29 01:43:41 +09:00
5f421b0679 Changlog 1.0.4.2 (#1513) 2020-04-29 01:23:02 +09:00
c99fe54db1 bump 2020-04-29 01:21:58 +09:00
05a2985c5b Changlog 1.0.4.2 2020-04-29 01:07:20 +09:00
47408498b9 Revert "View seed option if available (#1518)" (#1521)
This reverts commit e75b4ec6bfb41dfca018315350e7305f95cc39f0.
2020-04-29 00:57:41 +09:00
e75b4ec6bf View seed option if available (#1518) 2020-04-29 00:55:53 +09:00
ff99ab1239 Improve pay button with custom text (#1520)
Fixes #1517.
2020-04-29 00:52:48 +09:00
2841cd8498 Updates from design system (#1519)
* Use variable names as defined in the design system

* Use bootstrao version from design system
2020-04-29 00:48:55 +09:00
519f4af867 Bump pj original tx broadcast timeout 2020-04-29 00:23:51 +09:00
68cc3aba21 update translations 2020-04-29 00:22:48 +09:00
3a2970a495 Label Factory (#1516)
* Label Factory

* fix typo and format
2020-04-28 16:53:34 +09:00
b31fb1a269 Auto label utxos based on invoice and payjoin (#1499)
* Auto label utxos based on invoice and payjoin

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

* wip

* wip

* support in coinselection

* remove ugly hack

* support wallet transactions page

* remove messy loop

* better label template helpers

* add tests and susbcribe to event

* simplify data

* fix test

* fix label  + color

* fix remove label

* renove useless call

* add toString

* fix potential crash by txid

* trim json keyword in manual label

* format file
2020-04-28 15:06:28 +09:00
3801eeec43 Payjoin: Better UIH1 & UIH2 based selection (#1473)
* Try to make SelectUTXO care about all inputs and outputs

* wip

* wip

* Add test and fix seelctor

* remove space

* review changes

* revert back to index check
2020-04-28 01:28:21 +09:00
94cdd399d5 Finetune colors (#1514)
* Better harmonic neutral color progression

fix

* Invert light/dark colors for dark theme

fix

* Lighten form control borders a bit

* Use correct text color variables
2020-04-27 23:57:18 +09:00
c784144a07 Greenfield: Add update store API (#1495)
* Greenfield: Add update store API

* update update store model

* change greenfield controller name to stop conflict
2020-04-27 20:13:20 +09:00
b600e5777e Add tooltip for store deriv + show "Not set" + "show end piece of string" (#1507)
* Add tooltip for store deriv + show "Not set" + "show end piece of string"

fixes #1506

* use regex witchraft

* adjust with regex
2020-04-27 19:55:46 +09:00
e49074d797 fix bip21 + coinselection combo bug in wallet send 2020-04-27 12:12:01 +02:00
02d26467f9 remove fake bundle 2020-04-27 12:04:18 +02:00
e68b45c76a Update lightning-charge to v0.4.19 (#1511)
Changes the default units from mBTC to sats
2020-04-27 18:44:12 +09:00
f410f7d4d1 Hide LN option for liquid Assets (#1512)
Was getting a bit crowded for stuff that isn't supported yet.
2020-04-27 18:15:38 +09:00
d4dbe6fe17 Typo fix (#1503) 2020-04-27 05:18:36 +09:00
c7305ba5e1 Bump lightning 2020-04-27 04:39:17 +09:00
e11963aca0 Checkout dark theme improvements (#1510)
Increase the contrast for some elements. Closes #1508.
2020-04-27 04:23:03 +09:00
2d77426e04 Bump lightning 2020-04-27 04:10:31 +09:00
7e0f9e1d28 Fix docker-customer-lightning-cli.ps1 pay doesn't work (Fix #1509) 2020-04-27 03:59:16 +09:00
18e181bb9f Bump lightning library, logs channel setup 2020-04-27 03:53:45 +09:00
c3c9585a95 Bump BTCPayServer.Lightning 2020-04-27 02:29:34 +09:00
4b5b941761 Update translations 2020-04-26 15:34:30 +09:00
79c70b31a3 Fix tests 2020-04-26 01:47:47 +09:00
072139f707 bump Nbitcoin 2020-04-26 01:11:50 +09:00
9d80db98c5 bump NBitcoin 2020-04-26 01:01:09 +09:00
a5df029d43 update test to loop through all formats for payjoin 2020-04-25 17:38:04 +02:00
47f16aadd5 Rely on NBitcoin to get the expected hash 2020-04-26 00:26:02 +09:00
f8b2b18c6e Fix PJ (#1502)
* Fix P2SH-P2WPKH case for Payjoin (Fix #1500)

* fix p2sh issue

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2020-04-26 00:19:24 +09:00
4be6c06af5 add payjoin e2e test for all compatible formats 2020-04-25 16:12:16 +02:00
92c58eea7f Fix: Sign with NBX option not present after decoding PSBT (#1497) 2020-04-23 22:02:26 +09:00
5e6049bf3f Payjoin fix: return psbt in same format it was received (#1496)
* Payjoin fix: return psbt in same format it was received

* fix formatting
2020-04-23 22:02:00 +09:00
7adaa146dc Merge pull request #1471 from dennisreimann/api-health-endpoint
GreenField: Add health check endpoint
2020-04-23 02:44:11 +09:00
e3b51f593e Merge pull request #1411 from Kukks/api/stores/get
GreenField: Create/Get/Delete Stores
2020-04-23 02:42:29 +09:00
e64094dfcc fix permissions for client api tester 2020-04-22 15:12:38 +02:00
cb6fcadb86 add scope test 2020-04-22 15:05:13 +02:00
297b84a18b add request name validation 2020-04-22 15:05:13 +02:00
b7c0e049b5 fix bug in permission store selector 2020-04-22 15:05:13 +02:00
aeef160d0b separate store swagger 2020-04-22 15:05:13 +02:00
34c1a304a9 Add Create Store 2020-04-22 15:05:13 +02:00
4f1ae4733c remove store api 2020-04-22 15:05:13 +02:00
e009c1a25a Fixing CheckNoDeadLink test now that btse blocks our call from circleci 2020-04-22 15:05:13 +02:00
79f12a7058 fix client 2020-04-22 15:05:13 +02:00
deb197cfa5 GreenField: Get Stores 2020-04-22 15:05:13 +02:00
2710130667 add error message instead of 500 status
fixes #1494
2020-04-22 14:18:36 +02:00
48163961ed Rename LCAD image (#1493)
Fixes #1491.
2020-04-22 08:47:44 +02:00
8658cb5f29 Re-add versioning for btcpay.js (#1489) 2020-04-22 08:24:29 +02:00
a6a56e4791 fix controller 2020-04-21 17:09:17 +02:00
22e39998e2 Updates from code review
Thanks @kukks!
2020-04-21 16:43:14 +02:00
70d1056d48 API: Health endpoint returns synchronized state 2020-04-21 16:29:54 +02:00
3bd5c3e1b5 API: Add health check endpoint 2020-04-21 14:59:33 +02:00
0a1a4fd3b5 Merge pull request #1490 from bolatovumar/fix-1488
Make both sides of payment request table look same
2020-04-21 20:15:33 +09:00
e508b22d34 Make both sides of payment request table look same
fix #1488
2020-04-20 20:45:59 -07:00
a7815f107e Merge pull request #1485 from Kukks/fix/pay-request-url
Fix: Payment request redirects to non-existing (404) URL after paymen…
2020-04-20 18:39:59 +09:00
ded5670108 Merge pull request #1486 from Kukks/hotwalletwarning
Show warning when using hot wallet on non admin
2020-04-20 01:56:18 +09:00
c1ffeb331b Fix typo 2020-04-20 01:47:27 +09:00
ad1148d3e2 Merge pull request #1487 from ketominer/master
Fix MySQL support (fixed width columns instead of blobs) replaces #1484
2020-04-19 21:26:36 +09:00
a7b926d907 fixed Address field size (back) 2020-04-19 13:48:05 +02:00
1f7a821c09 Show warning when using hot wallet on non admin
closes #1475
2020-04-19 13:45:51 +02:00
bf45edb5d8 Fix: Payment request redirects to non-existing (404) URL after payment completed
fixes #1479
2020-04-19 13:12:07 +02:00
686f5bf151 Fix MySQL support (fixed width columns instead of blobs) 2020-04-19 11:15:06 +02:00
426fe793e6 remove versioning for btcpay.js
fixes #1483
2020-04-19 09:29:20 +02:00
aee55103a3 Merge pull request #1477 from dennisreimann/asset-cache-busting
Improve static asset caching
2020-04-19 05:32:20 +09:00
778bf97079 Merge pull request #1478 from dennisreimann/assert-link-not-dead
Improve AssertLinkNotDead test output in case of exception
2020-04-19 03:10:45 +09:00
2dcb3111f8 Add changelog 2020-04-19 03:05:23 +09:00
03d1f98402 Improve AssertLinkNotDead test output in case of exception
If the test fails with an exception other than the `EqualException` the failed URL isn't logged. This general exception handler takes care of e.g. `HttpRequestException` and reports the URL that failed to be checked.

Stumbled upon this while checking why [this test run](https://app.circleci.com/pipelines/github/btcpayserver/btcpayserver/2934/workflows/0525d9fd-e4de-49dc-957b-d98b16a9abd4/jobs/7199/parallel-runs/0/steps/0-102) fails.
2020-04-18 19:33:53 +02:00
34755b32dc bump 2020-04-19 02:09:12 +09:00
6679ee1ca2 Merge pull request #1472 from Kukks/payjoin/p2shfixes
Fix Payjoin p2sh
2020-04-19 02:01:10 +09:00
8420c74b31 Improve static asset caching
Cache static assets for one year and set the correct cache control header. Adds the cache busting version based on file content to asset references to invalidate the cache on change. ([further details on the approach](https://andrewlock.net/adding-cache-control-headers-to-static-files-in-asp-net-core/) and [why one year](https://ashton.codes/set-cache-control-max-age-1-year/))

Most of the changes are the additions of the `asp-append-version="true"` attribute, the main configuration change is in `Startup.cs`.
2020-04-18 17:56:05 +02:00
0077105a2d remove hacks 2020-04-18 08:29:07 +02:00
51db617584 fixes 2020-04-18 08:09:49 +02:00
514b695907 fix coin addition for p2sh 2020-04-18 08:09:49 +02:00
b470ce2dad fix p2sh test error codes 2020-04-18 08:09:49 +02:00
161850150a fix p2sh detection input 2020-04-18 08:09:49 +02:00
b02cfa9d41 fix subtract fees auto tick when clicking on balance 2020-04-17 15:24:27 +02:00
dfe655393d Fix enable payjoin when p2sh 2020-04-16 17:23:29 +02:00
8c81dae167 bump 2020-04-16 22:44:53 +09:00
1919 changed files with 158749 additions and 100151 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

@ -2,15 +2,15 @@ version: 2
jobs:
fast_tests:
machine:
enabled: true
image: ubuntu-2004:202111-02
steps:
- checkout
- run:
command: |
cd .circleci && ./run-tests.sh "Fast=Fast"
cd .circleci && ./run-tests.sh "Fast=Fast|ThirdParty=ThirdParty" && ./can-build.sh
selenium_tests:
machine:
enabled: true
image: ubuntu-2004:202111-02
steps:
- checkout
- run:
@ -18,79 +18,77 @@ jobs:
cd .circleci && ./run-tests.sh "Selenium=Selenium"
integration_tests:
machine:
enabled: true
image: ubuntu-2004:202111-02
steps:
- checkout
- run:
command: |
cd .circleci && ./run-tests.sh "Integration=Integration"
external_tests:
trigger_docs_build:
machine:
enabled: true
image: ubuntu-2004:202111-02
steps:
- checkout
- run:
command: |
if [ "$CIRCLE_PROJECT_USERNAME" == "btcpayserver" ] && [ "$CIRCLE_PROJECT_REPONAME" == "btcpayserver" ]; then
cd .circleci && ./run-tests.sh "ExternalIntegration=ExternalIntegration"
else
echo "Skipping running ExternalIntegration tests outside of context of main user and repository that have access to secrets"
fi
curl -X POST -H "Authorization: token $GH_PAT" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/btcpayserver/btcpayserver-doc/dispatches --data '{"event_type": "build_docs"}'
# publish jobs require $DOCKERHUB_REPO, $DOCKERHUB_USER, $DOCKERHUB_PASS defined
amd64:
machine:
enabled: true
image: ubuntu-2004:202111-02
steps:
- checkout
- checkout
- run:
command: |
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
GIT_COMMIT=$(git rev-parse HEAD)
#
sudo docker build --pull -t $DOCKERHUB_REPO:$LATEST_TAG-amd64 -f amd64.Dockerfile .
sudo docker build --build-arg GIT_COMMIT=${GIT_COMMIT} --pull -t $DOCKERHUB_REPO:$LATEST_TAG-amd64 -f amd64.Dockerfile .
sudo docker build --build-arg GIT_COMMIT=${GIT_COMMIT} --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:
enabled: true
image: ubuntu-2004:202111-02
steps:
- checkout
- checkout
- run:
command: |
sudo docker run --rm --privileged multiarch/qemu-user-static:register --reset
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
GIT_COMMIT=$(git rev-parse HEAD)
#
sudo docker build --pull -t $DOCKERHUB_REPO:$LATEST_TAG-arm32v7 -f arm32v7.Dockerfile .
sudo docker build --build-arg GIT_COMMIT=${GIT_COMMIT} --pull -t $DOCKERHUB_REPO:$LATEST_TAG-arm32v7 -f arm32v7.Dockerfile .
sudo docker build --build-arg GIT_COMMIT=${GIT_COMMIT} --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:
enabled: true
image: ubuntu-2004:202111-02
steps:
- checkout
- checkout
- run:
command: |
sudo docker run --rm --privileged multiarch/qemu-user-static:register --reset
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
GIT_COMMIT=$(git rev-parse HEAD)
#
sudo docker build --pull -t $DOCKERHUB_REPO:$LATEST_TAG-arm64v8 -f arm64v8.Dockerfile .
sudo docker build --build-arg GIT_COMMIT=${GIT_COMMIT} --pull -t $DOCKERHUB_REPO:$LATEST_TAG-arm64v8 -f arm64v8.Dockerfile .
sudo docker build --build-arg GIT_COMMIT=${GIT_COMMIT} --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:
enabled: true
image: circleci/classic:201808-01
image: ubuntu-2004:202201-02
steps:
- run:
command: |
# Turn on Experimental features
sudo mkdir $HOME/.docker
sudo sh -c 'echo "{ \"experimental\": \"enabled\" }" >> $HOME/.docker/config.json'
#
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
#
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
@ -100,6 +98,12 @@ jobs:
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
build_and_test:
@ -107,34 +111,37 @@ workflows:
- fast_tests
- selenium_tests
- integration_tests
- external_tests:
filters:
branches:
only: master
publish:
jobs:
- trigger_docs_build:
filters:
branches:
ignore: /.*/
# only act on version tags
tags:
only: /(v[1-9]+(\.[0-9]+)*(-[a-z0-9-]+)?)|(v[a-z0-9-]+)/
- amd64:
filters:
# ignore any commit on any branch by default
branches:
ignore: /.*/
# only act on version tags v1.0.0.88
# 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]+)*)|(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]+)*)|(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]+)*)|(v[a-z]+)/
only: /(v[1-9]+(\.[0-9]+)*(-[a-z0-9-]+)?)|(v[a-z0-9-]+)/
- multiarch:
requires:
- amd64
@ -144,4 +151,4 @@ workflows:
branches:
ignore: /.*/
tags:
only: /(v[1-9]+(\.[0-9]+)*)|(v[a-z]+)/
only: /(v[1-9]+(\.[0-9]+)*(-[a-z0-9-]+)?)|(v[a-z0-9-]+)/

View File

@ -3,7 +3,16 @@ 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
# For some reason, docker-compose pull fails time to time, so we try several times
n=0
until [ "$n" -ge 10 ]
do
docker-compose -f "docker-compose.altcoins.yml" pull && break
n=$((n+1))
sleep 5
done
docker-compose -f "docker-compose.altcoins.yml" build
docker-compose -f "docker-compose.altcoins.yml" run -e "TEST_FILTERS=$1" tests

View File

@ -10,10 +10,15 @@ root = true
insert_final_newline = true
indent_style = space
indent_size = 4
charset = utf-8
space_before_self_closing = true
[project.json]
[*.json]
indent_size = 2
[swagger*.json]
indent_size = 4
# C# files
[*.cs]
# New line preferences
@ -66,7 +71,7 @@ dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
dotnet_naming_style.camel_case_underscore_style.required_prefix = _
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
# Code style defaults
dotnet_sort_system_directives_first = true
@ -120,8 +125,11 @@ csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false
csharp_style_prefer_null_check_over_type_check = true:warning
csharp_prefer_simple_using_statement = true:warning
# C++ Files
[*.{cpp,h,in}]
curly_bracket_next_line = true
indent_brace_style = Allman
@ -146,4 +154,4 @@ indent_size = 2
[*.sh]
end_of_line = lf
[*.{cmd, bat}]
end_of_line = crlf
end_of_line = crlf

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.

68
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@ -0,0 +1,68 @@
name: 🐛 Bug Report
description: File a bug report
title: "[Bug]: "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! Please provide as much information as you can. It helps us better understand the problem and fix it faster.
- type: textarea
id: version
attributes:
label: What is your BTCPay version?
description: You can see the version in the footer's bottom right corner
placeholder: I'm running BTCPay v1.X.X.X
validations:
required: true
- type: textarea
id: deployment
attributes:
label: How did you deploy BTCPay Server?
description: Docker, manual, third-party host? Read more on deployment methods [here](https://docs.btcpayserver.org/Deployment/)
placeholder: I'm running BTCPay Server on a...
validations:
required: true
- type: textarea
id: what-happened
attributes:
label: What happened?
description: A clear and concise description of what the bug is.
placeholder: Tell us what you see!
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: How did you encounter this bug?
description: Step by step describe how did you encounter the bug?
placeholder: 1. I clicked X 2. Then I clicked Y 3. See error
validations:
required: true
- type: textarea
id: logoutput
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. Logs can be found in Server Settings > Logs. Here's how you can [troubleshoot an issue](https://docs.btcpayserver.org/Troubleshooting/)
render: shell
- type: textarea
id: browser
attributes:
label: What browser do you use?
description: Provide your browser and it's version. If you replicated issues on multiple browsers, let us know which ones.
placeholder: For example Safari 15.00, Chrome 10.0, Tor, Edge, etc
validations:
required: false
- type: textarea
id: additonal
attributes:
label: Additional information
description: Feel free to provide additional information. Screenshots are always helpful.
- type: checkboxes
id: terms
attributes:
label: Are you sure this is a bug report?
description: By submitting this report, you agree that this is not a support or a feature request. For general questions please read our [documentation](https://docs.btcpayserver.org). You can ask questions in [discussions](https://github.com/btcpayserver/btcpayserver/discussions) and [on our community chat](https://chat.btcpayserver.org)
options:
- label: I confirm this is a bug report
required: true

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

@ -0,0 +1,11 @@
blank_issues_enabled: true
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.

15
.gitignore vendored
View File

@ -288,9 +288,14 @@ __pycache__/
*.xsd.cs
/BTCPayServer/Build/dockerfiles
# Bundling JS/CSS
BTCPayServer/wwwroot/bundles/*
!BTCPayServer/wwwroot/bundles/.gitignore
.vscode
.vscode/*
!.vscode/launch.json
!.vscode/tasks.json
!.vscode/extensions.json
BTCPayServer/testpwd
.DS_Store
Packed Plugins
Plugins/packed
BTCPayServer/wwwroot/swagger/v1/openapi.json
BTCPayServer/appsettings.dev.json

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\Plugins\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/net6.0/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": "\\bNow listening 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,43 @@
<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="HtmlSanitizer" Version="5.0.372" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.9" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.9" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.7" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BTCPayServer.Client\BTCPayServer.Client.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,18 @@
using Newtonsoft.Json;
namespace BTCPayServer.Abstractions
{
public class CamelCaseSerializerSettings
{
static CamelCaseSerializerSettings()
{
Settings = new JsonSerializerSettings()
{
ContractResolver = new Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver()
};
Serializer = JsonSerializer.Create(Settings);
}
public static readonly JsonSerializerSettings Settings;
public static readonly JsonSerializer Serializer;
}
}

View File

@ -0,0 +1,20 @@
using System.IO;
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; }
public string TempDir { get; set; }
public string ToDatadirFullPath(string path)
{
if (Path.IsPathRooted(path))
return path;
return Path.Combine(DataDir, path);
}
}
}

View File

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

View File

@ -0,0 +1,7 @@
namespace BTCPayServer.Abstractions.Constants;
public class WellKnownTempData
{
public const string SuccessMessage = nameof(SuccessMessage);
public const string ErrorMessage = nameof(ErrorMessage);
}

View File

@ -0,0 +1,111 @@
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
{
#pragma warning disable EF1001 // Internal EF Core API usage.
public CustomNpgsqlMigrationsSqlGenerator(MigrationsSqlGeneratorDependencies dependencies, Npgsql.EntityFrameworkCore.PostgreSQL.Infrastructure.Internal.INpgsqlSingletonOptions opts) : base(dependencies, opts)
#pragma warning restore EF1001 // Internal EF Core API usage.
{
}
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, ServerVersion.AutoDetect(_options.Value.ConnectionString), o =>
{
o.EnableRetryOnFailure(10);
if (!string.IsNullOrEmpty(_schemaPrefix))
{
o.MigrationsHistoryTable(_schemaPrefix);
}
});
break;
default:
throw new ArgumentOutOfRangeException();
}
}
}
}

View File

@ -0,0 +1,12 @@
using System.Threading.Tasks;
using BTCPayServer.Client;
using Microsoft.AspNetCore.Http;
namespace BTCPayServer.Abstractions.Contracts
{
public interface IBTCPayServerClientFactory
{
Task<BTCPayServerClient> Create(string userId, params string[] storeIds);
Task<BTCPayServerClient> Create(string userId, string[] storeIds, HttpContext httpRequest);
}
}

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,17 @@
#nullable enable
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
namespace BTCPayServer.Abstractions.Contracts;
public interface IFileService
{
Task<bool> IsAvailable();
Task<IStoredFile> AddFile(IFormFile file, string userId);
Task<IStoredFile> AddFile(Uri file, string userId);
Task<string?> GetFileUrl(Uri baseUri, string fileId);
Task<string?> GetTemporaryFileUrl(Uri baseUri, string fileId, DateTimeOffset expiry,
bool isDownload);
Task RemoveFile(string fileId, string userId);
}

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,7 @@
#nullable enable
namespace BTCPayServer.Abstractions.Contracts;
public interface IScopeProvider
{
string? GetCurrentStoreId();
}

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,12 @@
#nullable enable
using System.Collections.Generic;
using System.Threading.Tasks;
namespace BTCPayServer.Abstractions.Contracts;
public interface IStoreRepository
{
Task<T?> GetSettingAsync<T>(string storeId, string name) where T : class;
Task<Dictionary<string, T?>> GetSettingsAsync<T>(string name) where T : class;
Task UpdateSetting<T>(string storeId, string name, T obj) where T : class;
}

View File

@ -0,0 +1,12 @@
using System;
namespace BTCPayServer.Abstractions.Contracts;
public interface IStoredFile
{
string Id { get; set; }
string FileName { get; set; }
string StorageFileName { get; set; }
DateTime Timestamp { get; set; }
string ApplicationUserId { get; set; }
}

View File

@ -0,0 +1,9 @@
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Abstractions.Contracts;
public interface ISwaggerProvider
{
Task<JObject> Fetch();
}

View File

@ -0,0 +1,18 @@
using System.Collections.Generic;
namespace BTCPayServer.Abstractions.Contracts
{
public interface ISyncSummaryProvider
{
bool AllAvailable();
string Partial { get; }
IEnumerable<ISyncStatus> GetStatuses();
}
public interface ISyncStatus
{
public string CryptoCode { get; set; }
public bool Available { 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,13 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using NBitcoin;
namespace BTCPayServer.Payments.PayJoin;
public interface IUTXOLocker
{
Task<bool> TryLock(OutPoint outpoint);
Task<bool> TryUnlock(params OutPoint[] outPoints);
Task<bool> TryLockInputs(OutPoint[] outPoints);
Task<HashSet<OutPoint>> FindLocks(OutPoint[] outpoints);
}

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,19 @@
namespace BTCPayServer.Abstractions.Custodians.Client;
public class AssetQuoteResult
{
public string FromAsset { get; set; }
public string ToAsset { get; set; }
public decimal Bid { get; set; }
public decimal Ask { get; set; }
public AssetQuoteResult() { }
public AssetQuoteResult(string fromAsset, string toAsset, decimal bid, decimal ask)
{
FromAsset = fromAsset;
ToAsset = toAsset;
Bid = bid;
Ask = ask;
}
}

View File

@ -0,0 +1,8 @@
namespace BTCPayServer.Abstractions.Custodians;
public class AssetBalancesUnavailableException : CustodianApiException
{
public AssetBalancesUnavailableException(System.Exception e) : base(500, "asset-balances-unavailable", $"Cannot fetch the asset balances: {e.Message}", e)
{
}
}

View File

@ -0,0 +1,13 @@
using BTCPayServer.Client.Models;
namespace BTCPayServer.Abstractions.Custodians;
public class AssetQuoteUnavailableException : CustodianApiException
{
public AssetPairData AssetPair { get; }
public AssetQuoteUnavailableException(AssetPairData assetPair) : base(400, "asset-price-unavailable", "Cannot find a quote for pair " + assetPair)
{
this.AssetPair = assetPair;
}
}

View File

@ -0,0 +1,13 @@
using System;
namespace BTCPayServer.Abstractions.Custodians;
public class BadConfigException : CustodianApiException
{
public string[] BadConfigKeys { get; set; }
public BadConfigException(string[] badConfigKeys) : base(500, "bad-custodian-account-config", "Wrong config values: " + String.Join(", ", badConfigKeys))
{
this.BadConfigKeys = badConfigKeys;
}
}

View File

@ -0,0 +1,13 @@
namespace BTCPayServer.Abstractions.Custodians;
public class CannotWithdrawException : CustodianApiException
{
public CannotWithdrawException(ICustodian custodian, string paymentMethod, string message) : base(403, "cannot-withdraw", message)
{
}
public CannotWithdrawException(ICustodian custodian, string paymentMethod, string targetAddress, CustodianApiException originalException) : base(403, "cannot-withdraw", $"{custodian.Name} cannot withdraw {paymentMethod} to '{targetAddress}': {originalException.Message}")
{
}
}

View File

@ -0,0 +1,18 @@
using System;
namespace BTCPayServer.Abstractions.Custodians;
public class CustodianApiException : Exception
{
public int HttpStatus { get; }
public string Code { get; }
public CustodianApiException(int httpStatus, string code, string message, System.Exception ex) : base(message, ex)
{
HttpStatus = httpStatus;
Code = code;
}
public CustodianApiException(int httpStatus, string code, string message) : this(httpStatus, code, message, null)
{
}
}

View File

@ -0,0 +1,8 @@
namespace BTCPayServer.Abstractions.Custodians;
public class CustodianFeatureNotImplementedException : CustodianApiException
{
public CustodianFeatureNotImplementedException(string message) : base(400, "not-implemented", message)
{
}
}

View File

@ -0,0 +1,8 @@
namespace BTCPayServer.Abstractions.Custodians;
public class DepositsUnavailableException : CustodianApiException
{
public DepositsUnavailableException(string message) : base(404, "deposits-unavailable", message)
{
}
}

View File

@ -0,0 +1,8 @@
namespace BTCPayServer.Abstractions.Custodians;
public class InsufficientFundsException : CustodianApiException
{
public InsufficientFundsException(string message) : base(400, "insufficient-funds", message)
{
}
}

View File

@ -0,0 +1,9 @@
namespace BTCPayServer.Abstractions.Custodians;
public class InvalidWithdrawalTargetException : CustodianApiException
{
public InvalidWithdrawalTargetException(ICustodian custodian, string paymentMethod, string targetAddress, CustodianApiException originalException) : base(403, "invalid-withdrawal-target", $"{custodian.Name} cannot withdraw {paymentMethod} to '{targetAddress}': {originalException.Message}")
{
}
}

View File

@ -0,0 +1,9 @@
namespace BTCPayServer.Abstractions.Custodians;
public class PermissionDeniedCustodianApiException : CustodianApiException
{
public PermissionDeniedCustodianApiException(ICustodian custodian) : base(403, "custodian-api-permission-denied", $"{custodian.Name}'s API reported that you don't have permission.")
{
}
}

View File

@ -0,0 +1,11 @@
namespace BTCPayServer.Abstractions.Custodians;
public class TradeNotFoundException : CustodianApiException
{
private string tradeId { get; }
public TradeNotFoundException(string tradeId) : base(404, "trade-not-found", "Could not find trade ID " + tradeId)
{
this.tradeId = tradeId;
}
}

View File

@ -0,0 +1,11 @@
namespace BTCPayServer.Abstractions.Custodians;
public class WithdrawalNotFoundException : CustodianApiException
{
private string WithdrawalId { get; }
public WithdrawalNotFoundException(string withdrawalId) : base(404, "withdrawal-not-found", $"Could not find withdrawal ID {withdrawalId}.")
{
WithdrawalId = withdrawalId;
}
}

View File

@ -0,0 +1,9 @@
namespace BTCPayServer.Abstractions.Custodians;
public class WrongTradingPairException : CustodianApiException
{
public const int HttpCode = 404;
public WrongTradingPairException(string fromAsset, string toAsset) : base(HttpCode, "wrong-trading-pair", $"Cannot find a trading pair for converting {fromAsset} into {toAsset}.")
{
}
}

View File

@ -0,0 +1,29 @@
using System.Collections.Generic;
using BTCPayServer.Client.Models;
namespace BTCPayServer.Abstractions.Custodians.Client;
/**
* The result of a market trade. Used as a return type for custodians implementing ICanTrade
*/
public class MarketTradeResult
{
public string FromAsset { get; }
public string ToAsset { get; }
/**
* The ledger entries that show the balances that were affected by the trade.
*/
public List<LedgerEntryData> LedgerEntries { get; }
/**
* The unique ID of the trade that was executed.
*/
public string TradeId { get; }
public MarketTradeResult(string fromAsset, string toAsset, List<LedgerEntryData> ledgerEntries, string tradeId)
{
this.FromAsset = fromAsset;
this.ToAsset = toAsset;
this.LedgerEntries = ledgerEntries;
this.TradeId = tradeId;
}
}

View File

@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using BTCPayServer.Client.Models;
namespace BTCPayServer.Abstractions.Custodians.Client;
public class WithdrawResult
{
public string PaymentMethod { get; }
public string Asset { get; set; }
public List<LedgerEntryData> LedgerEntries { get; }
public string WithdrawalId { get; }
public WithdrawalResponseData.WithdrawalStatus Status { get; }
public DateTimeOffset CreatedTime { get; }
public string TargetAddress { get; }
public string TransactionId { get; }
public WithdrawResult(string paymentMethod, string asset, List<LedgerEntryData> ledgerEntries, string withdrawalId, WithdrawalResponseData.WithdrawalStatus status, DateTimeOffset createdTime, string targetAddress, string transactionId)
{
PaymentMethod = paymentMethod;
Asset = asset;
LedgerEntries = ledgerEntries;
WithdrawalId = withdrawalId;
CreatedTime = createdTime;
Status = status;
TargetAddress = targetAddress;
TransactionId = transactionId;
}
}

View File

@ -0,0 +1,17 @@
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Abstractions.Custodians;
public interface ICanDeposit
{
/**
* Get the address where we can deposit for the chosen payment method (crypto code + network).
* The result can be a string in different formats like a bitcoin address or even a LN invoice.
*/
public Task<DepositAddressData> GetDepositAddressAsync(string paymentMethod, JObject config, CancellationToken cancellationToken);
public string[] GetDepositablePaymentMethods();
}

View File

@ -0,0 +1,31 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Custodians.Client;
using BTCPayServer.Client.Models;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Abstractions.Custodians;
public interface ICanTrade
{
/**
* A list of tradable asset pairs, or NULL if the custodian cannot trade/convert assets. if thr asset pair contains fiat, fiat is always put last. If both assets are a cyrptocode or both are fiat, the pair is written alphabetically. Always in uppercase. Example: ["BTC/EUR","BTC/USD", "EUR/USD", "BTC/ETH",...]
*/
public List<AssetPairData> GetTradableAssetPairs();
/**
* Execute a market order right now.
*/
public Task<MarketTradeResult> TradeMarketAsync(string fromAsset, string toAsset, decimal qty, JObject config, CancellationToken cancellationToken);
/**
* Get the details about a previous market trade.
*/
public Task<MarketTradeResult> GetTradeInfoAsync(string tradeId, JObject config, CancellationToken cancellationToken);
public Task<AssetQuoteResult> GetQuoteForAssetAsync(string fromAsset, string toAsset, JObject config, CancellationToken cancellationToken);
}

View File

@ -0,0 +1,15 @@
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Abstractions.Custodians.Client;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Abstractions.Custodians;
public interface ICanWithdraw
{
public Task<WithdrawResult> WithdrawAsync(string paymentMethod, decimal amount, JObject config, CancellationToken cancellationToken);
public Task<WithdrawResult> GetWithdrawalInfoAsync(string paymentMethod, string withdrawalId, JObject config, CancellationToken cancellationToken);
public string[] GetWithdrawablePaymentMethods();
}

View File

@ -0,0 +1,26 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Abstractions.Custodians;
public interface ICustodian
{
/**
* Get the unique code that identifies this custodian.
*/
string Code { get; }
string Name { get; }
/**
* Get a list of assets and their qty in custody.
*/
Task<Dictionary<string, decimal>> GetAssetBalancesAsync(JObject config, CancellationToken cancellationToken);
public Task<Form.Form> GetConfigForm(JObject config, string locale,
CancellationToken cancellationToken = default);
}

View File

@ -0,0 +1,14 @@
#nullable enable
using System.Collections.Generic;
using System.Linq;
using BTCPayServer.Abstractions.Custodians;
namespace BTCPayServer.Abstractions.Extensions;
public static class CustodianExtensions
{
public static ICustodian? GetCustodianByCode(this IEnumerable<ICustodian> custodians, string code)
{
return custodians.FirstOrDefault(custodian => custodian.Code == code);
}
}

View File

@ -0,0 +1,43 @@
using System.Collections.Generic;
using BTCPayServer.Client.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ModelBinding;
namespace BTCPayServer.Abstractions.Extensions;
public static class GreenfieldExtensions
{
public static IActionResult CreateValidationError(this ControllerBase controller, ModelStateDictionary modelState)
{
return controller.UnprocessableEntity(modelState.ToGreenfieldValidationError());
}
public static List<GreenfieldValidationError> ToGreenfieldValidationError(this ModelStateDictionary modelState)
{
List<GreenfieldValidationError> errors = new List<GreenfieldValidationError>();
foreach (var error in modelState)
{
foreach (var errorMessage in error.Value.Errors)
{
errors.Add(new GreenfieldValidationError(error.Key, errorMessage.ErrorMessage));
}
}
return errors;
}
public static IActionResult CreateAPIError(this ControllerBase controller, string errorCode, string errorMessage)
{
return controller.BadRequest(new GreenfieldAPIError(errorCode, errorMessage));
}
public static IActionResult CreateAPIError(this ControllerBase controller, int httpCode, string errorCode, string errorMessage)
{
return controller.StatusCode(httpCode, new GreenfieldAPIError(errorCode, errorMessage));
}
public static IActionResult CreateAPIPermissionError(this ControllerBase controller, string missingPermission, string message = null)
{
return controller.StatusCode(403, new GreenfieldPermissionAPIError(missingPermission, message));
}
}

View File

@ -0,0 +1,120 @@
using System;
using Microsoft.AspNetCore.Http;
namespace BTCPayServer.Abstractions.Extensions;
public static class HttpRequestExtensions
{
public static bool IsOnion(this HttpRequest request)
{
if (request?.Host.Host == null)
return false;
return request.Host.Host.EndsWith(".onion", StringComparison.OrdinalIgnoreCase);
}
public static string GetAbsoluteRoot(this HttpRequest request)
{
return string.Concat(
request.Scheme,
"://",
request.Host.ToUriComponent(),
request.PathBase.ToUriComponent());
}
public static Uri GetAbsoluteRootUri(this HttpRequest request)
{
return new Uri(request.GetAbsoluteRoot());
}
public static string GetCurrentUrl(this HttpRequest request)
{
return string.Concat(
request.Scheme,
"://",
request.Host.ToUriComponent(),
request.PathBase.ToUriComponent(),
request.Path.ToUriComponent());
}
public static string GetCurrentPath(this HttpRequest request)
{
return string.Concat(
request.PathBase.ToUriComponent(),
request.Path.ToUriComponent());
}
public static string GetCurrentPathWithQueryString(this HttpRequest request)
{
return request.PathBase + request.Path + request.QueryString;
}
/// <summary>
/// If 'toto' and RootPath is 'rootpath' returns '/rootpath/toto'
/// If 'toto' and RootPath is empty returns '/toto'
/// </summary>
/// <param name="request"></param>
/// <param name="path"></param>
/// <returns></returns>
public static string GetRelativePath(this HttpRequest request, string path)
{
if (path.Length > 0 && path[0] != '/')
path = $"/{path}";
return string.Concat(
request.PathBase.ToUriComponent(),
path);
}
/// <summary>
/// If 'https://example.com/toto' returns 'https://example.com/toto'
/// If 'toto' and RootPath is 'rootpath' returns '/rootpath/toto'
/// If 'toto' and RootPath is empty returns '/toto'
/// </summary>
/// <param name="request"></param>
/// <param name="path"></param>
/// <returns></returns>
public static string GetRelativePathOrAbsolute(this HttpRequest request, string path)
{
if (!Uri.TryCreate(path, UriKind.RelativeOrAbsolute, out var uri) ||
uri.IsAbsoluteUri)
return path;
if (path.Length > 0 && path[0] != '/')
path = $"/{path}";
return string.Concat(
request.PathBase.ToUriComponent(),
path);
}
public static string GetAbsoluteUri(this HttpRequest request, string redirectUrl)
{
bool isRelative =
(redirectUrl.Length > 0 && redirectUrl[0] == '/')
|| !new Uri(redirectUrl, UriKind.RelativeOrAbsolute).IsAbsoluteUri;
return isRelative ? request.GetAbsoluteRoot() + redirectUrl : redirectUrl;
}
/// <summary>
/// Will return an absolute URL.
/// If `relativeOrAsbolute` is absolute, returns it.
/// If `relativeOrAsbolute` is relative, send absolute url based on the HOST of this request (without PathBase)
/// </summary>
/// <param name="request"></param>
/// <param name="relativeOrAbsolte"></param>
/// <returns></returns>
public static Uri GetAbsoluteUriNoPathBase(this HttpRequest request, Uri relativeOrAbsolute = null)
{
if (relativeOrAbsolute == null)
{
return new Uri(string.Concat(
request.Scheme,
"://",
request.Host.ToUriComponent()), UriKind.Absolute);
}
if (relativeOrAbsolute.IsAbsoluteUri)
return relativeOrAbsolute;
return new Uri(string.Concat(
request.Scheme,
"://",
request.Host.ToUriComponent()) + relativeOrAbsolute.ToString().WithStartingSlash(), UriKind.Absolute);
}
}

View File

@ -0,0 +1,59 @@
using System.Text.Json;
using BTCPayServer.Abstractions.Constants;
using BTCPayServer.Abstractions.Models;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Newtonsoft.Json.Linq;
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());
}
public static StatusMessageModel GetStatusMessageModel(this ITempDataDictionary tempData)
{
tempData.TryGetValue(WellKnownTempData.SuccessMessage, out var successMessage);
tempData.TryGetValue(WellKnownTempData.ErrorMessage, out var errorMessage);
tempData.TryGetValue("StatusMessageModel", out var model);
if (successMessage != null || errorMessage != null)
{
var parsedModel = new StatusMessageModel();
parsedModel.Message = (string)successMessage ?? (string)errorMessage;
if (successMessage != null)
{
parsedModel.Severity = StatusMessageModel.StatusSeverity.Success;
}
else
{
parsedModel.Severity = StatusMessageModel.StatusSeverity.Error;
}
return parsedModel;
}
else if (model != null && model is string str)
{
return JObject.Parse(str).ToObject<StatusMessageModel>();
}
return null;
}
public static bool HasStatusMessage(this ITempDataDictionary tempData)
{
return (tempData.Peek(WellKnownTempData.SuccessMessage) ??
tempData.Peek(WellKnownTempData.ErrorMessage) ??
tempData.Peek("StatusMessageModel")) != null;
}
public static bool HasErrorMessage(this ITempDataDictionary tempData)
{
return GetStatusMessageModel(tempData)?.Severity == StatusMessageModel.StatusSeverity.Error;
}
}

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,43 @@
using System;
using System.IO;
using System.Linq;
namespace BTCPayServer.Abstractions.Extensions;
public static class StringExtensions
{
public static bool IsValidFileName(this string fileName)
{
return !fileName.ToCharArray().Any(c => Path.GetInvalidFileNameChars().Contains(c)
|| c == Path.AltDirectorySeparatorChar
|| c == Path.DirectorySeparatorChar
|| c == Path.PathSeparator
|| c == '\\');
}
public static string Truncate(this string value, int maxLength)
{
if (string.IsNullOrEmpty(value))
return value;
return value.Length <= maxLength ? value : value.Substring(0, maxLength);
}
public static string WithTrailingSlash(this string str)
{
if (str.EndsWith("/", StringComparison.InvariantCulture))
return str;
return str + "/";
}
public static string WithStartingSlash(this string str)
{
if (str.StartsWith("/", StringComparison.InvariantCulture))
return str;
return $"/{str}";
}
public static string WithoutEndingSlash(this string str)
{
if (str.EndsWith("/", StringComparison.InvariantCulture))
return str.Substring(0, str.Length - 1);
return str;
}
}

View File

@ -0,0 +1,139 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using Microsoft.AspNetCore.Html;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
namespace BTCPayServer.Abstractions.Extensions
{
public static class ViewsRazor
{
private const string ACTIVE_CATEGORY_KEY = "ActiveCategory";
private const string ACTIVE_PAGE_KEY = "ActivePage";
private const string ACTIVE_ID_KEY = "ActiveId";
private const string ActivePageClass = "active";
public enum DateDisplayFormat
{
Localized,
Relative
}
public static void SetActivePage<T>(this ViewDataDictionary viewData, T activePage, string title = null, string activeId = null)
where T : IConvertible
{
SetActivePage(viewData, activePage.ToString(), activePage.GetType().ToString(), title, activeId);
}
public static void SetActivePage(this ViewDataDictionary viewData, string activePage, string category, string title = null, string activeId = null)
{
// Page Title
viewData["Title"] = title ?? activePage;
// Navigation
viewData[ACTIVE_PAGE_KEY] = activePage;
viewData[ACTIVE_ID_KEY] = activeId;
SetActiveCategory(viewData, category);
}
public static void SetActiveCategory<T>(this ViewDataDictionary viewData, T activeCategory)
{
SetActiveCategory(viewData, activeCategory.ToString());
}
public static void SetActiveCategory(this ViewDataDictionary viewData, string activeCategory)
{
viewData[ACTIVE_CATEGORY_KEY] = activeCategory;
}
public static string IsActiveCategory<T>(this ViewDataDictionary viewData, T category, object id = null)
{
return IsActiveCategory(viewData, category.ToString(), id);
}
public static string IsActiveCategory(this ViewDataDictionary viewData, string category, object id = null)
{
if (!viewData.ContainsKey(ACTIVE_CATEGORY_KEY))
{
return null;
}
var activeId = viewData[ACTIVE_ID_KEY];
var activeCategory = viewData[ACTIVE_CATEGORY_KEY]?.ToString();
var categoryMatch = category.Equals(activeCategory, StringComparison.InvariantCultureIgnoreCase);
var idMatch = id == null || activeId == null || id.Equals(activeId);
return categoryMatch && idMatch ? ActivePageClass : null;
}
public static string IsActivePage<T>(this ViewDataDictionary viewData, T page, object id = null)
where T : IConvertible
{
return IsActivePage(viewData, page.ToString(), page.GetType().ToString(), id);
}
public static string IsActivePage<T>(this ViewDataDictionary viewData, IEnumerable<T> pages, object id = null)
where T : IConvertible
{
return pages.Any(page => IsActivePage(viewData, page.ToString(), page.GetType().ToString(), id) == ActivePageClass)
? ActivePageClass
: null;
}
public static string IsActivePage(this ViewDataDictionary viewData, string page, string category, object id = null)
{
if (!viewData.ContainsKey(ACTIVE_PAGE_KEY))
{
return null;
}
var activeId = viewData[ACTIVE_ID_KEY];
var activePage = viewData[ACTIVE_PAGE_KEY]?.ToString();
var activeCategory = viewData[ACTIVE_CATEGORY_KEY]?.ToString();
var categoryAndPageMatch = (category == null || activeCategory.Equals(category, StringComparison.InvariantCultureIgnoreCase)) && page.Equals(activePage, StringComparison.InvariantCultureIgnoreCase);
var idMatch = id == null || activeId == null || id.Equals(activeId);
return categoryAndPageMatch && idMatch ? ActivePageClass : null;
}
public static HtmlString ToBrowserDate(this DateTimeOffset date, DateDisplayFormat format = DateDisplayFormat.Localized)
{
var relative = date.ToTimeAgo();
var initial = format.ToString().ToLower();
var dateTime = date.ToString("o", CultureInfo.InvariantCulture);
var displayDate = format == DateDisplayFormat.Relative ? relative : date.ToString("g", CultureInfo.InvariantCulture);
return new HtmlString($"<time datetime=\"{dateTime}\" data-relative=\"{relative}\" data-initial=\"{initial}\">{displayDate}</time>");
}
public static HtmlString ToBrowserDate(this DateTime date, DateDisplayFormat format = DateDisplayFormat.Localized)
{
var relative = date.ToTimeAgo();
var initial = format.ToString().ToLower();
var dateTime = date.ToString("o", CultureInfo.InvariantCulture);
var displayDate = format == DateDisplayFormat.Relative ? relative : date.ToString("g", CultureInfo.InvariantCulture);
return new HtmlString($"<time datetime=\"{dateTime}\" data-relative=\"{relative}\" data-initial=\"{initial}\">{displayDate}</time>");
}
public static string ToTimeAgo(this DateTimeOffset date) => (DateTimeOffset.UtcNow - date).ToTimeAgo();
public static string ToTimeAgo(this DateTime date) => (DateTimeOffset.UtcNow - date).ToTimeAgo();
public static string ToTimeAgo(this TimeSpan diff) => diff.TotalSeconds > 0 ? $"{diff.TimeString()} ago" : $"in {diff.Negate().TimeString()}";
public static string TimeString(this TimeSpan timeSpan)
{
if (timeSpan.TotalMinutes < 1)
{
return $"{(int)timeSpan.TotalSeconds} second{Plural((int)timeSpan.TotalSeconds)}";
}
if (timeSpan.TotalHours < 1)
{
return $"{(int)timeSpan.TotalMinutes} minute{Plural((int)timeSpan.TotalMinutes)}";
}
return timeSpan.Days < 1
? $"{(int)timeSpan.TotalHours} hour{Plural((int)timeSpan.TotalHours)}"
: $"{(int)timeSpan.TotalDays} day{Plural((int)timeSpan.TotalDays)}";
}
private static string Plural(int value)
{
return value == 1 ? string.Empty : "s";
}
}
}

View File

@ -0,0 +1,37 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace BTCPayServer.Abstractions.Form;
public class AlertMessage
{
// Corresponds to the Bootstrap CSS "alert alert-xxx" messages:
// Success = green
// Warning = orange
// Danger = red
// Info = blue
public enum AlertMessageType
{
Success,
Warning,
Danger,
Info
}
[JsonConverter(typeof(StringEnumConverter))]
public AlertMessageType Type;
// The translated message to be shown to the user
public string Message;
public AlertMessage()
{
}
public AlertMessage(AlertMessageType type, string message)
{
this.Type = type;
this.Message = message;
}
}

View File

@ -0,0 +1,64 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Abstractions.Form;
public class Field
{
public static Field Create(string label, string name, string value, bool required, string helpText, string type = "text")
{
return new Field()
{
Label = label,
Name = name,
Value = value,
OriginalValue = value,
Required = required,
HelpText = helpText,
Type = type
};
}
// The name of the HTML5 node. Should be used as the key for the posted data.
public string Name;
public bool Hidden;
// HTML5 compatible type string like "text", "textarea", "email", "password", etc. Each type is a class and may contain more fields (i.e. "select" would have options).
public string Type;
public static Field CreateFieldset()
{
return new Field() { Type = "fieldset" };
}
// The value field is what is currently in the DB or what the user entered, but possibly not saved yet due to validation errors.
// If this is the first the user sees the form, then value and original value are the same. Value changes as the user starts interacting with the form.
public string Value;
public bool Required;
// The translated label of the field.
public string Label;
// The original value is the value that is currently saved in the backend. A "reset" button can be used to revert back to this. Should only be set from the constructor.
public string OriginalValue;
// A useful note shown below the field or via a tooltip / info icon. Should be translated for the user.
public string HelpText;
[JsonExtensionData] public IDictionary<string, JToken> AdditionalData { get; set; }
public List<Field> Fields { get; set; } = new();
// The field is considered "valid" if there are no validation errors
public List<string> ValidationErrors = new List<string>();
public virtual bool IsValid()
{
return ValidationErrors.Count == 0 && Fields.All(field => field.IsValid());
}
}

View File

@ -0,0 +1,157 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Newtonsoft.Json.Linq;
namespace BTCPayServer.Abstractions.Form;
public class Form
{
#nullable enable
public static Form Parse(string str)
{
ArgumentNullException.ThrowIfNull(str);
return JObject.Parse(str).ToObject<Form>(CamelCaseSerializerSettings.Serializer) ?? throw new InvalidOperationException("Impossible to deserialize Form");
}
public override string ToString()
{
return JObject.FromObject(this, CamelCaseSerializerSettings.Serializer).ToString(Newtonsoft.Json.Formatting.Indented);
}
#nullable restore
// Messages to be shown at the top of the form indicating user feedback like "Saved successfully" or "Please change X because of Y." or a warning, etc...
public List<AlertMessage> TopMessages { get; set; } = new();
// Groups of fields in the form
public List<Field> Fields { get; set; } = new();
// Are all the fields valid in the form?
public bool IsValid()
{
return Fields.Select(f => f.IsValid()).All(o => o);
}
public Field GetFieldByName(string name)
{
return GetFieldByName(name, Fields, null);
}
private static Field GetFieldByName(string name, List<Field> fields, string prefix)
{
prefix ??= string.Empty;
foreach (var field in fields)
{
var currentPrefix = prefix;
if (!string.IsNullOrEmpty(field.Name))
{
currentPrefix = $"{prefix}{field.Name}";
if (currentPrefix.Equals(name, StringComparison.InvariantCultureIgnoreCase))
{
return field;
}
currentPrefix += "_";
}
var subFieldResult = GetFieldByName(name, field.Fields, currentPrefix);
if (subFieldResult is not null)
{
return subFieldResult;
}
}
return null;
}
public List<string> GetAllNames()
{
return GetAllNames(Fields);
}
private static List<string> GetAllNames(List<Field> fields)
{
var names = new List<string>();
foreach (var field in fields)
{
string prefix = string.Empty;
if (!string.IsNullOrEmpty(field.Name))
{
names.Add(field.Name);
prefix = $"{field.Name}_";
}
if (field.Fields.Any())
{
names.AddRange(GetAllNames(field.Fields).Select(s => $"{prefix}{s}"));
}
}
return names;
}
public void ApplyValuesFromOtherForm(Form form)
{
foreach (var fieldset in Fields)
{
foreach (var field in fieldset.Fields)
{
field.Value = form
.GetFieldByName(
$"{(string.IsNullOrEmpty(fieldset.Name) ? string.Empty : fieldset.Name + "_")}{field.Name}")
?.Value;
}
}
}
public void ApplyValuesFromForm(IFormCollection form)
{
var names = GetAllNames();
foreach (var name in names)
{
var field = GetFieldByName(name);
if (field is null || !form.TryGetValue(name, out var val))
{
continue;
}
field.Value = val;
}
}
public Dictionary<string, object> GetValues()
{
return GetValues(Fields);
}
private static Dictionary<string, object> GetValues(List<Field> fields)
{
var result = new Dictionary<string, object>();
foreach (Field field in fields)
{
var name = field.Name ?? string.Empty;
if (field.Fields.Any())
{
var values = GetValues(fields);
values.Remove(string.Empty, out var keylessValue);
result.TryAdd(name, values);
if (keylessValue is not Dictionary<string, object> dict)
continue;
foreach (KeyValuePair<string, object> keyValuePair in dict)
{
result.TryAdd(keyValuePair.Key, keyValuePair.Value);
}
}
else
{
result.TryAdd(name, field.Value);
}
}
return result;
}
}

View File

@ -0,0 +1,69 @@
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 virtual string Identifier
{
get
{
return GetType().GetTypeInfo().Assembly.GetName().Name;
}
}
public virtual string Name
{
get
{
return GetType().GetTypeInfo().Assembly
.GetCustomAttribute<AssemblyProductAttribute>()?
.Product ?? "???";
}
}
public virtual Version Version
{
get
{
return GetVersion(GetType().GetTypeInfo().Assembly
.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?
.InformationalVersion) ??
Assembly.GetAssembly(GetType())?.GetName()?.Version ??
new Version(1, 0, 0, 0);
}
}
private static Version GetVersion(string informationalVersion)
{
if (informationalVersion is null)
return null;
Version.TryParse(informationalVersion, out var r);
return r;
}
public virtual string Description
{
get
{
return GetType().GetTypeInfo().Assembly
.GetCustomAttribute<AssemblyDescriptionAttribute>()?
.Description ?? string.Empty;
}
}
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,34 @@
using System;
namespace BTCPayServer.Abstractions.Models
{
public class ConfirmModel
{
private const string ButtonClassDefault = "btn-danger";
public ConfirmModel() { }
public ConfirmModel(string title, string desc, string action = null, string buttonClass = ButtonClassDefault, string actionName = null, string controllerName = null)
{
Title = title;
Description = desc;
Action = action;
ActionName = actionName;
ControllerName = controllerName;
ButtonClass = buttonClass;
if (Description.Contains("<strong>", StringComparison.InvariantCultureIgnoreCase))
{
DescriptionHtml = true;
}
}
public string Title { get; set; }
public string Description { get; set; }
public bool DescriptionHtml { get; set; }
public string Action { get; set; }
public string ActionName { get; set; }
public string ControllerName { get; set; }
public string ButtonClass { get; set; } = ButtonClassDefault;
}
}

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,27 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
namespace BTCPayServer.Security;
public class AuthorizationFilterHandle
{
public AuthorizationHandlerContext Context { get; }
public PolicyRequirement Requirement { get; }
public HttpContext HttpContext { get; }
public bool Success { get; private set; }
public AuthorizationFilterHandle(
AuthorizationHandlerContext context,
PolicyRequirement requirement,
HttpContext httpContext)
{
Context = context;
Requirement = requirement;
HttpContext = httpContext;
}
public void MarkSuccessful()
{
Success = true;
}
}

View File

@ -1,8 +1,8 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NBitcoin.Crypto;
namespace BTCPayServer.Security
{
@ -10,6 +10,8 @@ namespace BTCPayServer.Security
{
public ConsentSecurityPolicy(string name, string value)
{
if (value.Contains(';', StringComparison.OrdinalIgnoreCase))
throw new FormatException();
_Value = value;
_Name = name;
}
@ -66,11 +68,49 @@ namespace BTCPayServer.Security
{
}
HashSet<ConsentSecurityPolicy> _Policies = new HashSet<ConsentSecurityPolicy>();
readonly HashSet<ConsentSecurityPolicy> _Policies = new HashSet<ConsentSecurityPolicy>();
/// <summary>
/// Allow a specific script as event handler
/// </summary>
/// <param name="script"></param>
public void AllowUnsafeHashes(string script = null)
{
if (!allowUnsafeHashes)
{
Add("script-src", $"'unsafe-hashes'");
allowUnsafeHashes = true;
}
if (script != null)
{
var sha = GetSha256(script);
Add("script-src", $"'sha256-{sha}'");
}
}
bool allowUnsafeHashes = false;
/// <summary>
/// Allow the injection of script tag with the following script
/// </summary>
/// <param name="script"></param>
public void AllowInline(string script)
{
ArgumentNullException.ThrowIfNull(script);
var sha = GetSha256(script);
Add("script-src", $"'sha256-{sha}'");
}
static string GetSha256(string script)
{
return Convert.ToBase64String(Hashes.SHA256(Encoding.UTF8.GetBytes(script.Replace("\r\n", "\n", StringComparison.Ordinal))));
}
public void Add(string name, string value)
{
Add(new ConsentSecurityPolicy(name, value));
}
public void Add(ConsentSecurityPolicy policy)
{
if (_Policies.Any(p => p.Name == policy.Name && p.Value == policy.Name))
return;
_Policies.Add(policy);
}
@ -81,40 +121,25 @@ namespace BTCPayServer.Security
{
StringBuilder value = new StringBuilder();
bool firstGroup = true;
foreach(var group in Rules.GroupBy(r => r.Name))
foreach (var group in Rules.GroupBy(r => r.Name))
{
if (!firstGroup)
{
value.Append(';');
}
List<string> values = new List<string>();
HashSet<string> values = new HashSet<string>();
List<string> valuesList = new List<string>();
values.Add(group.Key);
valuesList.Add(group.Key);
foreach (var v in group)
{
values.Add(v.Value);
if (values.Add(v.Value))
valuesList.Add(v.Value);
}
foreach(var i in authorized)
{
values.Add(i);
}
value.Append(String.Join(" ", values.OfType<object>().ToArray()));
value.Append(String.Join(" ", valuesList.OfType<object>().ToArray()));
firstGroup = false;
}
return value.ToString();
}
internal void Clear()
{
authorized.Clear();
_Policies.Clear();
}
HashSet<string> authorized = new HashSet<string>();
internal void AddAllAuthorized(string v)
{
authorized.Add(v);
}
public IEnumerable<string> Authorized => authorized;
}
}

View File

@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System;
using Microsoft.AspNetCore.Authorization;
namespace BTCPayServer.Security
@ -10,8 +7,7 @@ namespace BTCPayServer.Security
{
public PolicyRequirement(string policy)
{
if (policy == null)
throw new ArgumentNullException(nameof(policy));
ArgumentNullException.ThrowIfNull(policy);
Policy = policy;
}
public string Policy { get; }

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

@ -1,12 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Ganss.XSS;
using Microsoft.AspNetCore.Html;
using Microsoft.AspNetCore.Mvc.Rendering;
namespace BTCPayServer.Services
namespace BTCPayServer.Abstractions.Services
{
public class Safe
{

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; }
}
}

View File

@ -0,0 +1,30 @@
using System;
using BTCPayServer.Security;
using Microsoft.AspNetCore.Razor.TagHelpers;
namespace BTCPayServer.Abstractions.TagHelpers;
/// <summary>
/// Add sha256- to allow inline event handlers in a:href=javascript:
/// </summary>
[HtmlTargetElement("a", Attributes = "csp-allow")]
public class CSPA : TagHelper
{
private readonly ContentSecurityPolicies _csp;
public CSPA(ContentSecurityPolicies csp)
{
_csp = csp;
}
public override void Process(TagHelperContext context, TagHelperOutput output)
{
output.Attributes.RemoveAll("csp-allow");
if (output.Attributes.TryGetAttribute("href", out var attr))
{
var v = attr.Value.ToString();
if (v.StartsWith("javascript:", StringComparison.OrdinalIgnoreCase))
{
_csp.AllowUnsafeHashes(v);
}
}
}
}

View File

@ -0,0 +1,37 @@
using System.Collections.Generic;
using System.Linq;
using BTCPayServer.Security;
using Microsoft.AspNetCore.Razor.TagHelpers;
namespace BTCPayServer.Abstractions.TagHelpers;
/// <summary>
/// Add 'unsafe-hashes' and sha256- to allow inline event handlers in CSP
/// </summary>
[HtmlTargetElement(Attributes = "onclick")]
[HtmlTargetElement(Attributes = "onkeypress")]
[HtmlTargetElement(Attributes = "onchange")]
[HtmlTargetElement(Attributes = "onsubmit")]
public class CSPEventTagHelper : TagHelper
{
public const string EventNames = "onclick,onkeypress,onchange,onsubmit";
private readonly ContentSecurityPolicies _csp;
readonly static HashSet<string> EventSet = EventNames.Split(',')
.ToHashSet();
public CSPEventTagHelper(ContentSecurityPolicies csp)
{
_csp = csp;
}
public override void Process(TagHelperContext context, TagHelperOutput output)
{
foreach (var attr in output.Attributes)
{
var n = attr.Name.ToLowerInvariant();
if (EventSet.Contains(n))
{
_csp.AllowUnsafeHashes(attr.Value.ToString());
}
}
}
}

View File

@ -0,0 +1,33 @@
using BTCPayServer.Security;
using Microsoft.AspNetCore.Razor.TagHelpers;
using NBitcoin;
namespace BTCPayServer.Abstractions.TagHelpers;
/// <summary>
/// Add a nonce-* so the inline-script can pass CSP rule when they are rendered server-side
/// </summary>
[HtmlTargetElement("script")]
public class CSPInlineScriptTagHelper : TagHelper
{
private readonly ContentSecurityPolicies _csp;
public CSPInlineScriptTagHelper(ContentSecurityPolicies csp)
{
_csp = csp;
}
public override void Process(TagHelperContext context, TagHelperOutput output)
{
if (output.Attributes.ContainsName("src"))
return;
if (output.Attributes.TryGetAttribute("type", out var attr))
{
if (attr.Value?.ToString() != "text/javascript")
return;
}
var nonce = RandomUtils.GetUInt256().ToString().Substring(0, 32);
output.Attributes.Add(new TagHelperAttribute("nonce", nonce));
_csp.Add("script-src", $"'nonce-{nonce}'");
}
}

View File

@ -0,0 +1,25 @@
using System.Threading.Tasks;
using BTCPayServer.Security;
using Microsoft.AspNetCore.Razor.TagHelpers;
namespace BTCPayServer.Abstractions.TagHelpers;
/// <summary>
/// Add sha256- to allow inline event handlers in CSP
/// </summary>
[HtmlTargetElement("template", Attributes = "csp-allow")]
public class CSPTemplate : TagHelper
{
private readonly ContentSecurityPolicies _csp;
public CSPTemplate(ContentSecurityPolicies csp)
{
_csp = csp;
}
public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
{
output.Attributes.RemoveAll("csp-allow");
var childContent = await output.GetChildContentAsync();
var content = childContent.GetContent();
_csp.AllowInline(content);
}
}

View File

@ -0,0 +1,48 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.Extensions.Logging;
namespace BTCPayServer.Abstractions.TagHelpers;
[HtmlTargetElement(Attributes = nameof(Permission))]
public class PermissionTagHelper : TagHelper
{
private readonly IAuthorizationService _authorizationService;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly ILogger<PermissionTagHelper> _logger;
public PermissionTagHelper(IAuthorizationService authorizationService, IHttpContextAccessor httpContextAccessor, ILogger<PermissionTagHelper> logger)
{
_authorizationService = authorizationService;
_httpContextAccessor = httpContextAccessor;
_logger = logger;
}
public string Permission { get; set; }
public string PermissionResource { get; set; }
public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
{
if (string.IsNullOrEmpty(Permission))
return;
if (_httpContextAccessor.HttpContext is null)
return;
var key = $"{Permission}_{PermissionResource}";
if (!_httpContextAccessor.HttpContext.Items.TryGetValue(key, out var o) ||
o is not AuthorizationResult res)
{
res = await _authorizationService.AuthorizeAsync(_httpContextAccessor.HttpContext.User,
PermissionResource,
Permission);
_httpContextAccessor.HttpContext.Items.Add(key, res);
}
if (!res.Succeeded)
{
output.SuppressOutput();
}
}
}

View File

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Text.Encodings.Web;
using Microsoft.AspNetCore.Html;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Razor.TagHelpers;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.Routing;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
namespace BTCPayServer.Abstractions.TagHelpers;
// Make sure that <svg><use href=/ are correctly working if rootpath is present
[HtmlTargetElement("use", Attributes = "href")]
public class SVGUse : UrlResolutionTagHelper2
{
private readonly IFileVersionProvider _fileVersionProvider;
public SVGUse(IUrlHelperFactory urlHelperFactory, HtmlEncoder htmlEncoder, IFileVersionProvider fileVersionProvider) : base(urlHelperFactory, htmlEncoder)
{
_fileVersionProvider = fileVersionProvider;
}
public override void Process(TagHelperContext context, TagHelperOutput output)
{
var attr = output.Attributes["href"].Value.ToString();
attr = _fileVersionProvider.AddFileVersionToPath(ViewContext.HttpContext.Request.PathBase, attr);
output.Attributes.SetAttribute("href", attr);
base.Process(context, output);
}
}

View File

@ -0,0 +1,31 @@
using BTCPayServer.Abstractions.Services;
using BTCPayServer.Security;
using Microsoft.AspNetCore.Razor.TagHelpers;
using NBitcoin;
namespace BTCPayServer.Abstractions.TagHelpers;
[HtmlTargetElement("srv-model")]
public class SrvModel : TagHelper
{
private readonly Safe _safe;
private readonly ContentSecurityPolicies _csp;
public SrvModel(Safe safe, ContentSecurityPolicies csp)
{
_safe = safe;
_csp = csp;
}
public string VarName { get; set; } = "srvModel";
public object Model { get; set; }
public override void Process(TagHelperContext context, TagHelperOutput output)
{
output.TagName = "script";
output.TagMode = TagMode.StartTagAndEndTag;
output.Attributes.Add(new TagHelperAttribute("type", "text/javascript"));
var nonce = RandomUtils.GetUInt256().ToString().Substring(0, 32);
output.Attributes.Add(new TagHelperAttribute("nonce", nonce));
_csp.Add("script-src", $"'nonce-{nonce}'");
output.Content.SetHtmlContent($"var {VarName} = {_safe.Json(Model)};");
}
}

View File

@ -0,0 +1,314 @@
#nullable enable
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Text.Encodings.Web;
using Microsoft.AspNetCore.Html;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Razor.TagHelpers;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.Routing;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
namespace BTCPayServer.Abstractions.TagHelpers
{
// A copy of https://github.com/dotnet/aspnetcore/blob/39f0e0b8f40b4754418f81aef0de58a9204a1fe5/src/Mvc/Mvc.Razor/src/TagHelpers/UrlResolutionTagHelper.cs
// slightly modified to also work on use tag.
public class UrlResolutionTagHelper2 : TagHelper
{
// Valid whitespace characters defined by the HTML5 spec.
private static readonly char[] ValidAttributeWhitespaceChars =
new[] { '\t', '\n', '\u000C', '\r', ' ' };
private static readonly Dictionary<string, string[]> ElementAttributeLookups =
new(StringComparer.OrdinalIgnoreCase)
{
{ "use", new[] { "href" } },
{ "a", new[] { "href" } },
{ "applet", new[] { "archive" } },
{ "area", new[] { "href" } },
{ "audio", new[] { "src" } },
{ "base", new[] { "href" } },
{ "blockquote", new[] { "cite" } },
{ "button", new[] { "formaction" } },
{ "del", new[] { "cite" } },
{ "embed", new[] { "src" } },
{ "form", new[] { "action" } },
{ "html", new[] { "manifest" } },
{ "iframe", new[] { "src" } },
{ "img", new[] { "src", "srcset" } },
{ "input", new[] { "src", "formaction" } },
{ "ins", new[] { "cite" } },
{ "link", new[] { "href" } },
{ "menuitem", new[] { "icon" } },
{ "object", new[] { "archive", "data" } },
{ "q", new[] { "cite" } },
{ "script", new[] { "src" } },
{ "source", new[] { "src", "srcset" } },
{ "track", new[] { "src" } },
{ "video", new[] { "poster", "src" } },
};
/// <summary>
/// Creates a new <see cref="UrlResolutionTagHelper"/>.
/// </summary>
/// <param name="urlHelperFactory">The <see cref="IUrlHelperFactory"/>.</param>
/// <param name="htmlEncoder">The <see cref="HtmlEncoder"/>.</param>
public UrlResolutionTagHelper2(IUrlHelperFactory urlHelperFactory, HtmlEncoder htmlEncoder)
{
UrlHelperFactory = urlHelperFactory;
HtmlEncoder = htmlEncoder;
}
/// <inheritdoc />
public override int Order => -1000 - 999;
/// <summary>
/// The <see cref="IUrlHelperFactory"/>.
/// </summary>
protected IUrlHelperFactory UrlHelperFactory { get; }
/// <summary>
/// The <see cref="HtmlEncoder"/>.
/// </summary>
protected HtmlEncoder HtmlEncoder { get; }
/// <summary>
/// The <see cref="ViewContext"/>.
/// </summary>
[HtmlAttributeNotBound]
[ViewContext]
public ViewContext ViewContext { get; set; } = default!;
/// <inheritdoc />
public override void Process(TagHelperContext context, TagHelperOutput output)
{
ArgumentNullException.ThrowIfNull(context);
ArgumentNullException.ThrowIfNull(output);
if (output.TagName == null)
{
return;
}
if (ElementAttributeLookups.TryGetValue(output.TagName, out var attributeNames))
{
for (var i = 0; i < attributeNames.Length; i++)
{
ProcessUrlAttribute(attributeNames[i], output);
}
}
// itemid can be present on any HTML element.
ProcessUrlAttribute("itemid", output);
}
/// <summary>
/// Resolves and updates URL values starting with '~/' (relative to the application's 'webroot' setting) for
/// <paramref name="output"/>'s <see cref="TagHelperOutput.Attributes"/> whose
/// <see cref="TagHelperAttribute.Name"/> is <paramref name="attributeName"/>.
/// </summary>
/// <param name="attributeName">The attribute name used to lookup values to resolve.</param>
/// <param name="output">The <see cref="TagHelperOutput"/>.</param>
protected void ProcessUrlAttribute(string attributeName, TagHelperOutput output)
{
ArgumentNullException.ThrowIfNull(attributeName);
ArgumentNullException.ThrowIfNull(output);
var attributes = output.Attributes;
// Read interface .Count once rather than per iteration
var attributesCount = attributes.Count;
for (var i = 0; i < attributesCount; i++)
{
var attribute = attributes[i];
if (!string.Equals(attribute.Name, attributeName, StringComparison.OrdinalIgnoreCase))
{
continue;
}
if (attribute.Value is string stringValue)
{
if (TryResolveUrl(stringValue, resolvedUrl: out string? resolvedUrl))
{
attributes[i] = new TagHelperAttribute(
attribute.Name,
resolvedUrl,
attribute.ValueStyle);
}
}
else
{
if (attribute.Value is IHtmlContent htmlContent)
{
var htmlString = htmlContent as HtmlString;
if (htmlString != null)
{
// No need for a StringWriter in this case.
stringValue = htmlString.ToString();
}
else
{
using var writer = new StringWriter();
htmlContent.WriteTo(writer, HtmlEncoder);
stringValue = writer.ToString();
}
if (TryResolveUrl(stringValue, resolvedUrl: out IHtmlContent? resolvedUrl))
{
attributes[i] = new TagHelperAttribute(
attribute.Name,
resolvedUrl,
attribute.ValueStyle);
}
else if (htmlString == null)
{
// Not a ~/ URL. Just avoid re-encoding the attribute value later.
attributes[i] = new TagHelperAttribute(
attribute.Name,
new HtmlString(stringValue),
attribute.ValueStyle);
}
}
}
}
}
/// <summary>
/// Tries to resolve the given <paramref name="url"/> value relative to the application's 'webroot' setting.
/// </summary>
/// <param name="url">The URL to resolve.</param>
/// <param name="resolvedUrl">Absolute URL beginning with the application's virtual root. <c>null</c> if
/// <paramref name="url"/> could not be resolved.</param>
/// <returns><c>true</c> if the <paramref name="url"/> could be resolved; <c>false</c> otherwise.</returns>
protected bool TryResolveUrl(string url, out string? resolvedUrl)
{
resolvedUrl = null;
var start = FindRelativeStart(url);
if (start == -1)
{
return false;
}
var trimmedUrl = CreateTrimmedString(url, start);
var urlHelper = UrlHelperFactory.GetUrlHelper(ViewContext);
resolvedUrl = urlHelper.Content(trimmedUrl);
return true;
}
/// <summary>
/// Tries to resolve the given <paramref name="url"/> value relative to the application's 'webroot' setting.
/// </summary>
/// <param name="url">The URL to resolve.</param>
/// <param name="resolvedUrl">
/// Absolute URL beginning with the application's virtual root. <c>null</c> if <paramref name="url"/> could
/// not be resolved.
/// </param>
/// <returns><c>true</c> if the <paramref name="url"/> could be resolved; <c>false</c> otherwise.</returns>
protected bool TryResolveUrl(string url, [NotNullWhen(true)] out IHtmlContent? resolvedUrl)
{
resolvedUrl = null;
var start = FindRelativeStart(url);
if (start == -1)
{
return false;
}
var trimmedUrl = CreateTrimmedString(url, start);
var urlHelper = UrlHelperFactory.GetUrlHelper(ViewContext);
var appRelativeUrl = urlHelper.Content(trimmedUrl);
var postTildeSlashUrlValue = trimmedUrl.Substring(2);
if (!appRelativeUrl.EndsWith(postTildeSlashUrlValue, StringComparison.Ordinal))
{
throw new InvalidOperationException();
}
resolvedUrl = new EncodeFirstSegmentContent(
appRelativeUrl,
appRelativeUrl.Length - postTildeSlashUrlValue.Length,
postTildeSlashUrlValue);
return true;
}
private static int FindRelativeStart(string url)
{
if (url == null || url.Length < 2)
{
return -1;
}
var maxTestLength = url.Length - 2;
var start = 0;
for (; start < url.Length; start++)
{
if (start > maxTestLength)
{
return -1;
}
if (!IsCharWhitespace(url[start]))
{
break;
}
}
// Before doing more work, ensure that the URL we're looking at is app-relative.
if (url[start] != '~' || url[start + 1] != '/')
{
return -1;
}
return start;
}
private static string CreateTrimmedString(string input, int start)
{
var end = input.Length - 1;
for (; end >= start; end--)
{
if (!IsCharWhitespace(input[end]))
{
break;
}
}
var len = end - start + 1;
// Substring returns same string if start == 0 && len == Length
return input.Substring(start, len);
}
private static bool IsCharWhitespace(char ch)
{
return ValidAttributeWhitespaceChars.AsSpan().IndexOf(ch) != -1;
}
private sealed class EncodeFirstSegmentContent : IHtmlContent
{
private readonly string _firstSegment;
private readonly int _firstSegmentLength;
private readonly string _secondSegment;
public EncodeFirstSegmentContent(string firstSegment, int firstSegmentLength, string secondSegment)
{
_firstSegment = firstSegment;
_firstSegmentLength = firstSegmentLength;
_secondSegment = secondSegment;
}
public void WriteTo(TextWriter writer, HtmlEncoder encoder)
{
encoder.Encode(writer, _firstSegment, 0, _firstSegmentLength);
writer.Write(_secondSegment);
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -1,12 +1,38 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<LangVersion>10.0</LangVersion>
<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.7.2</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.29" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="BTCPayServer.Lightning.Common" Version="1.3.21" />
<PackageReference Include="NBitcoin" Version="7.0.24" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</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

@ -0,0 +1,103 @@
using System;
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<PointOfSaleAppData> CreatePointOfSaleApp(string storeId,
CreatePointOfSaleAppRequest request, CancellationToken token = default)
{
if (request == null)
throw new ArgumentNullException(nameof(request));
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/apps/pos", bodyPayload: request,
method: HttpMethod.Post), token);
return await HandleResponse<PointOfSaleAppData>(response);
}
public virtual async Task<CrowdfundAppData> CreateCrowdfundApp(string storeId,
CreateCrowdfundAppRequest request, CancellationToken token = default)
{
if (request == null)
throw new ArgumentNullException(nameof(request));
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/apps/crowdfund", bodyPayload: request,
method: HttpMethod.Post), token);
return await HandleResponse<CrowdfundAppData>(response);
}
public virtual async Task<PointOfSaleAppData> UpdatePointOfSaleApp(string appId,
CreatePointOfSaleAppRequest request, CancellationToken token = default)
{
if (request == null)
throw new ArgumentNullException(nameof(request));
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/apps/pos/{appId}", bodyPayload: request,
method: HttpMethod.Put), token);
return await HandleResponse<PointOfSaleAppData>(response);
}
public virtual async Task<AppDataBase> GetApp(string appId, CancellationToken token = default)
{
if (appId == null)
throw new ArgumentNullException(nameof(appId));
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/apps/{appId}",
method: HttpMethod.Get), token);
return await HandleResponse<AppDataBase>(response);
}
public virtual async Task<AppDataBase[]> GetAllApps(string storeId, CancellationToken token = default)
{
if (storeId == null)
throw new ArgumentNullException(nameof(storeId));
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/apps",
method: HttpMethod.Get), token);
return await HandleResponse<AppDataBase[]>(response);
}
public virtual async Task<AppDataBase[]> GetAllApps(CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/apps",
method: HttpMethod.Get), token);
return await HandleResponse<AppDataBase[]>(response);
}
public virtual async Task<PointOfSaleAppData> GetPosApp(string appId, CancellationToken token = default)
{
if (appId == null)
throw new ArgumentNullException(nameof(appId));
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/apps/pos/{appId}",
method: HttpMethod.Get), token);
return await HandleResponse<PointOfSaleAppData>(response);
}
public virtual async Task<CrowdfundAppData> GetCrowdfundApp(string appId, CancellationToken token = default)
{
if (appId == null)
throw new ArgumentNullException(nameof(appId));
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/apps/crowdfund/{appId}",
method: HttpMethod.Get), token);
return await HandleResponse<CrowdfundAppData>(response);
}
public virtual async Task DeleteApp(string appId, CancellationToken token = default)
{
if (appId == null)
throw new ArgumentNullException(nameof(appId));
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/apps/{appId}",
method: HttpMethod.Delete), token);
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

@ -0,0 +1,97 @@
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<CustodianAccountData>> GetCustodianAccounts(string storeId, bool includeAssetBalances = false, CancellationToken token = default)
{
var queryPayload = new Dictionary<string, object>();
if (includeAssetBalances)
{
queryPayload.Add("assetBalances", "true");
}
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/custodian-accounts", queryPayload), token);
return await HandleResponse<IEnumerable<CustodianAccountData>>(response);
}
public virtual async Task<CustodianAccountResponse> GetCustodianAccount(string storeId, string accountId, bool includeAssetBalances = false, CancellationToken token = default)
{
var queryPayload = new Dictionary<string, object>();
if (includeAssetBalances)
{
queryPayload.Add("assetBalances", "true");
}
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/custodian-accounts/{accountId}", queryPayload), token);
return await HandleResponse<CustodianAccountResponse>(response);
}
public virtual async Task<CustodianAccountData> CreateCustodianAccount(string storeId, CreateCustodianAccountRequest request, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/custodian-accounts", bodyPayload: request, method: HttpMethod.Post), token);
return await HandleResponse<CustodianAccountData>(response);
}
public virtual async Task<CustodianAccountData> UpdateCustodianAccount(string storeId, string accountId, CreateCustodianAccountRequest request, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/custodian-accounts/{accountId}", bodyPayload: request, method: HttpMethod.Put), token);
return await HandleResponse<CustodianAccountData>(response);
}
public virtual async Task DeleteCustodianAccount(string storeId, string accountId, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/custodian-accounts/{accountId}", method: HttpMethod.Delete), token);
await HandleResponse(response);
}
public virtual async Task<DepositAddressData> GetDepositAddress(string storeId, string accountId, string paymentMethod, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/custodian-accounts/{accountId}/addresses/{paymentMethod}"), token);
return await HandleResponse<DepositAddressData>(response);
}
public virtual async Task<MarketTradeResponseData> MarketTradeCustodianAccountAsset(string storeId, string accountId, TradeRequestData request, CancellationToken token = default)
{
//var response = await _httpClient.SendAsync(CreateHttpRequest("api/v1/users", null, request, HttpMethod.Post), token);
//return await HandleResponse<ApplicationUserData>(response);
var internalRequest = CreateHttpRequest($"api/v1/stores/{storeId}/custodian-accounts/{accountId}/trades/market", null,
request, HttpMethod.Post);
var response = await _httpClient.SendAsync(internalRequest, token);
return await HandleResponse<MarketTradeResponseData>(response);
}
public virtual async Task<MarketTradeResponseData> GetTradeInfo(string storeId, string accountId, string tradeId, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/custodian-accounts/{accountId}/trades/{tradeId}", method: HttpMethod.Get), token);
return await HandleResponse<MarketTradeResponseData>(response);
}
public virtual async Task<TradeQuoteResponseData> GetTradeQuote(string storeId, string accountId, string fromAsset, string toAsset, CancellationToken token = default)
{
var queryPayload = new Dictionary<string, object>();
queryPayload.Add("fromAsset", fromAsset);
queryPayload.Add("toAsset", toAsset);
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/custodian-accounts/{accountId}/trades/quote", queryPayload), token);
return await HandleResponse<TradeQuoteResponseData>(response);
}
public virtual async Task<WithdrawalResponseData> CreateWithdrawal(string storeId, string accountId, WithdrawRequestData request, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/custodian-accounts/{accountId}/withdrawals", bodyPayload: request, method: HttpMethod.Post), token);
return await HandleResponse<WithdrawalResponseData>(response);
}
public virtual async Task<WithdrawalResponseData> GetWithdrawalInfo(string storeId, string accountId, string paymentMethod, string withdrawalId, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/custodian-accounts/{accountId}/withdrawals/{paymentMethod}/{withdrawalId}", method: HttpMethod.Get), token);
return await HandleResponse<WithdrawalResponseData>(response);
}
}
}

View File

@ -0,0 +1,16 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;
namespace BTCPayServer.Client
{
public partial class BTCPayServerClient
{
public virtual async Task<IEnumerable<CustodianData>> GetCustodians(CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest("api/v1/custodians"), token);
return await HandleResponse<IEnumerable<CustodianData>>(response);
}
}
}

View File

@ -0,0 +1,15 @@
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;
namespace BTCPayServer.Client
{
public partial class BTCPayServerClient
{
public virtual async Task<ApiHealthData> GetHealth(CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest("api/v1/health"), token);
return await HandleResponse<ApiHealthData>(response);
}
}
}

View File

@ -0,0 +1,145 @@
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<IEnumerable<InvoiceData>> GetInvoices(string storeId, string[] orderId = null,
InvoiceStatus[] status = null,
DateTimeOffset? startDate = null,
DateTimeOffset? endDate = null,
string textSearch = null,
bool includeArchived = false,
int? skip = null,
int? take = null,
CancellationToken token = default)
{
Dictionary<string, object> queryPayload = new Dictionary<string, object>();
queryPayload.Add(nameof(includeArchived), includeArchived);
if (startDate is DateTimeOffset s)
queryPayload.Add(nameof(startDate), Utils.DateTimeToUnixTime(s));
if (endDate is DateTimeOffset e)
queryPayload.Add(nameof(endDate), Utils.DateTimeToUnixTime(e));
if (orderId != null)
queryPayload.Add(nameof(orderId), orderId);
if (textSearch != null)
queryPayload.Add(nameof(textSearch), textSearch);
if (status != null)
queryPayload.Add(nameof(status), status.Select(s => s.ToString().ToLower()).ToArray());
if (skip != null)
{
queryPayload.Add(nameof(skip), skip);
}
if (take != null)
{
queryPayload.Add(nameof(take), take);
}
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/invoices",
queryPayload), 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);
}
public virtual async Task<PullPaymentData> RefundInvoice(
string storeId,
string invoiceId,
RefundInvoiceRequest request,
CancellationToken token = default
)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/invoices/{invoiceId}/refund", bodyPayload: request,
method: HttpMethod.Post), token);
return await HandleResponse<PullPaymentData>(response);
}
}
}

View File

@ -0,0 +1,59 @@
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<LNURLPayPaymentMethodData>>
GetStoreLNURLPayPaymentMethods(string storeId, bool? enabled = null,
CancellationToken token = default)
{
var query = new Dictionary<string, object>();
if (enabled != null)
{
query.Add(nameof(enabled), enabled);
}
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/LNURLPay",
query), token);
return await HandleResponse<IEnumerable<LNURLPayPaymentMethodData>>(response);
}
public virtual async Task<LNURLPayPaymentMethodData> GetStoreLNURLPayPaymentMethod(
string storeId,
string cryptoCode, CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/LNURLPay/{cryptoCode}"), token);
return await HandleResponse<LNURLPayPaymentMethodData>(response);
}
public virtual async Task RemoveStoreLNURLPayPaymentMethod(string storeId,
string cryptoCode, CancellationToken token = default)
{
var response =
await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/LNURLPay/{cryptoCode}",
method: HttpMethod.Delete), token);
await HandleResponse(response);
}
public virtual async Task<LNURLPayPaymentMethodData> UpdateStoreLNURLPayPaymentMethod(
string storeId,
string cryptoCode, LNURLPayPaymentMethodData paymentMethod,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/LNURLPay/{cryptoCode}",
bodyPayload: paymentMethod, method: HttpMethod.Put), token);
return await HandleResponse<LNURLPayPaymentMethodData>(response);
}
}
}

View File

@ -0,0 +1,146 @@
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<LightningNodeInformationData> GetLightningNodeInfo(string cryptoCode,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/server/lightning/{cryptoCode}/info",
method: HttpMethod.Get), token);
return await HandleResponse<LightningNodeInformationData>(response);
}
public virtual async Task<LightningNodeBalanceData> GetLightningNodeBalance(string cryptoCode,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/server/lightning/{cryptoCode}/balance",
method: HttpMethod.Get), token);
return await HandleResponse<LightningNodeBalanceData>(response);
}
public virtual async Task ConnectToLightningNode(string cryptoCode, ConnectToNodeRequest request,
CancellationToken token = default)
{
if (request == null)
throw new ArgumentNullException(nameof(request));
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/server/lightning/{cryptoCode}/connect", bodyPayload: request,
method: HttpMethod.Post), token);
await HandleResponse(response);
}
public virtual async Task<IEnumerable<LightningChannelData>> GetLightningNodeChannels(string cryptoCode,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/server/lightning/{cryptoCode}/channels",
method: HttpMethod.Get), token);
return await HandleResponse<IEnumerable<LightningChannelData>>(response);
}
public virtual async Task OpenLightningChannel(string cryptoCode, OpenLightningChannelRequest request,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/server/lightning/{cryptoCode}/channels", bodyPayload: request,
method: HttpMethod.Post), token);
await HandleResponse(response);
}
public virtual async Task<string> GetLightningDepositAddress(string cryptoCode, CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/server/lightning/{cryptoCode}/address", method: HttpMethod.Post), token);
return await HandleResponse<string>(response);
}
public virtual async Task<LightningPaymentData> PayLightningInvoice(string cryptoCode, PayLightningInvoiceRequest request,
CancellationToken token = default)
{
if (request == null)
throw new ArgumentNullException(nameof(request));
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/server/lightning/{cryptoCode}/invoices/pay", bodyPayload: request,
method: HttpMethod.Post), token);
return await HandleResponse<LightningPaymentData>(response);
}
public virtual async Task<LightningPaymentData> GetLightningPayment(string cryptoCode,
string paymentHash, CancellationToken token = default)
{
if (paymentHash == null)
throw new ArgumentNullException(nameof(paymentHash));
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/server/lightning/{cryptoCode}/payments/{paymentHash}",
method: HttpMethod.Get), token);
return await HandleResponse<LightningPaymentData>(response);
}
public virtual async Task<LightningInvoiceData> GetLightningInvoice(string cryptoCode,
string invoiceId, CancellationToken token = default)
{
if (invoiceId == null)
throw new ArgumentNullException(nameof(invoiceId));
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/server/lightning/{cryptoCode}/invoices/{invoiceId}",
method: HttpMethod.Get), token);
return await HandleResponse<LightningInvoiceData>(response);
}
public virtual async Task<LightningInvoiceData[]> GetLightningInvoices(string cryptoCode,
bool? pendingOnly = null, long? offsetIndex = null, CancellationToken token = default)
{
var queryPayload = new Dictionary<string, object>();
if (pendingOnly is bool v)
{
queryPayload.Add("pendingOnly", v.ToString());
}
if (offsetIndex is > 0)
{
queryPayload.Add("offsetIndex", offsetIndex);
}
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/server/lightning/{cryptoCode}/invoices", queryPayload), token);
return await HandleResponse<LightningInvoiceData[]>(response);
}
public virtual async Task<LightningPaymentData[]> GetLightningPayments(string cryptoCode,
bool? includePending = null, long? offsetIndex = null, CancellationToken token = default)
{
var queryPayload = new Dictionary<string, object>();
if (includePending is bool v)
{
queryPayload.Add("includePending", v.ToString());
}
if (offsetIndex is > 0)
{
queryPayload.Add("offsetIndex", offsetIndex);
}
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/server/lightning/{cryptoCode}/payments", queryPayload), token);
return await HandleResponse<LightningPaymentData[]>(response);
}
public virtual async Task<LightningInvoiceData> CreateLightningInvoice(string cryptoCode, CreateLightningInvoiceRequest request,
CancellationToken token = default)
{
if (request == null)
throw new ArgumentNullException(nameof(request));
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/server/lightning/{cryptoCode}/invoices", bodyPayload: request,
method: HttpMethod.Post), token);
return await HandleResponse<LightningInvoiceData>(response);
}
}
}

View File

@ -0,0 +1,148 @@
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<LightningNodeInformationData> GetLightningNodeInfo(string storeId, string cryptoCode,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/lightning/{cryptoCode}/info",
method: HttpMethod.Get), token);
return await HandleResponse<LightningNodeInformationData>(response);
}
public virtual async Task<LightningNodeBalanceData> GetLightningNodeBalance(string storeId, string cryptoCode,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/lightning/{cryptoCode}/balance",
method: HttpMethod.Get), token);
return await HandleResponse<LightningNodeBalanceData>(response);
}
public virtual async Task ConnectToLightningNode(string storeId, string cryptoCode, ConnectToNodeRequest request,
CancellationToken token = default)
{
if (request == null)
throw new ArgumentNullException(nameof(request));
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/lightning/{cryptoCode}/connect", bodyPayload: request,
method: HttpMethod.Post), token);
await HandleResponse(response);
}
public virtual async Task<IEnumerable<LightningChannelData>> GetLightningNodeChannels(string storeId, string cryptoCode,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/lightning/{cryptoCode}/channels",
method: HttpMethod.Get), token);
return await HandleResponse<IEnumerable<LightningChannelData>>(response);
}
public virtual async Task OpenLightningChannel(string storeId, string cryptoCode, OpenLightningChannelRequest request,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/lightning/{cryptoCode}/channels", bodyPayload: request,
method: HttpMethod.Post), token);
await HandleResponse(response);
}
public virtual async Task<string> GetLightningDepositAddress(string storeId, string cryptoCode,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/lightning/{cryptoCode}/address", method: HttpMethod.Post),
token);
return await HandleResponse<string>(response);
}
public virtual async Task<LightningPaymentData> PayLightningInvoice(string storeId, string cryptoCode, PayLightningInvoiceRequest request,
CancellationToken token = default)
{
if (request == null)
throw new ArgumentNullException(nameof(request));
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/lightning/{cryptoCode}/invoices/pay", bodyPayload: request,
method: HttpMethod.Post), token);
return await HandleResponse<LightningPaymentData>(response);
}
public virtual async Task<LightningPaymentData> GetLightningPayment(string storeId, string cryptoCode,
string paymentHash, CancellationToken token = default)
{
if (paymentHash == null)
throw new ArgumentNullException(nameof(paymentHash));
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/lightning/{cryptoCode}/payments/{paymentHash}",
method: HttpMethod.Get), token);
return await HandleResponse<LightningPaymentData>(response);
}
public virtual async Task<LightningInvoiceData> GetLightningInvoice(string storeId, string cryptoCode,
string invoiceId, CancellationToken token = default)
{
if (invoiceId == null)
throw new ArgumentNullException(nameof(invoiceId));
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/lightning/{cryptoCode}/invoices/{invoiceId}",
method: HttpMethod.Get), token);
return await HandleResponse<LightningInvoiceData>(response);
}
public virtual async Task<LightningInvoiceData[]> GetLightningInvoices(string storeId, string cryptoCode,
bool? pendingOnly = null, long? offsetIndex = null, CancellationToken token = default)
{
var queryPayload = new Dictionary<string, object>();
if (pendingOnly is bool v)
{
queryPayload.Add("pendingOnly", v.ToString());
}
if (offsetIndex is > 0)
{
queryPayload.Add("offsetIndex", offsetIndex);
}
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/lightning/{cryptoCode}/invoices", queryPayload), token);
return await HandleResponse<LightningInvoiceData[]>(response);
}
public virtual async Task<LightningPaymentData[]> GetLightningPayments(string storeId, string cryptoCode,
bool? includePending = null, long? offsetIndex = null, CancellationToken token = default)
{
var queryPayload = new Dictionary<string, object>();
if (includePending is bool v)
{
queryPayload.Add("includePending", v.ToString());
}
if (offsetIndex is > 0)
{
queryPayload.Add("offsetIndex", offsetIndex);
}
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/lightning/{cryptoCode}/payments", queryPayload), token);
return await HandleResponse<LightningPaymentData[]>(response);
}
public virtual async Task<LightningInvoiceData> CreateLightningInvoice(string storeId, string cryptoCode,
CreateLightningInvoiceRequest request, CancellationToken token = default)
{
if (request == null)
throw new ArgumentNullException(nameof(request));
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/lightning/{cryptoCode}/invoices", bodyPayload: request,
method: HttpMethod.Post), token);
return await HandleResponse<LightningInvoiceData>(response);
}
}
}

View File

@ -0,0 +1,48 @@
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<LightningAddressData[]> GetStoreLightningAddresses(string storeId,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/lightning-addresses",
method: HttpMethod.Get), token);
return await HandleResponse<LightningAddressData[]>(response);
}
public virtual async Task<LightningAddressData> GetStoreLightningAddress(string storeId, string username,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/lightning-addresses/{username}",
method: HttpMethod.Get), token);
return await HandleResponse<LightningAddressData>(response);
}
public virtual async Task RemoveStoreLightningAddress(string storeId, string username,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/lightning-addresses/{username}",
method: HttpMethod.Delete), token);
await HandleResponse(response);
}
public virtual async Task<LightningAddressData> AddOrUpdateStoreLightningAddress(string storeId,
string username, LightningAddressData data,
CancellationToken token = default)
{
var response = await _httpClient.SendAsync(
CreateHttpRequest($"api/v1/stores/{storeId}/lightning-addresses/{username}",
method: HttpMethod.Post, bodyPayload: data), token);
return await HandleResponse<LightningAddressData>(response);
}
}
}

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