Skip to content

Commit

Permalink
max: convert network id to upper case
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Dec 16, 2024
1 parent 0473611 commit 49eb0fa
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/exchange/max/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ import (
"github.com/c9s/bbgo/pkg/types"
)

func toGlobalNetwork(network string) string {
func toGlobalNetwork(network string) (out string) {
out = network
parts := strings.SplitN(network, "-", 2)
if len(parts) > 0 {
return parts[0]
out = parts[0]
}

return network
out = strings.ToUpper(out)
return out
}

func toGlobalCurrency(currency string) string {
Expand Down

0 comments on commit 49eb0fa

Please sign in to comment.