sdk-triggerx 0.1.34 → 0.1.35
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/dist/api/jobs.js +3 -3
- package/package.json +1 -1
package/dist/api/jobs.js
CHANGED
|
@@ -448,14 +448,14 @@ async function createJob(client, params) {
|
|
|
448
448
|
});
|
|
449
449
|
// The API returns total fee in wei: { total_fee: "<wei>" } or nested under data
|
|
450
450
|
let totalFeeRaw;
|
|
451
|
-
if (feeRes && feeRes.current_total_fee !== undefined) {
|
|
451
|
+
if (feeRes && feeRes.current_total_fee !== undefined && feeRes.current_total_fee !== 0) {
|
|
452
452
|
totalFeeRaw = feeRes.current_total_fee;
|
|
453
453
|
}
|
|
454
|
-
else if (feeRes && feeRes.data && feeRes.data.current_total_fee !== undefined) {
|
|
454
|
+
else if (feeRes && feeRes.data && feeRes.data.current_total_fee !== undefined && feeRes.data.current_total_fee !== 0) {
|
|
455
455
|
totalFeeRaw = feeRes.data.current_total_fee;
|
|
456
456
|
}
|
|
457
457
|
maxtotalFeeRaw = feeRes.total_fee;
|
|
458
|
-
if (totalFeeRaw === undefined) {
|
|
458
|
+
if (totalFeeRaw === undefined || totalFeeRaw === 0) {
|
|
459
459
|
return (0, errors_1.createErrorResponse)(new errors_1.ApiError('Invalid response from /api/fees: missing total_fee', { response: feeRes }), 'API error');
|
|
460
460
|
}
|
|
461
461
|
// Support both number and string representations of wei
|