From 9969daf2a6e73d78d1073a5d7b6174f12d86c1be Mon Sep 17 00:00:00 2001 From: svetoslav-nikol0v Date: Tue, 16 Jul 2024 16:04:44 +0300 Subject: [PATCH] update: retry on PLATFORM_NOT_ACTIVE error Signed-off-by: svetoslav-nikol0v --- src/query/Query.js | 1 + src/transaction/TransactionReceiptQuery.js | 1 + src/transaction/TransactionRecordQuery.js | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/query/Query.js b/src/query/Query.js index 27992332f..12cc7323d 100644 --- a/src/query/Query.js +++ b/src/query/Query.js @@ -492,6 +492,7 @@ export default class Query extends Executable { case Status.Busy: case Status.Unknown: case Status.PlatformTransactionNotCreated: + case Status.PlatformNotActive: return [status, ExecutionState.Retry]; case Status.Ok: return [status, ExecutionState.Finished]; diff --git a/src/transaction/TransactionReceiptQuery.js b/src/transaction/TransactionReceiptQuery.js index 0f747eb91..980cda650 100644 --- a/src/transaction/TransactionReceiptQuery.js +++ b/src/transaction/TransactionReceiptQuery.js @@ -221,6 +221,7 @@ export default class TransactionReceiptQuery extends Query { case Status.Busy: case Status.Unknown: case Status.ReceiptNotFound: + case Status.PlatformNotActive: return [status, ExecutionState.Retry]; case Status.Ok: break; diff --git a/src/transaction/TransactionRecordQuery.js b/src/transaction/TransactionRecordQuery.js index d4b677990..5bacaebd4 100644 --- a/src/transaction/TransactionRecordQuery.js +++ b/src/transaction/TransactionRecordQuery.js @@ -212,6 +212,7 @@ export default class TransactionRecordQuery extends Query { case Status.Unknown: case Status.ReceiptNotFound: case Status.RecordNotFound: + case Status.PlatformNotActive: return [status, ExecutionState.Retry]; case Status.Ok: @@ -412,7 +413,6 @@ export default class TransactionRecordQuery extends Query { /** @type {HashgraphProto.proto.ITransactionGetRecordResponse} */ ( response.transactionGetRecord ); - return Promise.resolve(TransactionRecord._fromProtobuf(record)); }