From 23dd60728e0fc9dcefd90fc6cf050a7832e10a6c Mon Sep 17 00:00:00 2001 From: c9s Date: Tue, 26 Apr 2022 16:51:41 +0800 Subject: [PATCH] binance: fix error check --- pkg/exchange/binance/exchange.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/exchange/binance/exchange.go b/pkg/exchange/binance/exchange.go index ccfe94def..8a7d32717 100644 --- a/pkg/exchange/binance/exchange.go +++ b/pkg/exchange/binance/exchange.go @@ -254,6 +254,10 @@ func (e *Exchange) RepayMarginAsset(ctx context.Context, asset string, amount fi log.Infof("repaying margin asset %s amount %f", asset, amount.Float64()) resp, err := req.Do(ctx) + if err != nil { + return err + } + log.Debugf("margin repayed %f %s, transaction id = %d", amount.Float64(), asset, resp.TranID) return err }