Commit Graph

102 Commits

Author SHA1 Message Date
Andrew Camilleri
cb25c225e9
Remove custodians (#5863)
* Remove custodians

* Hide Experimental checkbox in the server policies

---------

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2024-03-29 00:28:27 +09:00
d11n
6290b0f3bf
Admins can approve registered users (#5647)
* Users list: Cleanups

* Policies: Flip registration settings

* Policies: Add RequireUserApproval setting

* Add approval to user

* Require approval on login and for API key

* API handling

* AccountController cleanups

* Test fix

* Apply suggestions from code review

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>

* Add missing imports

* Communicate login requirements to user on account creation

* Add login requirements to basic auth handler

* Cleanups and test fix

* Encapsulate approval logic in user service and log approval changes

* Send follow up "Account approved" email

Closes #5656.

* Add notification for admins

* Fix creating a user via the admin view

* Update list: Unify flags into status column, add approve action

* Adjust "Resend email" wording

* Incorporate feedback from code review

* Remove duplicate test server policy reset

---------

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2024-01-31 14:45:54 +09:00
Andrew Camilleri
6324a1a1e8
Remove bittrex (#5553)
* Remove bittrex

* Test fix

---------

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2023-12-12 17:38:28 +01:00
d11n
92b556e54f
Load debug plugins in tests (#4555)
Equivalent to the loading code in Program.cs
2023-01-24 20:12:47 +09:00
nicolas.dorier
2ba24ba56b
Tests should use explorer.postgres 2022-07-05 14:39:50 +09:00
nicolas.dorier
67eeb4b69a
Allow resolution of any settings via DI 2022-05-24 14:10:19 +09:00
nicolas.dorier
3285f24fe9
Add experimental mode 2022-05-23 10:46:51 +09:00
Andrew Camilleri
76a6d94bbe
Exchange api no kraken (#3679)
* WIP New APIs for dealing with custodians/exchanges

* Simplified things

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

* Finishing touches on spec

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

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

* WIP baby steps

* Added DB migration for CustodianAccountData

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

* WIP + early Kraken API client

* Moved service registration to proper location

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

* Kraken API Balances call is working

* Added asset balances to response

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

* Call to get the details of 1 specific custodian account

* Added permissions to swagger

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

* Removed unused file

* WIP + Moved files to better locations

* Updated docs

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

* Working API endpoints for Deposit + Trade + untested Withdraw

* Delete custodian account

* Trading works, better error handling, cleanup

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

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

* Better error handling when withdrawing to a wrong destination

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

* Added TODOs

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

* Added the new permissions to the API Keys UI

* Renamed KrakenClient to KrakenExchange

* WIP Kraken Config Form

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

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

* Updated withdrawal info docs

* First unit test

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

* Mock custodian and more exceptions

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

* More tests

* WIP more tests

* Greenfield API tests complete

* Added missing "Name" column

* Cleanup, TODOs and beginning of Kraken Tests

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

* Added 1st mocked Kraken API call: GetAssetBalancesAsync

* Added assert for bad config

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

* pr review club changes

* Make Kraken Custodian a plugin

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

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

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

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

* Fixed API permissions test

* Removed 2 TODOs

* Fixed unit test

* Remove Kraken Api as it should be separate opt-in plugin

* Flatten namespace hierarchy and use InnerExeption instead of OriginalException

* Remove useless line

* Make sure account is from a specific store

* Proper error if custodian code not found

* Remove various warnings

* Remove various warnings

* Handle CustodianApiException through an exception filter

* Store custodian-account blob directly

* Remove duplications, transform methods into property

* Improve docs tags

* Make sure the custodianCode saved is canonical

* Fix test

Co-authored-by: Wouter Samaey <wouter.samaey@storefront.be>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-05-18 14:59:56 +09:00
nicolas.dorier
50d4b55f73
Warning if not using 'simple using' 2022-01-14 17:50:29 +09:00
nicolas.dorier
35aad4ebf9
Remove Logs static singletons 2021-11-23 13:55:34 +09:00
Nicolas Dorier
4cf3249e0b
Add ability to set default currency for a store (#2998) 2021-10-20 23:17:40 +09:00
Nicolas Dorier
d7a7382d00
Introduce cheat mode (#2965) 2021-10-11 12:32:09 +09:00
Nicolas Dorier
fc4e47cec6
Add CSP at the website level (#2863) 2021-09-09 21:51:28 +09:00
Kukks
0888cc4f97 Fix: Add Fido2 log filter to tests 2021-04-27 08:18:01 +02: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
Nicolas Dorier
db0854f203
Update NBitcoin, NetworkType => ChainName, signet support (#2224) 2021-01-27 14:39:38 +09:00
Kukks
179520a211 Plugins: Allow creation of independent DbContexts
This allows plugins to create custom dbcontexts, which would be namespaced in the scheme with a prefix. Migrations are supported too and the table would be prefixed too
2020-11-18 12:27:26 +01:00
Mike Olthoff
ef3f314754
Remove QuadrigaCX references (#2021)
* Remove QuadrigaCX references

Quadriga has been dead for years. I've removed the references to them and replaced them with a different Canadian exchange (ndax) for example. 

The whole set of instructions could probably use an overhaul, but for now, at least let's get rid of Gerry's presence.

* Remove Quadriga from tests too

Co-authored-by: Kukks <evilkukka@gmail.com>
2020-11-02 13:10:55 +01:00
XPayServer
de755ac0bb Add Ethereum & ERC20 Support
Add Tests
Add Index, XPub to payment data
Add Note on local ETH node
Fix Sync Summary and Race Condition
2020-09-09 08:19:10 +02:00
rockstardev
f88c02cccd Removing unused usings, readonly fields where possible 2020-06-28 22:07:48 -05:00
rockstardev
b6c7af32de Cleaning up bom from cs files 2020-06-28 21:44:35 -05:00
nicolas.dorier
51514252b6
Run dotnet format 2020-06-28 17:55:27 +09:00
nicolas.dorier
5e8b379c50
Add invoice refund 2020-06-25 15:31:46 +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
nicolas.dorier
ba2184e21a
Do not remove outputs in payjoin tx 2020-04-07 15:10:19 +09:00
nicolas.dorier
1e0587af26
Make sure tests use fixed fees 2020-04-06 19:18:49 +09:00
Kukks
b54a7b80e3 add tests and fix 2020-03-20 09:31:22 +01:00
nicolas.dorier
2105b44610
Make sure the create user is respecting the disable-registration settings 2020-03-19 13:30:53 +09:00
nicolas.dorier
2e630ac5d8
WaitSiteIsOperational should only wait full sync 2020-03-10 17:24:38 +09:00
Andrew Camilleri
276a9a95f9
Remove OpenIddict (#1244) 2020-02-25 00:40:04 +09:00
nicolas.dorier
a8ac01cd8b
Refactor rate handling to prevent error of exchange name 2020-01-17 18:11:05 +09:00
nicolas.dorier
5dbdb4b399
Keep coinaverage compatibility, improve UX, hardcode feed provider supported exchanges 2020-01-13 23:37:01 +09:00
Kukks
58d9a48787
CoinGecko Rate Provider
The CoinGecko rate provider is similar to the bitcoin average one, in that you can ask it for a rate from its aggregated sourcing or you can get rates from specific exchanges. I've added support for both.
I haven't integrated it or replaced coinaverage just to see if we should use it as the default and switch everyone to it or what other action to take.
2020-01-13 20:20:00 +09:00
Nicolas Dorier
f12186e09f
The tests in btcpayserver should use only the services they use (#1233) 2019-12-24 18:11:21 +09:00
Andrew Camilleri
4d7480db15 Liquid & Liquid Assets Support (#1118) 2019-12-24 16:20:44 +09:00
nicolas.dorier
84fe14a1ed
Test LND Seed Backup service and Logs. Use the Confirm View instead of poppup 2019-11-16 14:06:37 +09:00
nicolas.dorier
e92a15e072
Add logs to find out if tests hang on website getting operational 2019-11-13 15:24:56 +09:00
nicolas.dorier
9d3026f676
Add torrc files in tests 2019-11-08 16:10:49 +09:00
nicolas.dorier
aad586232c
Refactor StatusMessage and remove ExternalLogin 2019-10-31 14:11:33 +09:00
nicolas.dorier
3c9b58916b
Update to OpenIddict3.0 2019-10-18 19:02:23 +09:00
nicolas.dorier
281a2461ad
Refactor authorizations 2019-10-14 00:24:41 +09:00
nicolas.dorier
fda6a1a77b
Use ClaimTransformer instead of Authentication's JWT 2019-10-10 19:46:29 +09:00
nicolas.dorier
39876dea07
Use random ports in container tests 2019-10-07 16:25:27 +09:00
nicolas.dorier
1c9a91140b
Asyncify tests 2019-10-07 16:04:25 +09:00
nicolas.dorier
a919d3ddec
Move TryGetSolutionDirectoryInfo in test utils 2019-10-06 23:38:57 +09:00
nicolas.dorier
724a5b5460
Prepare code to move to netcoreapp3.0 2019-10-04 17:17:11 +09:00
nicolas.dorier
411fe90b8c
Can compile tests in netcoreapp3.0 2019-10-03 18:25:07 +09:00
Andrew Camilleri
d66b111121 xmr (#1044) 2019-09-30 17:32:43 +09:00
nicolas.dorier
11730cbae6
Add sshd service so we can test SSH stuff as well 2019-09-06 16:51:49 +09:00
nicolas.dorier
e45f1afd51
Small rewrite of condition 2019-08-20 16:12:18 +09:00