Skip to content

Commit

Permalink
Engine: BTC Markets V3 Updates (thrasher-corp#385)
Browse files Browse the repository at this point in the history
* Broken WIP

WIP

WIP

WIP

WIP

WIP

WIP

WIP

WIP

WIP

WIP

WIP

WIP

WIP

WIP

WIP

WIP

WIP

WIP

* Errors Fixed

* PR Changes

* PR Changes

* PR Changes

* PR Changes

* PR Changes

* PR Changes

* PR Changes

* PR Changes

* PR Changes

* Offline Fees Fixed

* MarketCandles fixed and constants added

* t.log deleted

* Broken WIP

WIP

WIP

WIP

WIP

WIP

WIP

WIP

WIP

WIP

WIP

WIP

WIP

WIP

WIP

WIP

WIP

WIP

WIP

* Errors Fixed

* PR Changes

* PR Changes

* PR Changes

* MarketCandles fixed and constants added

* t.log deleted

* Added BSB and Order Status

* WIP

* Websocket and BatchPlaceCancelOrder and other minor nits fixed

* Linter Issues Fixed

* Function Name Change

* Replacing b.GetMarkets with b.GetEnabledPairs

* Pagination param changes and PlaceCancelBatch changes

* Merge Conflicts WIP

* Linter Issue Fixed

* optional params fixed
  • Loading branch information
MadCozBadd authored and thrasher- committed Dec 4, 2019
1 parent 49b9ece commit a33ddcf
Show file tree
Hide file tree
Showing 13 changed files with 1,602 additions and 1,021 deletions.
2 changes: 1 addition & 1 deletion cmd/exchange_wrapper_issues/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ type EndpointResponse struct {
// Bank contains all required data for a wrapper withdrawal request
type Bank struct {
BankAccountName string `json:"bankAccountName"`
BankAccountNumber float64 `json:"bankAccountNumber"`
BankAccountNumber string `json:"bankAccountNumber"`
BankAddress string `json:"bankAddress"`
BankCity string `json:"bankCity"`
BankCountry string `json:"bankCountry"`
Expand Down
2 changes: 1 addition & 1 deletion exchanges/bitfinex/bitfinex.go
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ func (b *Bitfinex) WithdrawFIAT(withdrawalType, walletType string, withdrawReque
req["walletselected"] = walletType
req["amount"] = strconv.FormatFloat(withdrawRequest.Amount, 'f', -1, 64)
req["account_name"] = withdrawRequest.BankAccountName
req["account_number"] = strconv.FormatFloat(withdrawRequest.BankAccountNumber, 'f', -1, 64)
req["account_number"] = withdrawRequest.BankAccountNumber
req["bank_name"] = withdrawRequest.BankName
req["bank_address"] = withdrawRequest.BankAddress
req["bank_city"] = withdrawRequest.BankCity
Expand Down
4 changes: 2 additions & 2 deletions exchanges/bitfinex/bitfinex_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ func TestWithdrawFiat(t *testing.T) {
Description: "WITHDRAW IT ALL",
},
BankAccountName: "Satoshi Nakamoto",
BankAccountNumber: 12345,
BankAccountNumber: "12345",
BankAddress: "123 Fake St",
BankCity: "Tarry Town",
BankCountry: "Hyrule",
Expand Down Expand Up @@ -952,7 +952,7 @@ func TestWithdrawInternationalBank(t *testing.T) {
Description: "WITHDRAW IT ALL",
},
BankAccountName: "Satoshi Nakamoto",
BankAccountNumber: 12345,
BankAccountNumber: "12345",
BankAddress: "123 Fake St",
BankCity: "Tarry Town",
BankCountry: "Hyrule",
Expand Down
2 changes: 1 addition & 1 deletion exchanges/bithumb/bithumb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ func TestWithdrawFiat(t *testing.T) {
Description: "WITHDRAW IT ALL",
},
BankAccountName: "Satoshi Nakamoto",
BankAccountNumber: 12345,
BankAccountNumber: "12345",
BankCode: 123,
BankAddress: "123 Fake St",
BankCity: "Tarry Town",
Expand Down
5 changes: 1 addition & 4 deletions exchanges/bithumb/bithumb_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"errors"
"fmt"
"math"
"strconv"
"sync"
"time"

Expand Down Expand Up @@ -419,9 +418,7 @@ func (b *Bithumb) WithdrawFiatFunds(withdrawRequest *exchange.FiatWithdrawReques
return "", errors.New("only KRW is supported")
}
bankDetails := fmt.Sprintf("%v_%v", withdrawRequest.BankCode, withdrawRequest.BankName)
bankAccountNumber := strconv.FormatFloat(withdrawRequest.BankAccountNumber, 'f', -1, 64)
withdrawAmountInt := int64(withdrawRequest.Amount)
resp, err := b.RequestKRWWithdraw(bankDetails, bankAccountNumber, withdrawAmountInt)
resp, err := b.RequestKRWWithdraw(bankDetails, withdrawRequest.BankAccountNumber, int64(withdrawRequest.Amount))
if err != nil {
return "", err
}
Expand Down
4 changes: 2 additions & 2 deletions exchanges/bitstamp/bitstamp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ func TestWithdrawFiat(t *testing.T) {
Description: "WITHDRAW IT ALL",
},
BankAccountName: "Satoshi Nakamoto",
BankAccountNumber: 12345,
BankAccountNumber: "12345",
BankAddress: "123 Fake St",
BankCity: "Tarry Town",
BankCountry: "AU",
Expand Down Expand Up @@ -527,7 +527,7 @@ func TestWithdrawInternationalBank(t *testing.T) {
Description: "WITHDRAW IT ALL",
},
BankAccountName: "Satoshi Nakamoto",
BankAccountNumber: 12345,
BankAccountNumber: "12345",
BankAddress: "123 Fake St",
BankCity: "Tarry Town",
BankCountry: "AU",
Expand Down
Loading

0 comments on commit a33ddcf

Please sign in to comment.