chore(): run linter, fix missing property for withdrawal request

This commit is contained in:
tiagosiebler
2023-05-01 12:15:47 +01:00
parent 70adfd646a
commit fa2c7a2094

View File

@@ -46,7 +46,7 @@ describe('Private WRITE V5 REST API Endpoints', () => {
side: orderSide, side: orderSide,
qty: '1', qty: '1',
positionIdx: 1, positionIdx: 1,
}) }),
).toMatchObject({ ).toMatchObject({
// ...successResponseObjectV3(), // ...successResponseObjectV3(),
// retMsg: '', // retMsg: '',
@@ -61,7 +61,7 @@ describe('Private WRITE V5 REST API Endpoints', () => {
symbol: linearSymbol, symbol: linearSymbol,
qty: '2', qty: '2',
orderId: fakeOrderId, orderId: fakeOrderId,
}) }),
).toMatchObject({ ).toMatchObject({
// ...successResponseObjectV3(), // ...successResponseObjectV3(),
// retMsg: '', // retMsg: '',
@@ -75,7 +75,7 @@ describe('Private WRITE V5 REST API Endpoints', () => {
category: 'linear', category: 'linear',
symbol: linearSymbol, symbol: linearSymbol,
orderId: fakeOrderId, orderId: fakeOrderId,
}) }),
).toMatchObject({ ).toMatchObject({
// ...successResponseObjectV3(), // ...successResponseObjectV3(),
// retMsg: '', // retMsg: '',
@@ -88,7 +88,7 @@ describe('Private WRITE V5 REST API Endpoints', () => {
await api.cancelAllOrders({ await api.cancelAllOrders({
category: 'linear', category: 'linear',
settleCoin: settleCoin, settleCoin: settleCoin,
}) }),
).toMatchObject({ ).toMatchObject({
...successResponseObjectV3(), ...successResponseObjectV3(),
}); });
@@ -122,7 +122,7 @@ describe('Private WRITE V5 REST API Endpoints', () => {
side: orderSide, side: orderSide,
symbol: optionsSymbol, symbol: optionsSymbol,
}, },
]) ]),
).toMatchObject({ ).toMatchObject({
...successResponseObjectV3(), ...successResponseObjectV3(),
}); });
@@ -141,7 +141,7 @@ describe('Private WRITE V5 REST API Endpoints', () => {
qty: '4', qty: '4',
symbol: optionsSymbol, symbol: optionsSymbol,
}, },
]) ]),
).toMatchObject({ ).toMatchObject({
...successResponseObjectV3(), ...successResponseObjectV3(),
}); });
@@ -158,7 +158,7 @@ describe('Private WRITE V5 REST API Endpoints', () => {
orderLinkId: 'customOrderId2', orderLinkId: 'customOrderId2',
symbol: optionsSymbol, symbol: optionsSymbol,
}, },
]) ]),
).toMatchObject({ ).toMatchObject({
...successResponseObjectV3(), ...successResponseObjectV3(),
}); });
@@ -171,7 +171,7 @@ describe('Private WRITE V5 REST API Endpoints', () => {
// ...successResponseObjectV3(), // ...successResponseObjectV3(),
// retMsg: '', // retMsg: '',
retCode: API_ERROR_CODE.V5_API_KEY_PERMISSION_DENIED, retCode: API_ERROR_CODE.V5_API_KEY_PERMISSION_DENIED,
} },
); );
}); });
}); });
@@ -184,7 +184,7 @@ describe('Private WRITE V5 REST API Endpoints', () => {
buyLeverage: '5', buyLeverage: '5',
sellLeverage: '5', sellLeverage: '5',
symbol: linearSymbol, symbol: linearSymbol,
}) }),
).toMatchObject({ ).toMatchObject({
// ...successResponseObjectV3(), // ...successResponseObjectV3(),
// retMsg: '', // retMsg: '',
@@ -201,7 +201,7 @@ describe('Private WRITE V5 REST API Endpoints', () => {
symbol: linearSymbol, symbol: linearSymbol,
// isolated // isolated
tradeMode: 1, tradeMode: 1,
}) }),
).toMatchObject({ ).toMatchObject({
// ...successResponseObjectV3(), // ...successResponseObjectV3(),
// retMsg: '', // retMsg: '',
@@ -215,7 +215,7 @@ describe('Private WRITE V5 REST API Endpoints', () => {
category: 'linear', category: 'linear',
symbol: linearSymbol, symbol: linearSymbol,
tpSlMode: 'Full', tpSlMode: 'Full',
}) }),
).toMatchObject({ ).toMatchObject({
// ...successResponseObjectV3(), // ...successResponseObjectV3(),
// retMsg: '', // retMsg: '',
@@ -230,7 +230,7 @@ describe('Private WRITE V5 REST API Endpoints', () => {
// both sides // both sides
mode: 3, mode: 3,
coin: settleCoin, coin: settleCoin,
}) }),
).toMatchObject({ ).toMatchObject({
...successResponseObjectV3(), ...successResponseObjectV3(),
}); });
@@ -243,7 +243,7 @@ describe('Private WRITE V5 REST API Endpoints', () => {
positionIdx: 1, positionIdx: 1,
riskId: 1, riskId: 1,
symbol: linearSymbol, symbol: linearSymbol,
}) }),
).toMatchObject({ ).toMatchObject({
// ...successResponseObjectV3(), // ...successResponseObjectV3(),
// retMsg: '', // retMsg: '',
@@ -260,7 +260,7 @@ describe('Private WRITE V5 REST API Endpoints', () => {
slSize: '100', slSize: '100',
slTriggerBy: 'LastPrice', slTriggerBy: 'LastPrice',
stopLoss: '25000', stopLoss: '25000',
}) }),
).toMatchObject({ ).toMatchObject({
// ...successResponseObjectV3(), // ...successResponseObjectV3(),
// retMsg: '', // retMsg: '',
@@ -275,7 +275,7 @@ describe('Private WRITE V5 REST API Endpoints', () => {
autoAddMargin: 0, autoAddMargin: 0,
symbol: linearSymbol, symbol: linearSymbol,
positionIdx: 0, positionIdx: 0,
}) }),
).toMatchObject({ ).toMatchObject({
// ...successResponseObjectV3(), // ...successResponseObjectV3(),
// retMsg: '', // retMsg: '',
@@ -301,7 +301,7 @@ describe('Private WRITE V5 REST API Endpoints', () => {
frozenPeriod: '1', frozenPeriod: '1',
qtyLimit: '1', qtyLimit: '1',
window: '1', window: '1',
}) }),
).toMatchObject({ ).toMatchObject({
// ...successResponseObjectV3(), // ...successResponseObjectV3(),
// retMsg: '', // retMsg: '',
@@ -326,8 +326,8 @@ describe('Private WRITE V5 REST API Endpoints', () => {
settleCoin, settleCoin,
'100', '100',
'SPOT', 'SPOT',
'CONTRACT' 'CONTRACT',
) ),
).toMatchObject({ ).toMatchObject({
// ...successResponseObjectV3(), // ...successResponseObjectV3(),
// retMsg: '', // retMsg: '',
@@ -351,7 +351,7 @@ describe('Private WRITE V5 REST API Endpoints', () => {
toAccountType: 'CONTRACT', toAccountType: 'CONTRACT',
toMemberId: 2, toMemberId: 2,
transferId: fakeTransferId, transferId: fakeTransferId,
}) }),
).toMatchObject({ ).toMatchObject({
// ...successResponseObjectV3(), // ...successResponseObjectV3(),
// retMsg: '', // retMsg: '',
@@ -366,7 +366,8 @@ describe('Private WRITE V5 REST API Endpoints', () => {
amount: '100', amount: '100',
chain: 'TRC20', chain: 'TRC20',
coin: settleCoin, coin: settleCoin,
}) timestamp: Date.now(),
}),
).toMatchObject({ ).toMatchObject({
// ...successResponseObjectV3(), // ...successResponseObjectV3(),
// retMsg: '', // retMsg: '',
@@ -391,7 +392,7 @@ describe('Private WRITE V5 REST API Endpoints', () => {
username: 'sub1account', username: 'sub1account',
switch: 1, switch: 1,
note: 'created via e2e test', note: 'created via e2e test',
}) }),
).toMatchObject({ ).toMatchObject({
// ...successResponseObjectV3(), // ...successResponseObjectV3(),
// retMsg: '', // retMsg: '',
@@ -421,7 +422,7 @@ describe('Private WRITE V5 REST API Endpoints', () => {
await api.purchaseSpotLeveragedToken({ await api.purchaseSpotLeveragedToken({
amount: '100', amount: '100',
ltCoin: leverageToken.ltCoin, ltCoin: leverageToken.ltCoin,
}) }),
).toMatchObject({ ).toMatchObject({
// ...successResponseObjectV3(), // ...successResponseObjectV3(),
retCode: API_ERROR_CODE.SPOT_LEVERAGE_QUIZ_REQUIRED, retCode: API_ERROR_CODE.SPOT_LEVERAGE_QUIZ_REQUIRED,
@@ -434,7 +435,7 @@ describe('Private WRITE V5 REST API Endpoints', () => {
await api.redeemSpotLeveragedToken({ await api.redeemSpotLeveragedToken({
quantity: '100', quantity: '100',
ltCoin: leverageToken.ltCoin, ltCoin: leverageToken.ltCoin,
}) }),
).toMatchObject({ ).toMatchObject({
// ...successResponseObjectV3(), // ...successResponseObjectV3(),
retCode: API_ERROR_CODE.SPOT_LEVERAGE_TOKEN_INSUFFICIENT_BALANCE, retCode: API_ERROR_CODE.SPOT_LEVERAGE_TOKEN_INSUFFICIENT_BALANCE,