Commit Graph

1711 Commits

Author SHA1 Message Date
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
nicolas.dorier
44fe70ae44
Make CanCreatePayRequest more resilient 2021-09-28 12:05:46 +09:00
nicolas.dorier
d05a9295b3
Make a test more resilient 2021-09-28 11:22:35 +09:00
d11n
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
nicolas.dorier
bd6c7a8c3d
Properly handle InvoiceMetadata string properties (Fix #2906) 2021-09-27 11:44:55 +09:00
Andrew Camilleri
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
Nicolas Dorier
d0120f1427
Fix Selenium flakyness on Circle CI (#2904) 2021-09-22 21:31:44 +09:00
Umar Bolatov
d5c96eee32 Add test 2021-09-21 09:45:41 +02:00
Umar Bolatov
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
Umar Bolatov
b2f9353be1 Add tests 2021-09-16 07:29:18 +02:00
Kukks
bb6a188883 bump nbx in both docker compose envs 2021-09-16 07:19:54 +02:00
Kukks
f7099cf6aa Bump NBX and elements 2021-09-15 07:28:17 +02:00
d11n
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
nicolas.dorier
a8995d2bed
Fix unit test fail bc shitcoin 2021-09-10 15:35:51 +09:00
Nicolas Dorier
fc4e47cec6
Add CSP at the website level (#2863) 2021-09-09 21:51:28 +09:00
d11n
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
Andrew Camilleri
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
Manan Sharma
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
Dennis Reimann
1bca8c81a4 Fix Selenium test 2021-09-02 10:39:35 +02:00
Dennis Reimann
4d35fd4ab3 Fix test 2021-09-02 10:39:35 +02:00
Dennis Reimann
bcdb1ab1d8 Improve review/broadcast flow and fix test 2021-09-02 10:39:35 +02:00
d11n
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
Nicolas Dorier
101fc51787
Bump NBX (#2818) 2021-08-30 16:42:22 +09:00
nicolas.dorier
319efbeb4b
Bump c-lightning on docker-compose altcoins 2021-08-26 15:55:07 +09:00
nicolas.dorier
04e6833e22
Bump c-lightning on docker-compose altcoins 2021-08-26 14:44:57 +09:00
Kukks
ab7d2959ea Update clightning 2021-08-23 13:09:29 +02:00
Kukks
119ab7b2c0 attempt EnsureNewLightningInvoiceOnPartialPayment test fix 2021-08-23 12:34:36 +02:00
Kukks
7a102ee920 Bumpo Clightning to 0.10.1 2021-08-10 10:11:16 +02:00
Kukks
8451f34302 Revert "Bumpo Clightning to 0.10.1"
This reverts commit e4bd8e3106.
2021-08-10 09:31:14 +02:00
Kukks
e4bd8e3106 Bumpo Clightning to 0.10.1 2021-08-10 09:16:25 +02:00
Ayush Jain
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
Andrew Camilleri
060f30d0bf
Payouts: Unify confirm external payment and manually mark as paid actions (#2751) 2021-08-05 14:47:25 +09:00
Nicolas Dorier
f84b2c5160
Add proper error message if node/nbxplorer doesn't support taproot (#2752) 2021-08-05 13:56:31 +09:00
Kukks
59d0cf666f Update Clightning to altcoin compose too 2021-08-04 16:12:39 +02:00
Kukks
54cc574405 Update to Clightning 0.10.0 2021-08-04 15:02:24 +02:00
Nicolas Dorier
4c818d0359
Implement topup invoices (#2730) 2021-08-03 17:03:00 +09:00
d11n
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 8a1d5bbc57 and passes them through the confirm addresses form.

* Add test

This test fails on current master
2021-08-03 14:27:04 +09:00
nicolas.dorier
2207d836f1
Update NBXplorer again 2021-08-01 14:32:04 +09:00
rockstardev
a9cd27e012
Bumping LND to 0.13.1-beta (#2729) 2021-08-01 09:20:40 +09:00
Nicolas Dorier
4c57405945
Properly clip taxIncluded and invoice's amount (#2724) 2021-07-30 18:46:49 +09:00
Nicolas Dorier
6ea96efe68
Update NBitcoin, fix warnings on nullable (#2718) 2021-07-29 20:29:34 +09:00
Andrew Camilleri
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
Andrew Camilleri
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
Andrew Camilleri
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
Wouter Samaey
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
Kukks
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
dstrukt
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
cypherbeerus
a7f6bcf36c Updated status message when adding files and related test 2021-07-22 08:49:21 +02:00
Andrew Camilleri
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
Nicolas Dorier
73b461f8d0
Greenfield: add text search terms to an invoice (#2648) 2021-07-14 23:32:20 +09:00
Kukks
55cc32ce0f Fix new docker compose incompatibility 2021-07-08 12:53:47 +02:00
Nicolas Dorier
4bb3d60b6c
Add misc/permissions to document the hierarchical structure (#2654) 2021-07-08 14:34:10 +09:00
Wouter Samaey
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
Andrew Camilleri
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
Andrew Camilleri
cb2dd464f1
GreenField: Add StoreId to Invoice model (#2592) 2021-06-24 23:15:51 +09:00
d11n
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
Nicolas Dorier
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
nicolas.dorier
70f56d5920
Encrypt WalletSetupViewModel.Config 2021-06-17 19:26:50 +09:00
nicolas.dorier
8a1d5bbc57
Remove outdated code in UpdateWallet 2021-06-17 16:39:55 +09:00
nicolas.dorier
afd479ac69
Remove the DerivationSchemeViewmodel.Enabled property 2021-06-17 15:08:04 +09:00
nicolas.dorier
39a4be5641
Remove HintAddress 2021-06-17 14:11:01 +09:00
Kukks
ae329e371a fix link test 2021-06-14 11:32:35 +02:00
d11n
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
Andrew Camilleri
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
Bjarne Magnussen
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
Kukks
28da78fc78 Improve tests and small refactoring 2021-06-04 12:20:45 +02:00
Umar Bolatov
e943c55a91
Add basic tests for delete user endpoint 2021-06-02 20:02:31 -07:00
d11n
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
Nicolas Dorier
c551e5cd0a
Make sure to only select accounted payments where we should (#2523) 2021-05-14 16:16:19 +09:00
Andrew Camilleri
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
Andrew Camilleri
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
Andrew Camilleri
5fe3c1c61f
U2fremove (#2496)
* Remove U2F support and JS

* fix final changes

* fix more final stuff
2021-04-28 16:22:09 +09:00
Andrew Camilleri
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
Kukks
0888cc4f97 Fix: Add Fido2 log filter to tests 2021-04-27 08:18:01 +02:00
nicolas.dorier
dcc4214dcb
Make sure model binder error are returning error 422, use DateTimeOffsetModelBinder 2021-04-26 12:37:56 +09:00
Saker Omera
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
Dennis Reimann
0e3f6acb0a
Final tweaks and test fix 2021-04-20 12:23:50 +02:00
Dennis Reimann
bbe621109f
Lightning setup redesign 2021-04-20 12:09:27 +02:00
Dennis Reimann
aef06c7f61
Wording updates
Thanks @Zaxounette!
2021-04-20 09:09:32 +02:00
Nicolas Dorier
52be5746c6
Update BTCPayServer.Tests/SeleniumTester.cs
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-04-20 09:03:40 +02:00
Nicolas Dorier
85cf36ac4a
Update BTCPayServer.Tests/SeleniumTester.cs
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
2021-04-20 09:03:38 +02:00
Dennis Reimann
5fda21373e
Move enabling toggle to store overview 2021-04-20 09:03:37 +02:00
Andrew Camilleri
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
nicolas.dorier
315284d5f5
Fix typo of webhook events property 2021-04-20 12:36:20 +09:00
Jonathan Underwood
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
Nicolas Dorier
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
Andrew Camilleri
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
Andrew Camilleri
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
nicolas.dorier
98eee27b93
Remove warnings 2021-04-13 17:06:11 +09:00
nicolas.dorier
8ed853a3b3
Attempt to make selenium less flaky 2021-04-13 15:12:09 +09:00
d11n
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
Andrew Camilleri
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
xpayserver
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
d11n
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
Nicolas Dorier
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
nicolas.dorier
2497413c60
Fix test 2021-03-30 17:15:03 +09:00
nicolas.dorier
a6537ef282
Update lightning charge 2021-03-30 17:08:58 +09:00
rockstardev
52b5c56da9 Bumping LND to use the latest docker image 2021-03-26 08:52:17 -05:00
nicolas.dorier
068cfe5e3e
Decrease command timeout for selenium 2021-03-26 14:31:36 +09:00
nicolas.dorier
c0449a633d
Revert "Fix docker-compose for arm64 dev env"
This reverts commit 7dfce5e306.
2021-03-26 13:22:54 +09:00
nicolas.dorier
7dfce5e306
Fix docker-compose for arm64 dev env 2021-03-26 12:44:55 +09:00
Nicolas Dorier
fd53f7476e
Fix flaky test (#2392) 2021-03-24 21:33:49 +09:00
nicolas.dorier
d92ced6c6b
Make CanUsePayjoin2 more resilient 2021-03-24 14:18:54 +09:00
nicolas.dorier
0847088391
Make CanUsePayjoin2 more resilient 2021-03-24 13:55:46 +09:00
nicolas.dorier
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
nicolas.dorier
9b24e9378f
Explicitely disallow \ for in filename 2021-03-19 20:22:24 +09:00
nicolas.dorier
779f21a1ca
Make sure cookie are HttpOnly 2021-03-19 20:09:55 +09:00
nicolas.dorier
73d70aa5e5
Better validate file names 2021-03-19 18:55:21 +09:00
rockstardev
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
nicolas.dorier
d33bdfd50c
Make CanUseCoinSelection less flaky 2021-03-11 22:20:25 +09:00
nicolas.dorier
4f5392eb74
Fix test 2021-03-11 22:18:02 +09:00
nicolas.dorier
064087a7c0
fix test 2021-03-11 22:08:36 +09:00
Andrew Camilleri
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 2e0d256325.

* 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
rockstardev
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
Dennis Reimann
d36974a47e
Fix test 2021-03-02 12:26:19 +01:00
Dennis Reimann
28d7924077
Fix AltcoinTests 2021-03-02 12:26:17 +01:00
Dennis Reimann
2e2c9764f3
Remove old Stores.BTCLike controller 2021-03-02 12:26:14 +01:00
nicolas.dorier
e37b3179ba
Reactivate CanGetRateCryptoCurrenciesByDefault for DSH 2021-03-02 11:14:52 +09:00
Nicolas Dorier
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
Andrew Camilleri
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
Andrew Camilleri
e8df010449
Add redirectAutomatically to GreenField Invoice API (#2321) 2021-03-01 22:34:07 +09:00
Andrew Camilleri
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
Nicolas Dorier
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
Nicolas Dorier
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
Kukks
e3e65878aa
Allow invoice to be marked even when new
fixes #2019
2021-02-26 11:17:03 +09:00
d11n
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
Dennis Reimann
75c2fabd7f
Make Selenium test more robust
Fixes an issue similar to what we fixed in #2293.
2021-02-24 15:10:05 +01:00
raddev
64a8de938b
Update BTCPayServer.Tests/README.md
Co-authored-by: Pavlenex <pavle@pavle.org>
2021-02-24 15:09:45 +01:00
radWorx
605cf407a8
Update README.md
Update README.md #2210
2021-02-24 15:06:16 +01:00
radWorx
9ed5297e91
Update README.md
Using Polar to test Lightning payments.
2021-02-24 15:06:15 +01:00
Dennis Reimann
4d5b2c4033
Make Selenium test more robust
Fixes an issue similar to what we fixed in #2293.
2021-02-23 16:57:21 +01:00
Pavlenex
2fd8c831c0
Merge pull request #2210 from radWorx/dev-with-polar
Update README.md
2021-02-22 10:22:16 +01:00
Dennis Reimann
dfbec71906
PoS: Add test for custom buy button text 2021-02-18 12:20:27 +01:00
Dennis Reimann
1e902c8dee
Tests: Toggle advanced settings via JS instead 2021-02-17 15:54:05 +01:00
Dennis Reimann
db5f64432e
Tests: Wait for advanced settings closing animation 2021-02-17 12:34:58 +01:00
d11n
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
radWorx
deb88032cb Update README.md
added missing space,
moved below Using the test lightning-cli
2021-02-15 15:15:38 -05:00
nicolas.dorier
2e864c32fa
Profile email change should check email's availability 2021-02-12 12:48:05 +09:00
d11n
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
Dennis Reimann
f223d2e00c
Add Specter wallet file import
Closes #2223.
2021-02-03 16:36:45 +01:00
rockstardev
5288198474 Updating connection to merchant_lnd for tests 2021-02-01 01:37:58 -06:00
rockstardev
b21353c4f9 Updating LND in altcoins docker file as well 2021-02-01 01:37:12 -06:00
rockstardev
65a0c6a4b3 Updating development LND to v0.12.0-beta 2021-02-01 00:55:13 -06:00
Nicolas Dorier
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
Dennis Reimann
98a1b0da71
Update public account URLs
- /Account/Login -> /login
- /Account/Register -> /register
- /Account/ForgotPassword -> /forgot-password
2021-01-28 10:08:22 +01:00
Nicolas Dorier
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
Dennis Reimann
b75409a6bf
Remove Firefox as option for Selenium tests 2021-01-27 09:35:14 +01:00
Nicolas Dorier
db0854f203
Update NBitcoin, NetworkType => ChainName, signet support (#2224) 2021-01-27 14:39:38 +09:00
Nicolas Dorier
994301ea4c
Bump Bitcoin Core and NBXPlorer (#2222) 2021-01-26 21:01:32 +09:00
Dennis Reimann
5e344b9be7
Fix missing user secrets code 2021-01-26 10:22:17 +01:00
Dennis Reimann
71bb876c9e
Configure browser settings with user secrets
Default to headless Chrome
2021-01-25 17:23:08 +01:00
Dennis Reimann
1e029f3290
Fix EthereumTests 2021-01-25 16:49:20 +01:00
Dennis Reimann
7926b689fd
Default to headless, add Firefox, update Chrome 2021-01-25 15:01:53 +01:00
Dennis Reimann
8bea1505dd
Cleanups, remove WaitForPageLoad hack 2021-01-25 14:10:40 +01:00
Dennis Reimann
e567f7a80c
Refactor tests
Remove the hacky `ScrollTo`, `ForceClick` and `WaitForElement`.
Add the hacky `WaitForPageLoad`.
2021-01-25 13:04:58 +01:00