@chevre/domain 21.2.0-alpha.35 → 21.2.0-alpha.36
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.
|
@@ -351,10 +351,17 @@ class MongoRepository {
|
|
|
351
351
|
*/
|
|
352
352
|
startAndConfirm(params) {
|
|
353
353
|
return __awaiter(this, void 0, void 0, function* () {
|
|
354
|
-
|
|
354
|
+
const startDate = new Date();
|
|
355
|
+
const confirmedTransaction = yield this.transactionModel.create(Object.assign(Object.assign({}, params), { _id: params.id, typeOf: params.typeOf, startDate, status: factory.transactionStatusType.Confirmed, tasksExportAction: {
|
|
355
356
|
actionStatus: factory.actionStatusType.PotentialActionStatus
|
|
356
|
-
}, tasksExportationStatus: factory.transactionTasksExportationStatus.Unexported, endDate:
|
|
357
|
+
}, tasksExportationStatus: factory.transactionTasksExportationStatus.Unexported, endDate: startDate, result: params.result, potentialActions: params.potentialActions }))
|
|
357
358
|
.then((doc) => doc.toObject());
|
|
359
|
+
assetTransaction_2.assetTransactionEventEmitter.emitAssetTransactionStatusChanged({
|
|
360
|
+
id: params.id,
|
|
361
|
+
typeOf: params.typeOf,
|
|
362
|
+
status: factory.transactionStatusType.Confirmed
|
|
363
|
+
});
|
|
364
|
+
return confirmedTransaction;
|
|
358
365
|
});
|
|
359
366
|
}
|
|
360
367
|
/**
|
package/package.json
CHANGED