yhtx 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +10 -10
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -82,7 +82,7 @@ async function call(path, { apiKey, secret, data, method, recvWindow } = {}) {
|
|
|
82
82
|
console.log("api bug2: null"); ////{status: 'error','err-code': 'api-signature-not-valid','err-msg': 'Signature not valid: Verification failure [校验失败]',data:null}
|
|
83
83
|
} else if (dt?.err_code == 403) {
|
|
84
84
|
console.log("api bug3: undefined"); //{status:"error",err_code:403,err_msg:"Verification failure [校验失败]",ts:1758854139970};
|
|
85
|
-
} else if (dt?.["err-msg"] == "Format Error: account-id") {
|
|
85
|
+
} else if (dt?.["err-msg"] == "Format Error: account-id.") {
|
|
86
86
|
console.log("api bug(accId): null"); //{status: 'error','err-code': 'validation-format-error','err-msg': 'Format Error: account-id.',data:null}
|
|
87
87
|
} else console.log(dt);
|
|
88
88
|
} else if (dt?.message == "Verification failure [校验失败]" && dt?.code == 1003) {
|
|
@@ -94,15 +94,15 @@ async function call(path, { apiKey, secret, data, method, recvWindow } = {}) {
|
|
|
94
94
|
} //eg{message:'The account API interface queried is empty',code:40237,success:false}
|
|
95
95
|
|
|
96
96
|
let rs = r.data.data;
|
|
97
|
-
if (rs == null && dt?.status == "error") {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
} else if (rs == undefined) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
97
|
+
// if (rs == null && dt?.status == "error") {
|
|
98
|
+
// if (dt?.["err-msg"] != "Format Error: account-id") {
|
|
99
|
+
// rs = r.data; //eg rs={status:"error","err-code":"dw-withdraw-precision-limit","err-msg":"withdraw amount precision cannot be greater than 6",data:null}
|
|
100
|
+
// }
|
|
101
|
+
// } else if (rs == undefined) {
|
|
102
|
+
// if (![dt?.err_msg, dt?.message].includes("Verification failure [校验失败]")) {
|
|
103
|
+
// rs = r.data; //eg rs={message:'The account API interface queried is empty',code:40237,success:false}
|
|
104
|
+
// } // if (dt?.success == false && dt?.code != 1003 && /*bug3*/ dt?.err_code != 403) {
|
|
105
|
+
// }
|
|
106
106
|
|
|
107
107
|
return rs; //rs=DATA | {status:'error','err=code','err-msg',data:null} | null(if api fail) | undefined(if apiFail)
|
|
108
108
|
})
|