Commit Graph

1565 Commits

Author SHA1 Message Date
nicolas.dorier
3285f24fe9
Add experimental mode 2022-05-23 10:46:51 +09:00
Andrew Camilleri
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
d11n
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
d11n
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
Andrew Camilleri
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
d11n
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
Umar Bolatov
fca066fe52
Add endpoint for creating POS app 2022-05-17 21:26:33 -07:00
Dennis Reimann
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
Nicolas Dorier
4acca4c6f5
Try fix selenium test error (#3728) 2022-05-09 14:13:51 +09:00
Nicolas Dorier
c106ff8290
bump selenium (#3723) 2022-05-06 12:07:53 +09:00
Nicolas Dorier
e16a718bde
Do not always provide counting in list views (#3696) 2022-05-02 16:35:28 +09:00
Andrew Camilleri
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
Andrew Camilleri
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
nicolas.dorier
5a7b275ee3
Fix CanCreateAppPos 2022-04-25 17:37:46 +09:00
Andrew Camilleri
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
Andrew Camilleri
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
Umar Bolatov
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
Umar Bolatov
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
Umar Bolatov
64534efe71
Fix broken "CanCreateRefunds" test (#3635) 2022-04-14 14:07:10 +09:00
Umar Bolatov
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
d11n
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
d11n
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
d11n
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
d11n
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
d11n
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
nicolas.dorier
b9602243d3
Fix tests for litecoin 2022-04-08 13:03:51 +09:00
Pavlenex
28ce095fb4
Merge pull request #3602 from phershbe/master
Link to local development environment instructions corrected
2022-04-05 09:01:00 +02:00
Nicolas Dorier
13952a4b79
Bump NBX (#3607) 2022-04-05 14:46:42 +09:00
Philip
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
Kukks
77da261fea
Allow plugins to extend swagger docs and fix pull payment test 2022-03-29 20:29:27 +02:00
Kukks
e23c9ee608
Add missing policies in api key UI 2022-03-29 20:12:02 +02:00
Kukks
dca986eb2e Add Greenfield Store Email API 2022-03-26 21:46:40 +00:00
Wouter Samaey
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
Umar Bolatov
ce6cd40b92
Adjust wallet receive page layout (#3553)
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-03-11 10:43:31 +01:00
Wouter Samaey
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
Dennis Reimann
722c39a6ff Exclude ChainCoin in rate provider test 2022-03-08 12:12:01 +01:00
Dennis Reimann
e344749d2f Remove Polis
As per [this comment](https://github.com/btcpayserver/btcpayserver/pull/3514#issuecomment-1059583143)
2022-03-08 12:12:01 +01:00
Dennis Reimann
1240e7914d Fixes 2022-03-08 08:17:39 +00:00
Dennis Reimann
e4683b1ea1 Refactoring: Extract ITempDataDictionary extensions 2022-03-08 08:17:39 +00:00
Dennis Reimann
4dfbb08db3 Try test fix 2022-03-04 10:49:36 +00:00
Dennis Reimann
a89491e343 Skip Polis and OKEx in rate fetching tests 2022-03-03 10:57:55 +01:00
Dennis Reimann
b1b00ae886 Scroll to checkbox before click 2022-03-03 10:57:55 +01:00
Dennis Reimann
4a05f16050 Refactoring: Move WellKnownTempData into Abstractions.Constants
This allows plugins to reuse the status message mechanism.
2022-02-21 16:39:08 +01:00
nicolas.dorier
19ec8c36e2
Remove debug line in selenium tests 2022-02-21 16:17:36 +09:00
Nicolas Dorier
19eea3a615
Refactor how we get storeids list in invoice filter (#3483) 2022-02-21 14:53:48 +09:00
nicolas.dorier
557594e34d
Test LNUrl Pay payment method information, add doc 2022-02-21 13:22:17 +09:00
d11n
9b9540b857
PSBT test fix (#3472) 2022-02-18 10:55:54 +09:00
Umar Bolatov
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
d11n
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
Nicolas Dorier
6efeb60c41
Fix the PSBT signing flow (#3465) 2022-02-17 17:58:56 +09:00
Wouter Samaey
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
hhanh00
f4153ade92
Zcash integration (#3400)
* zcash

* Use Channel instead of Queue
2022-02-14 17:04:34 +09:00
Umar Bolatov
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
Andrew Camilleri
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
d11n
3fa694c65f
Improve Lightning test scripts (#3435) 2022-02-10 12:25:14 +09:00
Nicolas Dorier
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
d11n
99c4ebe046
Setup guide: Link wallet setup always to BTC (#3442) 2022-02-10 12:17:15 +09:00
d11n
699231fd92
Fix payment request archival actions (#3443) 2022-02-09 23:37:15 +09:00
Nicolas Dorier
c8b9906ef3
After login, redirect user to the main page even if root app configured (#3429) 2022-02-07 21:18:22 +09:00
nicolas.dorier
cd94a9fac1
Make CheckNoDeadLink more reliable 2022-02-07 21:15:39 +09:00
d11n
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
rockstardev
c652a2f122
Bumping LND to 0.14.2-beta (#3424) 2022-02-07 16:30:17 +09:00
Umar Bolatov
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
nicolas.dorier
254e8d48f2
Fix test 2022-01-28 22:51:12 +09:00
dstrukt
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
Dennis Reimann
723a38da68
Store: Combine General and Payment settings 2022-01-25 06:57:55 +01:00
nicolas.dorier
74037fd605
Make CanUseTorClient more reliable 2022-01-25 12:27:44 +09:00
Andrew Camilleri
e917796fce
Set new LN defaults (#3325)
fixes #3324
2022-01-25 12:17:39 +09:00
Nicolas Dorier
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
Nicolas Dorier
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
d11n
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
d11n
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
nicolas.dorier
d667b8ae8b Add LNURL support to Crowdfund 2022-01-18 12:26:15 +01:00
d11n
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
dstrukt
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
nicolas.dorier
21e69251e3
CanSendIPN can't ensure received payment is sent first 2022-01-17 16:59:37 +09:00
Nicolas Dorier
14da3023d8
Merge pull request #3310 from NicolasDorier/niceurl
Use nicer urls, part2 (Fix #921)
2022-01-17 11:41:20 +09:00
nicolas.dorier
961769ebd0
Fix AssertNoError to detect page exception 2022-01-16 12:39:08 +09:00
nicolas.dorier
d1f567eade
Add Include Error Details to postgres connection string 2022-01-15 14:54:06 +09:00
nicolas.dorier
b9fdd54538
Use nicer urls, part2 (Fix #921) 2022-01-15 14:54:06 +09:00
Kukks
7243aec213 Support LNURL Auth 2022-01-14 13:26:30 +01:00
nicolas.dorier
1fb582c35d
Rename the Fido2Controller 2022-01-14 18:34:30 +09:00
nicolas.dorier
50d4b55f73
Warning if not using 'simple using' 2022-01-14 17:50:29 +09:00
nicolas.dorier
c6a7e90c1a
Warning if not using 'is not null' 2022-01-14 17:48:15 +09:00
nicolas.dorier
23a96c07ae
Rename GreenField -> Greenfield 2022-01-14 13:46:04 +09:00
nicolas.dorier
7a787fc945
Rename UI controllers 2022-01-14 13:46:03 +09:00
nicolas.dorier
eaf47d3739
Rename controllers Bitpay controllers 2022-01-14 12:21:06 +09:00
Nicolas Dorier
5eebdb6774
Use nicer urls (Fix #921) (#3304) 2022-01-14 12:20:50 +09:00
nicolas.dorier
223c71ce8b
Fix tests 2022-01-13 23:50:33 +09:00
d11n
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
nicolas.dorier
77be2fa9d5
Make CanUseWebhooks less flaky 2022-01-13 13:27:02 +09:00
nicolas.dorier
2327b97fa3
Make CanUseWebhooks less flaky 2022-01-13 13:21:54 +09:00
nicolas.dorier
5a2a933b64
Add more logs to the canusetor test 2022-01-12 18:26:45 +09:00
nicolas.dorier
a02ad104ee
Bump Clipboard.js 2022-01-12 16:06:28 +09:00
Nicolas Dorier
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
Nicolas Dorier
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
Nicolas Dorier
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
Nicolas Dorier
0017e687db
A store's guest should be able to manage lightning invoices (Fix #3212) (#3283) 2022-01-11 17:22:10 +09:00
dstrukt
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
dstrukt
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
nicolas.dorier
c6df43363f
Extract MultiProcessingQueue from WebhookNotificationManager 2022-01-11 13:21:38 +09:00
nicolas.dorier
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
Dennis Reimann
0dcf240faf
Account menu improvement 2022-01-07 17:25:28 +01:00
nicolas.dorier
88bc1c64d2
Fix tests 2022-01-07 21:47:19 +09:00
nicolas.dorier
84bd8a6e98
fix tests 2022-01-07 21:16:26 +09:00
nicolas.dorier
0d657fc646
Fix tests 2022-01-07 20:54:26 +09:00
nicolas.dorier
64b85ac1f9
Fix AssertNoError 2022-01-07 19:49:33 +09:00
nicolas.dorier
b71a04943b
CookieAuthHandler shouldn't set store context if appId/payReqId/invoiceId is not found 2022-01-07 18:10:31 +09:00
nicolas.dorier
fa84e34def
Fix test 2022-01-07 13:02:07 +09:00
Kukks
8c3f377fc0 fix elements 2022-01-06 18:09:06 +01:00
Nicolas Dorier
fd2e55e444
Simplify tests to take advantage of context (#3246) 2021-12-31 22:02:53 +09:00
Nicolas Dorier
04b8eafacb
Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
d11n
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 97e8b8379c.

* Simplify LayoutSimple

* Fix CanViewInvoices condition

Co-authored-by: Kukks <evilkukka@gmail.com>
2021-12-31 16:36:38 +09:00
nicolas.dorier
db1a124ffb
Do not check certificates for SMTP settings if local server 2021-12-29 18:24:24 +09:00
Nicolas Dorier
0dcfbe8581
Remove internal socks http proxy and use .net60 socks support (#3240) 2021-12-28 18:57:22 +09:00
nicolas.dorier
e2b18cf9db
Make sure dotnet test show test progress 2021-12-27 14:26:03 +09:00
nicolas.dorier
c0e9f91bdc
Fix warnings 2021-12-27 13:58:18 +09:00
Nicolas Dorier
02419dcdd1
Migrate to .net6.0 (#3198) 2021-12-27 13:15:43 +09:00
Andrew Camilleri
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
Wouter Samaey
f63a9ed1a0 Added field "StoreId" to a Payment Request in Greenfield 2021-12-22 16:17:35 +01:00
Dennis Reimann
3a59e2a5c4 Cache resolved store items in HTTP context 2021-12-21 09:24:09 +01:00
d11n
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
Nicolas Dorier
c68141119c
[Greenfield] Send forbid 403 rather than empty results on /api/v1/stores (#3215) 2021-12-19 01:01:54 +09:00
Nicolas Dorier
163d1a195d
Fix: DateTime passed to bitpay API weren't assumed UTC, remove DateTime.Now references (#3206) 2021-12-17 15:31:06 +09:00
Wouter Samaey
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
nicolas.dorier
4f7eeea14e
Greenfield: Improve error message, do not use internal lightning node on store's lightning API 2021-12-16 14:27:34 +09:00
Nicolas Dorier
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
Nicolas Dorier
bd2f35a241
Remove Ethereum support (#3182) 2021-12-11 14:31:41 +09:00
d11n
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
nicolas.dorier
6fec929656
Remove infinite loop in test 2021-11-27 11:40:06 +09:00
nicolas.dorier
f6afb9a3f0
CheatMode should use NBXplorer RPC proxy rather than hardcoded client 2021-11-26 18:34:40 +09:00
nicolas.dorier
70bb6d999e
Fix lightnign flaky test 2021-11-26 15:08:28 +09:00
d11n
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
Dennis Reimann
d555d2f3f6 Fix flaky alert message lookup 2021-11-25 10:24:14 +01:00
Dennis Reimann
285a30f67a Plugins: Provide extension points for Lightning setup 2021-11-25 10:24:14 +01:00
Jonathan Underwood
e3def45c83
Update Bitbank API (#3157)
Co-authored-by: Kukks <evilkukka@gmail.com>
2021-11-25 09:34:49 +01:00
nicolas.dorier
20f32e94a8
Run tests in parallel 2021-11-23 19:17:17 +09:00
nicolas.dorier
35aad4ebf9
Remove Logs static singletons 2021-11-23 13:55:34 +09:00
nicolas.dorier
e5a5eb3547
Add third party tests to the suite, skip azure test if not configured 2021-11-23 13:26:47 +09:00
nicolas.dorier
fbb4b13898
Isolate tests requiring internet access 2021-11-23 12:53:05 +09:00
Nicolas Dorier
573f1ddf76
Move fast tests in own class (#3144) 2021-11-23 00:49:51 +09:00
dstrukt
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
Nicolas Dorier
c01fae5fcd
Bump LND (#3130) 2021-11-20 22:41:35 +09:00
dstrukt
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
Kukks
b97dfa841a make elements regtest start with dynfed 2021-11-15 13:10:00 +01:00
Dennis Reimann
56c8e43ce8 Test fix 2021-11-15 09:35:56 +01:00
Umar Bolatov
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
Samuel Adams
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
d11n
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
Umar Bolatov
193b209c92
Add setup links for LN URL integration (#3046) 2021-11-10 10:50:39 +01:00
Samuel Adams
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
nicolas.dorier
3c13d6c195
Add test verifying JS files that we ship 2021-11-08 19:09:00 +09:00
nicolas.dorier
b0be248ca5
Attempt to fix CanUseLNAddress flakyness 2021-11-05 13:06:35 +09:00
nicolas.dorier
2828ec76b4
Fix CanUseTorClient test flakyness 2021-11-05 12:30:28 +09:00
Nicolas Dorier
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
nicolas.dorier
909fc71543
Make test CheckNoDeadLink less flaky 2021-11-05 00:36:05 +09:00
nicolas.dorier
fd543bcee1
Improve test flakyness 2021-10-31 14:20:43 +09:00
nicolas.dorier
a5aa5cf059
Fix tests 2021-10-29 23:09:19 +09:00
nicolas.dorier
de93c5c9d6
Fix test warning 2021-10-29 21:51:53 +09:00
Samuel Adams
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
Andrew Camilleri
fc8a5ff95f
Lightning address support (#2804)
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-10-29 11:01:16 +02:00
Andrew Camilleri
25f84d000b
LNURL POS Support (#3019) 2021-10-29 10:27:33 +02:00
d11n
2d4aa52fa5
Restructure store and payment settings (#2995)
Co-authored-by: Kukks <evilkukka@gmail.com>
2021-10-29 08:25:43 +02:00
Umar Bolatov
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
Umar Bolatov
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
Kukks
fccbbb6fb7 LNURL tests and small fixes 2021-10-26 13:55:59 +02:00
nicolas.dorier
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
Andrew Camilleri
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 5783db9eda.

* 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
nicolas.dorier
fbdd2fc470
Fix flaky test for ripio exchange 2021-10-25 15:10:44 +09:00
Nicolas Dorier
86e528e5df
Use NBitcoin's Network.UriScheme rather than our own (#3005) 2021-10-23 14:47:15 +09:00
Andrew Camilleri
9b0d1a23dc
Decouple Pull payment from wallets (#2987)
* Decouple Pull payments from wallet

* Update _Nav.cshtml

* Fixes
2021-10-22 11:17:40 +09:00
Andrew Camilleri
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
Nicolas Dorier
4cf3249e0b
Add ability to set default currency for a store (#2998) 2021-10-20 23:17:40 +09:00
Samuel B. Atwood
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
Nicolas Dorier
3d3016fdca
Fix fallback logic for default payment method (#2986) 2021-10-18 16:56:47 +09:00
Andrew Camilleri
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
Kukks
f83e85dc36 addd test 2021-10-15 12:53:45 +02:00
Andrew Camilleri
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
nicolas.dorier
3671e7f18c
Fix test 2021-10-15 14:19:40 +09:00
nicolas.dorier
899bf98f45
Fix tests 2021-10-15 12:50:33 +09:00
Nicolas Dorier
75776687bc
Fix bug: Importing seed with Is hot wallet checked was not working (#2966) 2021-10-12 18:37:13 +09:00
nicolas.dorier
601e17ed0f
Fix altcoins docker-compose 2021-10-11 17:39:12 +09:00
nicolas.dorier
ad86c16bc9
Bump Tor 2021-10-11 12:35:26 +09:00
rockstardev
791db983c7
Bumping LND to 0.13.3-beta (#2964) 2021-10-11 12:32:58 +09:00
Nicolas Dorier
d7a7382d00
Introduce cheat mode (#2965) 2021-10-11 12:32:09 +09:00
Andrew Camilleri
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
d11n
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
nicolas.dorier
f9e38deee7
Fix warnings 2021-10-07 19:08:53 +09:00
Andrew Camilleri
7bcaf956e7
Grerenfield: Add availableStatusesForManualMarking to Invoice Data (#2934)
closes ##2933
2021-10-06 18:19:34 +09:00
nicolas.dorier
08bd13b2cd
Make CanUseWebhooks more resilient 2021-10-06 11:25:21 +09:00
Andrew Camilleri
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
nicolas.dorier
156ddd24fa
Make CanUsePayjoinForTopUp more resilient 2021-10-05 15:47:57 +09:00
nicolas.dorier
cf2c147f4f
Bumping versions of libraries and dockerfile 2021-10-05 15:29:26 +09:00
nicolas.dorier
ce1903b2fa
Bumping versions of libraries and dockerfile 2021-10-05 15:26:40 +09:00
Andrew Camilleri
88c925017d Apply suggestions from code review 2021-10-04 17:06:11 +02:00
Kukks
a3c2a9ac61 Censor based on permissions 2021-10-04 17:06:11 +02:00
Dennis Reimann
802fec6bf3 Move payment related properties 2021-10-04 09:50:36 +02:00
nicolas.dorier
64901dfc22
Bump postgres 2021-09-29 13:16:53 +09:00
nicolas.dorier
edfde494fa
bump bitcoin core 2021-09-28 12:47:34 +09:00
nicolas.dorier
a3cc573e4d
Do not test hot reload in CanCreatePayRequest (unreliable) 2021-09-28 12:20:40 +09:00