Commit Graph

1354 Commits

Author SHA1 Message Date
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