mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-22 23:16:48 +00:00
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:
@@ -5,9 +5,11 @@ import (
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
"github.com/thrasher-corp/gocryptotrader/core"
|
||||
"github.com/thrasher-corp/gocryptotrader/currency"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/account"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/asset"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/deposit"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/kline"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/order"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/orderbook"
|
||||
@@ -216,12 +218,12 @@ func (w Wrapper) AccountInformation(ctx context.Context, exch string, assetType
|
||||
}
|
||||
|
||||
// DepositAddress validator for test execution/scripts
|
||||
func (w Wrapper) DepositAddress(exch string, _ currency.Code) (string, error) {
|
||||
func (w Wrapper) DepositAddress(exch, chain string, _ currency.Code) (*deposit.Address, error) {
|
||||
if exch == exchError.String() {
|
||||
return exch, errTestFailed
|
||||
return nil, errTestFailed
|
||||
}
|
||||
|
||||
return exch, nil
|
||||
return &deposit.Address{Address: core.BitcoinDonationAddress}, nil
|
||||
}
|
||||
|
||||
// WithdrawalCryptoFunds validator for test execution/scripts
|
||||
|
||||
@@ -112,12 +112,12 @@ func TestWrapper_CancelOrder(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestWrapper_DepositAddress(t *testing.T) {
|
||||
_, err := testWrapper.DepositAddress(exchError.String(), currency.NewCode("BTC"))
|
||||
_, err := testWrapper.DepositAddress(exchError.String(), "", currency.NewCode("BTC"))
|
||||
if err == nil {
|
||||
t.Fatal("expected DepositAddress to return error on invalid name")
|
||||
}
|
||||
|
||||
_, err = testWrapper.DepositAddress(exchName, currency.NewCode("BTC"))
|
||||
_, err = testWrapper.DepositAddress(exchName, "", currency.NewCode("BTC"))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user