Commit Graph

992 Commits

Author SHA1 Message Date
Dennis Reimann
6043b7c75d
Minor fix ups
Resolves https://github.com/btcpayserver/btcpayserver/pull/1633#discussion_r435655010
2020-06-05 11:38:55 +02:00
Dennis Reimann
67758609a7
Add Onion-Location HTTP header
Closes #1626.
2020-06-04 08:53:55 +02:00
Kukks
340ba5c714 fix symbol 2020-06-01 08:13:39 +02:00
Kukks
284e66c730 fix test 2020-05-31 20:54:50 +02:00
Kukks
587f244f1d Remove dependency on Common from Rating
replaces #1591 and #1592 , closes #1571 Replaces the Currencies.txt to a json format which includes the networks too ( there is also a test to check now) Also makes CurrencyPair not depend on network and instead use CurrencyNameTable
2020-05-31 20:54:50 +02:00
Nicolas Dorier
ebc99adc58
Merge pull request #1615 from NicolasDorier/refactor/timespan
Always use second based TimeSpan in Greenfield
2020-05-31 10:55:40 +09:00
nicolas.dorier
048dff7e9e
Always use second based TimeSpan in Greenfield 2020-05-31 08:52:32 +09:00
Nicolas Dorier
a70934938a
Merge pull request #1605 from dennisreimann/pos-refactoring
Point of Sale Refactoring
2020-05-30 13:14:50 +09:00
Dennis Reimann
9e315f99d0
POS: Updates from code review 2020-05-28 12:50:08 +02:00
Kukks
16ad3ee7fe Add test for payment request payment status update in greenfield 2020-05-28 09:48:47 +02:00
Dennis Reimann
559015c70d
POS: Test fixes 2020-05-28 09:40:34 +02:00
Dennis Reimann
58f56eac90
POS: Updates from code review
Thanks @kukks
2020-05-27 14:20:21 +02:00
Dennis Reimann
b7ec22ee89
POS: Set ViewType via optional URL parameter
Falls back to the DefaultView defined in the POS settings.

POS: Fix POST-Route
2020-05-26 21:53:22 +02:00
Dennis Reimann
fad53a9fa2
POS: Replace EnableShoppingCart with DefaultView 2020-05-26 16:48:47 +02:00
Kukks
c8f182f13f Rename Coldcard to Electrum/Airgapped hardware wallets
Also adds support to read the xpub from the file directly ( Cobo Vault support)
2020-05-25 15:49:44 +02:00
nicolas.dorier
7e5d269c39
Remove LedgerWallet direct integration 2020-05-25 07:41:30 +09:00
nicolas.dorier
cccf3ca617
The signing context should not be passed to PSBT screen 2020-05-25 07:05:01 +09:00
nicolas.dorier
35432d919c
Refactor common data structure for wallet into SigningContext 2020-05-25 06:29:06 +09:00
nicolas.dorier
25e6f82aa3
Refactor parameter passing in wallet functions 2020-05-25 04:55:28 +09:00
nicolas.dorier
d22993871f
Bump NBXplorer 2020-05-24 20:19:06 +09:00
Nicolas Dorier
b5102c4269
Bump NBX (#1595) 2020-05-24 17:59:43 +09:00
Andrew Camilleri
cdf6886c39
Require loggedin user for docs? (#1567)
* Require loggedin user for docs?

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

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

* Update StoreBaseData.cs

* fix api

* fix swagger
2020-05-24 04:13:18 +09:00
nicolas.dorier
bfba105aec
Update packages (may fix #1590) 2020-05-22 19:23:37 +09:00
Andrew Camilleri
5033cb3186
Support specifying payment method through apps (#1539)
* Support specifying payment method through apps

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

* make code cleaner

* Add Test

* fix test

* fix test
2020-05-20 03:54:24 +09:00
nicolas.dorier
1d092a15fb
Refactor server info data structure 2020-05-20 03:27:06 +09:00
Kukks
b9006e4417 fix rebase
# Conflicts:
#	BTCPayServer.Tests/GreenfieldAPITests.cs
2020-05-19 20:09:19 +02:00
Andrew Camilleri
5b3b96b372
GreenField: Payment Requests CRUD (#1430)
* GreenField: Payment Requests CRUD

* fixes

* fix swagger

* fix swag

* rebase fixes

* Add new permissions for payment requests

* Adapt PR to archive

* fix tst

* add to contains policxy

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

* do not register decimal json converter as global

* fix cultureinfo for json covnerter

* pr changes

* add json convertet test

* fix json test

* fix rebase
2020-05-20 02:59:23 +09:00
Nicolas Dorier
338a0f9251
Merge pull request #1576 from dennisreimann/api-server-info
GreenField: Add Server Info API basics
2020-05-20 02:31:16 +09:00
nicolas.dorier
b96e668dfd
Sync payjoin receiver implementation to the bip 2020-05-19 20:57:04 +09:00
nicolas.dorier
de3753d04e
Rename payjoin optional parameters, implement sender minFeeRate 2020-05-19 20:57:03 +09:00
Dennis Reimann
3b6dbe76c5
Add sync state 2020-05-18 16:02:15 +02:00
Dennis Reimann
e3b348b55c
GreenField: Add Server Info API basics 2020-05-18 15:29:04 +02:00
Nicolas Dorier
8d1ff01ee8
Adapt payjoin implementation to the BIP (#1569) 2020-05-17 05:07:24 +09:00
rockstardev
e9bda50054 Bumping LND to v0.9.2-beta in dev 2020-05-13 18:06:14 -05:00
Nicolas Dorier
5a9d1e3257
Merge pull request #1560 from Kukks/archive-pr
Archive Payment reqeusts
2020-05-10 00:51:59 +09:00
Nicolas Dorier
9cc9a16bb9
Merge pull request #1556 from Kukks/invoice-archive
Archive Invoice
2020-05-10 00:51:11 +09:00
Nicolas Dorier
a3efe9a9dc
Merge pull request #1561 from NicolasDorier/bp/new
Refactoring of payjoin to support new spec
2020-05-10 00:50:40 +09:00
Kukks
94b0b9498d adapt tests 2020-05-09 15:17:59 +02:00
Kukks
bb322d6bf3 add e2e test 2020-05-09 15:05:52 +02:00
nicolas.dorier
b0f820e95a
Implement noadjustfee, feebumpindex and v parameters for payjoin 2020-05-09 21:22:00 +09:00
Andrew Camilleri
2bc7fa0316
Show warning when enabling Payjoin but supported payment methods are not using a hot wallet (#1545)
* Show warning when enabling Payjoin but supported payment methods are not using a hot wallet

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

* expose p2p port
2020-05-08 05:37:10 +09:00
nicolas.dorier
87352f0b62
Make sure wallet support decimal fee, and allow user to select different fee rate based on expected confirmation time 2020-05-05 19:10:53 +09:00
nicolas.dorier
9d2cd46464
fix tests and bump 2020-05-05 07:23:00 +09:00
nicolas.dorier
96c04481da
bump NBXplorer 2020-05-05 06:55:19 +09:00
nicolas.dorier
dad2642fa7
Make sure we match the user's sequence 2020-05-05 04:45:10 +09:00
Andrew Camilleri
67da6ee379
Decimal precision and filter valid transaction (#1538)
The liquid transactions list was showing all transactions to the wallet, even when it had nothing to do with the specific crypto code (e.g sending LBTC txs in USDT, LCAD in USDT, etc). This PR fixes that.

It also uses the previously introduced checkout decimal precision fix to the Wallets screen, specifically the balance amount on wallet llist and balance change on transaction list.
2020-05-04 01:04:34 +09:00
Nicolas Dorier
5312bb1dee
Merge pull request #1535 from Kukks/elementsbump
Bump elements and fix test
2020-05-02 20:47:22 +09:00
nicolas.dorier
bf6f5aa335
Bump c-lightning 2020-05-02 20:33:55 +09:00
Kukks
4a58763f98 Bump elements and fix test 2020-05-02 13:26:55 +02:00
Nicolas Dorier
edfc82ac75
Merge pull request #1522 from Kukks/view-seed
Add View seed to wallet settings
2020-05-01 21:36:27 +09:00
nicolas.dorier
b28fc85974
Fix: Do not returns HTML content if authentication to API fails 2020-05-01 21:33:42 +09:00
Kukks
ab1b36bcdc add test for view seed 2020-05-01 13:34:11 +02:00
Andrew Camilleri
b31fb1a269
Auto label utxos based on invoice and payjoin (#1499)
* Auto label utxos based on invoice and payjoin

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

* wip

* wip

* support in coinselection

* remove ugly hack

* support wallet transactions page

* remove messy loop

* better label template helpers

* add tests and susbcribe to event

* simplify data

* fix test

* fix label  + color

* fix remove label

* renove useless call

* add toString

* fix potential crash by txid

* trim json keyword in manual label

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

* wip

* wip

* Add test and fix seelctor

* remove space

* review changes

* revert back to index check
2020-04-28 01:28:21 +09:00
Andrew Camilleri
c784144a07
Greenfield: Add update store API (#1495)
* Greenfield: Add update store API

* update update store model

* change greenfield controller name to stop conflict
2020-04-27 20:13:20 +09:00
Evan Kaloudis
e68b45c76a
Update lightning-charge to v0.4.19 (#1511)
Changes the default units from mBTC to sats
2020-04-27 18:44:12 +09:00
nicolas.dorier
7e0f9e1d28
Fix docker-customer-lightning-cli.ps1 pay doesn't work (Fix #1509) 2020-04-27 03:59:16 +09:00
nicolas.dorier
18e181bb9f
Bump lightning library, logs channel setup 2020-04-27 03:53:45 +09:00
nicolas.dorier
79c70b31a3
Fix tests 2020-04-26 01:47:47 +09:00
Kukks
a5df029d43 update test to loop through all formats for payjoin 2020-04-25 17:38:04 +02:00
Kukks
4be6c06af5 add payjoin e2e test for all compatible formats 2020-04-25 16:12:16 +02:00
Nicolas Dorier
7adaa146dc
Merge pull request #1471 from dennisreimann/api-health-endpoint
GreenField: Add health check endpoint
2020-04-23 02:44:11 +09:00
Kukks
e64094dfcc fix permissions for client api tester 2020-04-22 15:12:38 +02:00
Kukks
cb6fcadb86 add scope test 2020-04-22 15:05:13 +02:00
Kukks
aeef160d0b separate store swagger 2020-04-22 15:05:13 +02:00
Kukks
34c1a304a9 Add Create Store 2020-04-22 15:05:13 +02:00
Kukks
4f1ae4733c remove store api 2020-04-22 15:05:13 +02:00
Kukks
e009c1a25a Fixing CheckNoDeadLink test now that btse blocks our call from circleci 2020-04-22 15:05:13 +02:00
Kukks
deb197cfa5 GreenField: Get Stores 2020-04-22 15:05:13 +02:00
Dennis Reimann
70d1056d48
API: Health endpoint returns synchronized state 2020-04-21 16:29:54 +02:00
Dennis Reimann
3bd5c3e1b5
API: Add health check endpoint 2020-04-21 14:59:33 +02:00
Nicolas Dorier
778bf97079
Merge pull request #1478 from dennisreimann/assert-link-not-dead
Improve AssertLinkNotDead test output in case of exception
2020-04-19 03:10:45 +09:00
Dennis Reimann
03d1f98402
Improve AssertLinkNotDead test output in case of exception
If the test fails with an exception other than the `EqualException` the failed URL isn't logged. This general exception handler takes care of e.g. `HttpRequestException` and reports the URL that failed to be checked.

Stumbled upon this while checking why [this test run](https://app.circleci.com/pipelines/github/btcpayserver/btcpayserver/2934/workflows/0525d9fd-e4de-49dc-957b-d98b16a9abd4/jobs/7199/parallel-runs/0/steps/0-102) fails.
2020-04-18 19:33:53 +02:00
Kukks
b470ce2dad fix p2sh test error codes 2020-04-18 08:09:49 +02:00
nicolas.dorier
42be03b560
bump nbx and nbitcoin 2020-04-16 19:37:10 +09:00
nicolas.dorier
c73c34dfaa
Persisting locked input and outpoints 2020-04-13 16:06:07 +09:00
nicolas.dorier
a3a9361ba5
Persist the Delayed Broadcaster 2020-04-13 16:00:33 +09:00
Nicolas Dorier
6bfb6a795e
Merge pull request #1462 from NicolasDorier/improve-ux-hotwallet
Do not ask for address confirmation if a new wallet is generated
2020-04-13 13:55:34 +09:00
nicolas.dorier
1d2540543b
Payjoin: Randomly round the payment output if it is one input tx 2020-04-13 13:34:23 +09:00
nicolas.dorier
9efe6267d3
Do not ask for address confirmation if a new wallet is generated 2020-04-13 13:03:55 +09:00
Nicolas Dorier
b0073af5aa
Merge pull request #1408 from Kukks/api/api-key-uu-refactor
Refactor UI for Add APIKey/Authorize
2020-04-10 22:00:32 +09:00
Kukks
ad284a4b61 Refactor UI for Add APIKey/Authorize 2020-04-10 09:49:01 +02:00
Kukks
95e7d5ded9 fix tests 2020-04-10 09:18:08 +02:00
nicolas.dorier
e3f6de8472
Remove warnings, replace BIP79 by Payjoin, Fix strange error in Accept loop 2020-04-09 20:25:17 +09:00
nicolas.dorier
0d821ff4db
Connection: close when using the internal proxy, fix gateway errors with connections in limbo 2020-04-09 18:49:30 +09:00
nicolas.dorier
6927d81175
Implement Http Tor proxy as a internal http proxy 2020-04-09 17:38:55 +09:00
Andrew Camilleri
e183714475
Add Tor Http Client Factory (#1445)
* WIP: Add Tor Http Client Factory

This PR adds a Tor Http Client Factory so that we can do HTTP requests over socks5( which we usually use tor's socks5).
Using it for payjoin when possible.

Currently have an issue where a 503 is always returned.  Must be something wrong with my tor config or the socks proxy lib Im using

* fix

* remove external dependency

* make payjoin client use tor client if available

* fix docker test

* use tor client only if available and necessary

* remove bip 79 mention
2020-04-08 22:40:41 +09:00
Kukks
3bf1b78b33 fix 2020-04-08 14:32:29 +02:00
Kukks
751ccc333f make test less slimfy 2020-04-08 14:32:29 +02:00
Kukks
624e6e4744 adapt 2020-04-08 14:32:29 +02:00
Kukks
73b13c750d add P2sh support 2020-04-08 14:32:29 +02:00
Kukks
148b04e9ba allow changing the payjoin key easily later 2020-04-08 14:32:29 +02:00
Kukks
32938479ac WIP: Payjoin: P2SH support 2020-04-08 14:32:29 +02:00
Nicolas Dorier
d7bb15cac3
Merge pull request #1442 from dennisreimann/docker-bitcoin-generate-shell-script
Add bitcoin generate shell script
2020-04-08 21:22:47 +09:00
Nicolas Dorier
9a54445785
Merge pull request #1439 from Kukks/monero-fix
monero fixes
2020-04-08 21:11:27 +09:00
nicolas.dorier
24691e5290
Bump NBitcoin and NBX 2020-04-08 19:34:12 +09:00
nicolas.dorier
f4a47f5197
Deterministically sort the UTXOs to select 2020-04-08 13:46:11 +09:00
Dennis Reimann
fe45152529
Add bitcoin generate shell script
The shell equivalent to the existing powershell script.
2020-04-07 18:13:47 +02:00
nicolas.dorier
9d2ab8b154
The payjoin receiver can inject a fake change 2020-04-07 18:14:31 +09:00
nicolas.dorier
ba2184e21a
Do not remove outputs in payjoin tx 2020-04-07 15:10:19 +09:00
Kukks
452568e740 monero fixes 2020-04-06 16:12:48 +02:00
nicolas.dorier
69ad9edc9a
Check pj with 1 sat/b 2020-04-06 20:26:50 +09:00
nicolas.dorier
1e0587af26
Make sure tests use fixed fees 2020-04-06 19:18:49 +09:00
Nicolas Dorier
79a0f97abb
Merge pull request #1432 from Kukks/api/permission-blob
GreenField: Switch to Blob for API Keys
2020-04-06 17:42:32 +09:00
nicolas.dorier
4c966e2a09
Refactor the detection of the payjoin payment 2020-04-05 22:44:34 +09:00
nicolas.dorier
42aead3c89
A replacement payment should have the same fee as the replaced one 2020-04-05 20:48:00 +09:00
nicolas.dorier
a348960041
Make CanChangeNetworkFeeMode more resilient 2020-04-05 20:00:28 +09:00
nicolas.dorier
c737a25234
Add logs to test CanChangeNetworkFeeMode 2020-04-05 18:54:12 +09:00
nicolas.dorier
a01b2e4a83
Small optimization for faster AddDerivationScheme 2020-04-05 18:35:29 +09:00
Nicolas Dorier
5f838db281
Merge pull request #1431 from Kukks/api/merge-multiple-swagger
Swagger Generator: Merge multiple documents
2020-04-05 17:36:04 +09:00
Kukks
76b919d887 make swagger test use live endpoint 2020-04-05 09:43:49 +02:00
Nicolas Dorier
963c69a0e0
Merge pull request #1321 from Kukks/bpu
BIP79
2020-04-05 12:10:55 +09:00
nicolas.dorier
fd026a9733
Refactor server-side 2020-04-05 12:02:36 +09:00
Kukks
c6d75de3d7 GreenField: Switch to Blob for API Keys 2020-04-02 09:32:22 +02:00
Kukks
49786f4195 add bitpay to blacklist 2020-03-31 11:13:22 +02:00
rockstardev
7b6eae6053 Fixing CheckNoDeadLink test now that btse blocks our call from circleci 2020-03-31 11:12:01 +02:00
Kukks
4d2e59e1a1 Change flow of payjoin in wallet + fix tests 2020-03-30 13:27:04 +02:00
Kukks
ff9865c516 fix tor docker 2020-03-27 10:45:13 +01:00
Kukks
886510c2e1 remove tor for now 2020-03-27 10:45:13 +01:00
Kukks
d90ffb2254 move payjoin settings to store settings from checkout experience 2020-03-27 10:45:13 +01:00
Kukks
fc88a867fa try fix test 2020-03-27 10:45:13 +01:00
Kukks
1a62ee9260 try fix tor socks5 connection 2020-03-27 10:45:12 +01:00
Kukks
2e3a0706ee RBF Protection & Handling 2020-03-27 10:45:12 +01:00
Kukks
89da4184ff BIP79 Support 2020-03-27 10:45:12 +01:00
nicolas.dorier
6d7b57ea3b
A api key can always revoke itself, add a route to delete any api key 2020-03-27 14:46:51 +09:00
nicolas.dorier
39a8c3fe47
GreenField: Create API Key 2020-03-27 14:17:31 +09:00
nicolas.dorier
08abda1522
Restrict authentication to the APIController to GreenFieldAPIKeys 2020-03-27 13:34:03 +09:00
nicolas.dorier
ac14f199e4
Renaming GreenField classes 2020-03-27 12:55:21 +09:00
Nicolas Dorier
c633402fe2
Merge pull request #1410 from Kukks/coin-selection-fix
fix coin selection
2020-03-26 01:08:53 +09:00
nicolas.dorier
0688feea3c
Fix docker files 2020-03-26 00:57:54 +09:00
nicolas.dorier
c906fd42df
Add bitflyer direct integration 2020-03-26 00:48:01 +09:00
Kukks
6468b39121 try fix test again 2020-03-25 14:11:38 +01:00
Kukks
d0a95f5a69 fix coin selection 2020-03-25 14:11:38 +01:00
Nicolas Dorier
e36338d903
Merge pull request #1403 from Kukks/basic-auth
Greenfield API: Basic Auth
2020-03-25 21:00:14 +09:00
Kukks
91924512e6 Fix Link checker test 2020-03-24 08:00:47 +01:00
Kukks
7899c2d5c5 fix test 2020-03-23 21:18:40 +01:00
nicolas.dorier
d57fdd4785
Remove useless delay in tests 2020-03-23 17:19:19 +09:00
nicolas.dorier
805e1f53b3
Test Wallet Receive, Send with NBX, Coin selection 2020-03-23 15:46:54 +09:00
rockstardev
f3d5cf3622 Additional logging and tweaking for CanManageWallet test 2020-03-21 12:23:02 -05:00
Kukks
e48e8c34d9 fix tst 2020-03-20 17:59:14 +01:00
Kukks
98a48cd0a5 fix swagger validation test 2020-03-20 17:37:39 +01:00
Kukks
f8f358ebdb add to client, fix tests and doc 2020-03-20 17:14:47 +01:00
nicolas.dorier
7e7f0053e2
Improve documentation 2020-03-20 20:25:10 +09:00
nicolas.dorier
9a940a044e
Fix tests 2020-03-20 20:00:30 +09:00
nicolas.dorier
53e7c84e73
Fix tests 2020-03-20 18:56:30 +09:00
Nicolas Dorier
2a865284da
Merge pull request #1402 from Kukks/liquid-assets-divisibility
Fix liquid asset BIP21 decimal precision
2020-03-20 18:39:05 +09:00
nicolas.dorier
4666238e38
Fix build 2020-03-20 18:38:21 +09:00
Kukks
b54a7b80e3 add tests and fix 2020-03-20 09:31:22 +01:00
nicolas.dorier
fb36ed2cae
Fix tests 2020-03-20 14:07:42 +09:00