add USDC perp client with tests

This commit is contained in:
tiagosiebler
2022-09-08 16:48:33 +01:00
parent 666720b27d
commit 5187350878
13 changed files with 583 additions and 37 deletions

View File

@@ -19,9 +19,15 @@ export function successResponseObject(successMsg: string | null = 'OK') {
export function successUSDCResponseObject() {
return {
result: expect.any(Object),
...successUSDCEmptyResponseObject(),
};
}
export function successUSDCEmptyResponseObject() {
return {
retCode: API_ERROR_CODE.SUCCESS,
retMsg: expect.stringMatching(
/OK|SUCCESS|success|success\.|Request accepted/gim
/OK|SUCCESS|success|success\.|Request accepted|/gim
),
};
}