exchanges/engine: Add multichain deposit/withdrawal support (#794)

* Add exchange multichain support

* Start tidying up

* Add multichain transfer support for Bitfinex and fix poloniex bug

* Add Coinbene multichain support

* Start adjusting the deposit address manager

* Fix deposit tests and further enhancements

* Cleanup

* Add bypass flag, expand tests plus error coverage for Huobi

Adjust helpers

* Address nitterinos

* BFX wd changes

* Address nitterinos

* Minor fixes rebasing on master

* Fix BFX acceptableMethods test

* Add some TO-DOs for 2 tests WRT races

* Fix acceptableMethods test round 2

* Address nitterinos
This commit is contained in:
Adrian Gallagher
2021-10-15 15:55:38 +11:00
committed by GitHub
parent b093a7df19
commit 0c00b7e1df
145 changed files with 46329 additions and 5507 deletions

View File

@@ -9,7 +9,6 @@ import (
"time"
"github.com/thrasher-corp/gocryptotrader/config"
"github.com/thrasher-corp/gocryptotrader/core"
"github.com/thrasher-corp/gocryptotrader/currency"
exchange "github.com/thrasher-corp/gocryptotrader/exchanges"
"github.com/thrasher-corp/gocryptotrader/exchanges/asset"
@@ -370,6 +369,9 @@ func TestGetMarginMarketLendingHistory(t *testing.T) {
t.Errorf("expected %s, got %s", errStartTimeCannotBeAfterEndTime, err)
}
if !areTestAPIKeysSet() {
t.Skip("api keys not set")
}
_, err = f.GetMarginMarketLendingHistory(context.Background(),
currency.USD, tmNow.AddDate(0, 0, -1), tmNow)
if err != nil {
@@ -435,9 +437,12 @@ func TestFetchDepositAddress(t *testing.T) {
if !areTestAPIKeysSet() {
t.Skip()
}
_, err := f.FetchDepositAddress(context.Background(), currency.NewCode("tUsD"))
r, err := f.FetchDepositAddress(context.Background(), currency.NewCode("UsDt"), "trx")
if err != nil {
t.Error(err)
t.Fatal(err)
}
if r.Method != "trx" {
t.Error("expected trx method")
}
}
@@ -469,7 +474,13 @@ func TestWithdraw(t *testing.T) {
t.Skip("skipping test, either api keys or canManipulateRealOrders isnt set correctly")
}
_, err := f.Withdraw(context.Background(),
currency.NewCode("bTc"), core.BitcoinDonationAddress, "", "", "957378", 0.0009)
currency.NewCode("UsDT"),
"TJU9piX2WA8WTvxVKMqpvTzZGhvXQAZKSY",
"",
"",
"trx",
"715913",
-1)
if err != nil {
t.Error(err)
}
@@ -1174,7 +1185,7 @@ func TestGetDepositAddress(t *testing.T) {
if !areTestAPIKeysSet() {
t.Skip("API keys required but not set, skipping test")
}
_, err := f.GetDepositAddress(context.Background(), currency.NewCode("FTT"), "")
_, err := f.GetDepositAddress(context.Background(), currency.NewCode("FTT"), "", "")
if err != nil {
t.Error(err)
}