Case when there are not enough funds
This commit is contained in:
1 parent
47f4ab28b9
commit
d2f8b8de1f
1 file changed
+16
-1
+16
-1
@@ -441,7 +441,22 @@
|
||||
logger.write(MODULE_NAME, "[ERROR] analizeResponse -> exchangeErr = " + exchangeErr);
|
||||
logger.write(MODULE_NAME, "[ERROR] analizeResponse -> exchangeResponse = " + exchangeResponse);
|
||||
|
||||
notOkCallBack(global.DEFAULT_FAIL_RESPONSE);
|
||||
/* {"error":"Not enough USDT.","success":0}*/
|
||||
|
||||
if (JSON.stringify(exchangeResponse).indexOf("Not enough") > 0) {
|
||||
|
||||
let err = {
|
||||
resutl: global.CUSTOM_FAIL_RESPONSE.result,
|
||||
message: exchangeResponse.error
|
||||
};
|
||||
|
||||
notOkCallBack(err);
|
||||
|
||||
} else {
|
||||
|
||||
notOkCallBack(global.DEFAULT_FAIL_RESPONSE);
|
||||
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user