@tonconnect/ui 2.0.3-beta.1 → 2.0.3-beta.2
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/tonconnect-ui.min.js +1 -1
- package/dist/tonconnect-ui.min.js.map +1 -1
- package/lib/index.cjs +13 -9
- package/lib/index.cjs.map +1 -1
- package/lib/index.mjs +13 -9
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.cjs
CHANGED
|
@@ -11099,7 +11099,6 @@ class TonConnectUI {
|
|
|
11099
11099
|
});
|
|
11100
11100
|
return result;
|
|
11101
11101
|
} catch (e2) {
|
|
11102
|
-
this.tracker.trackTransactionSigningFailed(this.wallet, tx, e2.message);
|
|
11103
11102
|
widgetController.setAction({
|
|
11104
11103
|
name: "transaction-canceled",
|
|
11105
11104
|
showNotification: notifications2.includes("error"),
|
|
@@ -11206,6 +11205,7 @@ class TonConnectUI {
|
|
|
11206
11205
|
return new Promise((resolve, reject) => {
|
|
11207
11206
|
const { transaction, signal } = options;
|
|
11208
11207
|
if (signal.aborted) {
|
|
11208
|
+
this.tracker.trackTransactionSigningFailed(this.wallet, transaction, "Transaction was cancelled");
|
|
11209
11209
|
return reject(new TonConnectUIError("Transaction was not sent"));
|
|
11210
11210
|
}
|
|
11211
11211
|
const onTransactionHandler = (transaction2) => __async(this, null, function* () {
|
|
@@ -11214,14 +11214,18 @@ class TonConnectUI {
|
|
|
11214
11214
|
const onErrorsHandler = (reason) => {
|
|
11215
11215
|
reject(reason);
|
|
11216
11216
|
};
|
|
11217
|
-
|
|
11218
|
-
|
|
11219
|
-
"
|
|
11220
|
-
|
|
11221
|
-
|
|
11222
|
-
|
|
11223
|
-
|
|
11224
|
-
|
|
11217
|
+
const onCanceledHandler = () => {
|
|
11218
|
+
this.tracker.trackTransactionSigningFailed(this.wallet, transaction, "Transaction was cancelled");
|
|
11219
|
+
reject(new TonConnectUIError("Transaction was not sent"));
|
|
11220
|
+
};
|
|
11221
|
+
signal.addEventListener("abort", onCanceledHandler, { once: true });
|
|
11222
|
+
this.connector.sendTransaction(transaction, { onRequestSent, signal }).then((result) => {
|
|
11223
|
+
signal.removeEventListener("abort", onCanceledHandler);
|
|
11224
|
+
return onTransactionHandler(result);
|
|
11225
|
+
}).catch((reason) => {
|
|
11226
|
+
signal.removeEventListener("abort", onCanceledHandler);
|
|
11227
|
+
return onErrorsHandler(reason);
|
|
11228
|
+
});
|
|
11225
11229
|
});
|
|
11226
11230
|
});
|
|
11227
11231
|
}
|