@stellar/typescript-wallet-sdk 5.0.0-beta.1788566740000 → 5.0.0
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/CHANGELOG.MD +1 -0
- package/lib/bundle.js +5 -3
- package/lib/bundle.js.map +1 -1
- package/lib/bundle_browser.js +5 -3
- package/lib/bundle_browser.js.map +1 -1
- package/lib/walletSdk/Watcher/index.d.ts +1 -1
- package/package.json +2 -2
- package/src/walletSdk/Watcher/index.ts +5 -3
- package/test/wallet.test.ts +122 -0
package/lib/bundle_browser.js
CHANGED
|
@@ -6573,7 +6573,8 @@ var Watcher = /** @class */ (function () {
|
|
|
6573
6573
|
try {
|
|
6574
6574
|
var newTransactions = transactions.filter(function (transaction) {
|
|
6575
6575
|
var isInProgress = transaction.status.indexOf("pending") === 0 ||
|
|
6576
|
-
transaction.status === Types_1.TransactionStatus.incomplete
|
|
6576
|
+
transaction.status === Types_1.TransactionStatus.incomplete ||
|
|
6577
|
+
transaction.status === Types_1.TransactionStatus.on_hold;
|
|
6577
6578
|
var registeredTransaction = _this._transactionsRegistry[assetCode][transaction.id];
|
|
6578
6579
|
// if this is the first watch, only keep the pending ones
|
|
6579
6580
|
if (!isRetry) {
|
|
@@ -6659,7 +6660,7 @@ var Watcher = /** @class */ (function () {
|
|
|
6659
6660
|
};
|
|
6660
6661
|
/**
|
|
6661
6662
|
* Watch a transaction until it stops pending. Takes three callbacks:
|
|
6662
|
-
* * onMessage - When the transaction comes back as pending_ or
|
|
6663
|
+
* * onMessage - When the transaction comes back as pending_, incomplete, or on_hold.
|
|
6663
6664
|
* * onSuccess - When the transaction comes back as completed / refunded / expired.
|
|
6664
6665
|
* * onError - When there's a runtime error, or the transaction comes back as
|
|
6665
6666
|
* no_market / too_small / too_large / error.
|
|
@@ -6731,7 +6732,8 @@ var Watcher = /** @class */ (function () {
|
|
|
6731
6732
|
}
|
|
6732
6733
|
_this._transactionsRegistry[assetCode][transaction.id] = transaction;
|
|
6733
6734
|
if (transaction.status.indexOf("pending") === 0 ||
|
|
6734
|
-
transaction.status === Types_1.TransactionStatus.incomplete
|
|
6735
|
+
transaction.status === Types_1.TransactionStatus.incomplete ||
|
|
6736
|
+
transaction.status === Types_1.TransactionStatus.on_hold) {
|
|
6735
6737
|
if (_this._oneTransactionWatcher[assetCode][id]) {
|
|
6736
6738
|
clearTimeout(_this._oneTransactionWatcher[assetCode][id]);
|
|
6737
6739
|
}
|