From 49eb0fa87056d92b32f38778768571c410b962dc Mon Sep 17 00:00:00 2001 From: c9s Date: Mon, 16 Dec 2024 18:16:27 +0800 Subject: [PATCH] max: convert network id to upper case --- pkg/exchange/max/convert.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/exchange/max/convert.go b/pkg/exchange/max/convert.go index 7d72af641..27df3eae7 100644 --- a/pkg/exchange/max/convert.go +++ b/pkg/exchange/max/convert.go @@ -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 {