@metamask-previews/transaction-controller 62.0.0-preview-4ed214fa → 62.0.0-preview-e0caebb
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/TransactionController.cjs +15 -4
- package/dist/TransactionController.cjs.map +1 -1
- package/dist/TransactionController.d.cts.map +1 -1
- package/dist/TransactionController.d.mts.map +1 -1
- package/dist/TransactionController.mjs +15 -4
- package/dist/TransactionController.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1543,10 +1543,21 @@ _TransactionController_afterAdd = new WeakMap(), _TransactionController_afterSig
|
|
|
1543
1543
|
resultCallbacks.success();
|
|
1544
1544
|
}
|
|
1545
1545
|
const updatedTransactionMeta = __classPrivateFieldGet(this, _TransactionController_instances, "m", _TransactionController_getTransaction).call(this, transactionId);
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1546
|
+
// need to check status of updatedTransactionMeta to see if it is approved
|
|
1547
|
+
// for special case like user reject request in hardware wallet, the transactionMeta is failed with error "user rejected request"
|
|
1548
|
+
if (updatedTransactionMeta.status === types_1.TransactionStatus.failed) {
|
|
1549
|
+
this.messenger.publish(`${controllerName}:transactionFailed`, {
|
|
1550
|
+
transactionMeta: updatedTransactionMeta,
|
|
1551
|
+
actionId,
|
|
1552
|
+
error: updatedTransactionMeta?.error?.message ?? 'Unknown error',
|
|
1553
|
+
});
|
|
1554
|
+
}
|
|
1555
|
+
else {
|
|
1556
|
+
this.messenger.publish(`${controllerName}:transactionApproved`, {
|
|
1557
|
+
transactionMeta: updatedTransactionMeta,
|
|
1558
|
+
actionId,
|
|
1559
|
+
});
|
|
1560
|
+
}
|
|
1550
1561
|
}
|
|
1551
1562
|
}
|
|
1552
1563
|
catch (rawError) {
|