Skip to content

Commit

Permalink
Simplify getTradingFees - remove duplicate var
Browse files Browse the repository at this point in the history
  • Loading branch information
gbjk committed Oct 4, 2023
1 parent 11edc1c commit cb0d8b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions exchanges/bitstamp/bitstamp.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,10 @@ func (b *Bitstamp) GetFee(ctx context.Context, feeBuilder *exchange.FeeBuilder)

// GetTradingFee returns a trading fee based on a currency
func (b *Bitstamp) getTradingFee(ctx context.Context, feeBuilder *exchange.FeeBuilder) (float64, error) {
tradingFees, err := b.GetAccountTradingFee(ctx, feeBuilder.Pair)
fees, err := b.GetAccountTradingFee(ctx, feeBuilder.Pair)
if err != nil {
return 0, err
}
fees := tradingFees
fee := fees.Fees.Taker
if feeBuilder.IsMaker {
fee = fees.Fees.Maker
Expand Down
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ go 1.20

require (
github.com/d5/tengo/v2 v2.16.1
github.com/davecgh/go-spew v1.1.1
github.com/gofrs/uuid v4.4.0+incompatible
github.com/google/go-querystring v1.1.0
github.com/gorilla/mux v1.8.0
Expand All @@ -17,6 +18,7 @@ require (
github.com/pquerna/otp v1.4.0
github.com/shopspring/decimal v1.3.1
github.com/spf13/viper v1.16.0
github.com/stretchr/testify v1.8.3
github.com/thrasher-corp/gct-ta v0.0.0-20200623072738-f2b55b7f9f41
github.com/thrasher-corp/goose v2.7.0-rc4.0.20191002032028-0f2c2a27abdb+incompatible
github.com/thrasher-corp/sqlboiler v1.0.1-0.20191001234224-71e17f37a85e
Expand All @@ -41,6 +43,7 @@ require (
github.com/magiconair/properties v1.8.7 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/cast v1.5.1 // indirect
Expand Down

0 comments on commit cb0d8b4

Please sign in to comment.