From 241ce657c302279f6b9dccc502f4400e7155e9c0 Mon Sep 17 00:00:00 2001 From: c9s Date: Tue, 8 Aug 2023 12:01:30 +0800 Subject: [PATCH] binance: remove isMargin check --- pkg/exchange/binance/exchange.go | 4 ---- pkg/strategy/deposit2transfer/transfer.go | 1 - 2 files changed, 5 deletions(-) delete mode 100644 pkg/strategy/deposit2transfer/transfer.go diff --git a/pkg/exchange/binance/exchange.go b/pkg/exchange/binance/exchange.go index 8f5a9217b..3e62068c6 100644 --- a/pkg/exchange/binance/exchange.go +++ b/pkg/exchange/binance/exchange.go @@ -379,10 +379,6 @@ func (e *Exchange) QueryMarginBorrowHistory(ctx context.Context, asset string) e // // to call this method, you must set the IsMargin = true func (e *Exchange) TransferMarginAccountAsset(ctx context.Context, asset string, amount fixedpoint.Value, io types.TransferDirection) error { - if !e.IsMargin { - return errors.New("you can not operate margin transfer on a non-margin session") - } - if e.IsIsolatedMargin { return e.transferIsolatedMarginAccountAsset(ctx, asset, amount, io) } diff --git a/pkg/strategy/deposit2transfer/transfer.go b/pkg/strategy/deposit2transfer/transfer.go deleted file mode 100644 index 7e8a8df12..000000000 --- a/pkg/strategy/deposit2transfer/transfer.go +++ /dev/null @@ -1 +0,0 @@ -package deposit2transfer