Commit Graph

6540 Commits

Author SHA1 Message Date
nicolas.dorier
bd73cac1a1
Fix: For some asset pair the kraken rate was inverted (Fix #3957) 2022-07-11 23:09:35 +09:00
nicolas.dorier
0c43fda86d
Prevent stackoverflow exception when ripio is unavailable 2022-07-11 23:08:59 +09:00
Kukks
a64b8fb310
Update test plugin with more data related functionality 2022-07-11 11:29:57 +02:00
nicolas.dorier
316d39f24c
Update Changelog 2022-07-09 11:29:33 +09:00
nicolas.dorier
265e2930f1
bump 2022-07-08 16:54:35 +09:00
Nicolas Dorier
9511cf8d8a
Update changelog (#3913) 2022-07-08 16:53:41 +09:00
nicolas.dorier
b86f0a7d9c
Make BTCPay ssh key using safe algo 2022-07-08 16:32:43 +09:00
nicolas.dorier
19be847624
Do not use Renci.SSH in tests 2022-07-08 16:30:52 +09:00
nicolas.dorier
15e45ac4ec
Bump SSH.NET 2022-07-08 16:08:21 +09:00
nicolas.dorier
86572635df
Fix build 2022-07-08 16:05:40 +09:00
nicolas.dorier
4a5c51d7a3
Update sln 2022-07-08 12:43:11 +09:00
nicolas.dorier
8530cf3535
Make sure we do not expose lightning services if not admin 2022-07-08 12:42:36 +09:00
Nicolas Dorier
eec54831ef
Update lightning lib, on-chain balance shouldn't be lightmoney (#3945) 2022-07-08 10:55:26 +09:00
nicolas.dorier
a41e98910d
Update langs 2022-07-08 10:41:43 +09:00
Umar Bolatov
be985466a3
Add payouts docs link (#3942) 2022-07-08 10:27:04 +09:00
Umar Bolatov
98fb46957a
Add error message when invoice could not be created (#3943)
If user requested to create an invoice for a payment method which is not set up for their store we currently return a generic error. This PR updates the logic so that we return a more specific error in this case.

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

* Simplified things

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

* Finishing touches on spec

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

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

* WIP baby steps

* Added DB migration for CustodianAccountData

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

* WIP + early Kraken API client

* Moved service registration to proper location

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

* Kraken API Balances call is working

* Added asset balances to response

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

* Call to get the details of 1 specific custodian account

* Added permissions to swagger

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

* Removed unused file

* WIP + Moved files to better locations

* Updated docs

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

* Working API endpoints for Deposit + Trade + untested Withdraw

* Delete custodian account

* Trading works, better error handling, cleanup

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

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

* Better error handling when withdrawing to a wrong destination

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

* Added TODOs

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

* Added the new permissions to the API Keys UI

* Renamed KrakenClient to KrakenExchange

* WIP Kraken Config Form

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

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

* Updated withdrawal info docs

* First unit test

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

* Mock custodian and more exceptions

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

* More tests

* WIP more tests

* Greenfield API tests complete

* Added missing "Name" column

* Cleanup, TODOs and beginning of Kraken Tests

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

* Added 1st mocked Kraken API call: GetAssetBalancesAsync

* Added assert for bad config

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

* pr review club changes

* Make Kraken Custodian a plugin

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

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

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

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

* Fixed API permissions test

* Removed 2 TODOs

* Fixed unit test

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

* Fixed Kraken plugin build issues

* Added Kraken plugin to build

* WIP UI + config form

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

* Working form, but lacks refinement

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

* cleanup

* Minor cleanup, comments

* Working: Delete custodian account

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

* WIP viewing custodian account balances

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

* Minor UI fixes

* Removed broken link

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

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

* Added TODOs

* Now throwing BadConfigException if API key is invalid

* UI improvements

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

* Show fiat value for fiat assets

* Removed Kraken plugin so I can make a PR


Removed more Kraken files

* Add experimental route on UICustodianAccountsControllre

* Removed unneeded code

* Cleanup code

* Processed Nicolas' feedback

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

close #3909

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

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

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

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

* fix typo and make it simpler for now

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

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

* Make sure not to affect other flows

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

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

* General view updates

* Update admin details link

* Update view

* add missing check

* Refactor

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

* Refactor

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

* add receipt link to checkout and add tests

* add receipt  link to lnurl

* Use ReceiptOptions.Merge

* fix lnurl

* fix chrome

* remove i18n parameterization

* Fix swagger

* Update translations

* Fix warning

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

* Simplify approach, improve views and scripts

* Async tiles


Async tiles

* Add period for app sales

* Fix missing keypad view sales

* Fix after rebase

* Fix awaited call

* Fix build

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

* Wallet send wizard

* Wallet receive wizard

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

* Simplify approach, improve views and scripts

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

* fix badge
2022-07-01 13:26:00 +09:00
Kukks
4eabe91cee remove lnurl from crowdfund as per requests 2022-06-30 14:25:52 +02:00
Dennis Reimann
cf747f1e07 Fix missing refund flow error message
Fixes #3919.
2022-06-30 14:25:15 +02:00
Kukks
e5a1da7136
Fix: Refund flow failed when lnurl was the only payment method 2022-06-30 08:52:56 +02:00
Kukks
27b6cf436b
fix cheat mode when default payment is not onchain 2022-06-30 08:46:34 +02:00
Nicolas Dorier
e4866a8265
Can disable cert check for email server (#3908) 2022-06-29 23:38:44 +09:00
nicolas.dorier
d90cc02e5a
CI: Try docker-compose pull several times 2022-06-29 23:37:38 +09:00
nicolas.dorier
23a1a8e3f5
Add title on link of ln services in the dashboard 2022-06-29 23:31:25 +09:00
Andrew Camilleri
b8f1c0df09
Create interface for providing store id to plugins (#3910) 2022-06-29 23:18:02 +09:00