Skip to content

Commit cd9a817

Browse files
committed
fix: set symbol param only when isIsolated is true
1 parent 7bb44eb commit cd9a817

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

v2/margin_service.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,12 @@ func (s *MarginBorrowRepayService) Do(ctx context.Context, opts ...RequestOption
242242
m := params{
243243
"asset": s.asset,
244244
"isIsolated": s.isIsolated,
245-
"symbol": s.symbol,
246-
"amount": s.amount,
247-
"type": string(s._type),
245+
//"symbol": s.symbol,
246+
"amount": s.amount,
247+
"type": string(s._type),
248+
}
249+
if s.isIsolated {
250+
m["symbol"] = s.symbol // set symbol param only when isIsolated is true
248251
}
249252
r.setFormParams(m)
250253
res = new(TransactionResponse)

0 commit comments

Comments
 (0)