From f942f7afd8890f276ebc78577a8a811371ef16f2 Mon Sep 17 00:00:00 2001 From: c9s Date: Wed, 17 May 2023 13:45:38 +0800 Subject: [PATCH] okex: rename constant names --- pkg/exchange/okex/exchange.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkg/exchange/okex/exchange.go b/pkg/exchange/okex/exchange.go index 0bebbc62f..0ad66181f 100644 --- a/pkg/exchange/okex/exchange.go +++ b/pkg/exchange/okex/exchange.go @@ -17,11 +17,13 @@ import ( var marketDataLimiter = rate.NewLimiter(rate.Every(time.Second/10), 1) -// OKB is the platform currency of OKEx, pre-allocate static string here -const OKB = "OKB" +const ID = "okex" + +// PlatformToken is the platform currency of OKEx, pre-allocate static string here +const PlatformToken = "OKB" var log = logrus.WithFields(logrus.Fields{ - "exchange": "okex", + "exchange": ID, }) type Exchange struct { @@ -38,8 +40,7 @@ func New(key, secret, passphrase string) *Exchange { } return &Exchange{ - key: key, - // pragma: allowlist nextline secret + key: key, secret: secret, passphrase: passphrase, client: client, @@ -131,7 +132,7 @@ func (e *Exchange) QueryTickers(ctx context.Context, symbols ...string) (map[str } func (e *Exchange) PlatformFeeCurrency() string { - return OKB + return PlatformToken } func (e *Exchange) QueryAccount(ctx context.Context) (*types.Account, error) {