@ethernity-cloud/sdk-js 1.5.19 → 1.5.20

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.
@@ -515,7 +515,23 @@ class EtnySecureLock {
515
515
  // input carries no checksum (has_checksum === false) and is skipped. Kept
516
516
  // identical across securelock / trustedzone / validator so all three agree.
517
517
  async validateClientPayload(payload_data, input_data) {
518
- await this.getDORequestMetadata();
518
+ // The order metadata comes from the chain; a transient RPC failure
519
+ // must end in a signed failure result the trustedzone can hand over,
520
+ // not in a task that produces nothing until the trustedzone times out.
521
+ const maxRetries = 5;
522
+ for (let attempt = 1; ; attempt++) {
523
+ try {
524
+ await this.getDORequestMetadata();
525
+ break;
526
+ } catch (e) {
527
+ if (attempt === maxRetries) {
528
+ this.task_code = TaskStatus.SYSTEM_ERROR;
529
+ this.task_result = `Failed to fetch metadata after ${maxRetries} attempts: ${e && e.message ? e.message : e}`;
530
+ this.is_valid_client_data = false;
531
+ return;
532
+ }
533
+ }
534
+ }
519
535
 
520
536
  const pmeta = this._metadata.payload_metadata_obj;
521
537
  if (pmeta.has_checksum) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ethernity-cloud/sdk-js",
3
- "version": "1.5.19",
3
+ "version": "1.5.20",
4
4
  "description": "A package to run ethernity cloud build scripts",
5
5
  "scripts": {
6
6
  "ecld-build": "cross-env node ./node_modules/@ethernity-cloud/sdk-js/build.js",