mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-07 07:26:48 +00:00
Moved withdraw structs into own package
This commit is contained in:
@@ -333,19 +333,19 @@ func ({{.Variable}} *{{.CapitalName}}) GetDepositAddress(cryptocurrency currency
|
||||
|
||||
// WithdrawCryptocurrencyFunds returns a withdrawal ID when a withdrawal is
|
||||
// submitted
|
||||
func ({{.Variable}} *{{.CapitalName}}) WithdrawCryptocurrencyFunds(withdrawRequest *exchange.CryptoWithdrawRequest) (string, error) {
|
||||
func ({{.Variable}} *{{.CapitalName}}) WithdrawCryptocurrencyFunds(withdrawRequest *withdraw.CryptoWithdrawRequest) (string, error) {
|
||||
return "", common.ErrNotYetImplemented
|
||||
}
|
||||
|
||||
// WithdrawFiatFunds returns a withdrawal ID when a withdrawal is
|
||||
// submitted
|
||||
func ({{.Variable}} *{{.CapitalName}}) WithdrawFiatFunds(withdrawRequest *exchange.FiatWithdrawRequest) (string, error) {
|
||||
func ({{.Variable}} *{{.CapitalName}}) WithdrawFiatFunds(withdrawRequest *withdraw.FiatWithdrawRequest) (string, error) {
|
||||
return "", common.ErrNotYetImplemented
|
||||
}
|
||||
|
||||
// WithdrawFiatFundsToInternationalBank returns a withdrawal ID when a withdrawal is
|
||||
// submitted
|
||||
func ({{.Variable}} *{{.CapitalName}}) WithdrawFiatFundsToInternationalBank(withdrawRequest *exchange.FiatWithdrawRequest) (string, error) {
|
||||
func ({{.Variable}} *{{.CapitalName}}) WithdrawFiatFundsToInternationalBank(withdrawRequest *withdraw.FiatWithdrawRequest) (string, error) {
|
||||
return "", common.ErrNotYetImplemented
|
||||
}
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
exchange "github.com/thrasher-corp/gocryptotrader/exchanges"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/asset"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/order"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/withdraw"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -173,16 +174,16 @@ func testWrappers(e exchange.IBotExchange) []string {
|
||||
funcs = append(funcs, "GetDepositAddress")
|
||||
}
|
||||
|
||||
_, err = e.WithdrawCryptocurrencyFunds(&exchange.CryptoWithdrawRequest{})
|
||||
_, err = e.WithdrawCryptocurrencyFunds(&withdraw.CryptoWithdrawRequest{})
|
||||
if err == common.ErrNotYetImplemented {
|
||||
funcs = append(funcs, "WithdrawCryptocurrencyFunds")
|
||||
}
|
||||
|
||||
_, err = e.WithdrawFiatFunds(&exchange.FiatWithdrawRequest{})
|
||||
_, err = e.WithdrawFiatFunds(&withdraw.FiatWithdrawRequest{})
|
||||
if err == common.ErrNotYetImplemented {
|
||||
funcs = append(funcs, "WithdrawFiatFunds")
|
||||
}
|
||||
_, err = e.WithdrawFiatFundsToInternationalBank(&exchange.FiatWithdrawRequest{})
|
||||
_, err = e.WithdrawFiatFundsToInternationalBank(&withdraw.FiatWithdrawRequest{})
|
||||
if err == common.ErrNotYetImplemented {
|
||||
funcs = append(funcs, "WithdrawFiatFundsToInternationalBank")
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import (
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/order"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/orderbook"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/ticker"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/withdraw"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -619,11 +620,11 @@ func testWrappers(e exchange.IBotExchange, base *exchange.Base, config *Config)
|
||||
Response: jsonifyInterface([]interface{}{r19}),
|
||||
})
|
||||
|
||||
genericWithdrawRequest := exchange.GenericWithdrawRequestInfo{
|
||||
genericWithdrawRequest := withdraw.GenericWithdrawRequestInfo{
|
||||
Amount: config.OrderSubmission.Amount,
|
||||
Currency: p.Quote,
|
||||
}
|
||||
withdrawRequest := exchange.CryptoWithdrawRequest{
|
||||
withdrawRequest := withdraw.CryptoWithdrawRequest{
|
||||
GenericWithdrawRequestInfo: genericWithdrawRequest,
|
||||
Address: withdrawAddressOverride,
|
||||
}
|
||||
@@ -663,7 +664,7 @@ func testWrappers(e exchange.IBotExchange, base *exchange.Base, config *Config)
|
||||
Response: jsonifyInterface([]interface{}{r21}),
|
||||
})
|
||||
|
||||
fiatWithdrawRequest := exchange.FiatWithdrawRequest{
|
||||
fiatWithdrawRequest := withdraw.FiatWithdrawRequest{
|
||||
GenericWithdrawRequestInfo: genericWithdrawRequest,
|
||||
BankAccountName: config.BankDetails.BankAccountName,
|
||||
BankAccountNumber: config.BankDetails.BankAccountNumber,
|
||||
|
||||
Reference in New Issue
Block a user