@stellar/typescript-wallet-sdk 1.1.1 → 1.1.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/README.md +32 -18
- package/lib/bundle.js +10 -56
- package/lib/bundle.js.map +1 -1
- package/lib/bundle_browser.js +10 -56
- package/lib/bundle_browser.js.map +1 -1
- package/package.json +1 -1
- package/src/walletSdk/Watcher/index.ts +9 -8
- package/test/wallet.test.ts +131 -16
package/lib/bundle_browser.js
CHANGED
|
@@ -41258,51 +41258,6 @@ function isEmpty(value) {
|
|
|
41258
41258
|
module.exports = isEmpty;
|
|
41259
41259
|
|
|
41260
41260
|
|
|
41261
|
-
/***/ }),
|
|
41262
|
-
|
|
41263
|
-
/***/ "./node_modules/lodash/isEqual.js":
|
|
41264
|
-
/*!****************************************!*\
|
|
41265
|
-
!*** ./node_modules/lodash/isEqual.js ***!
|
|
41266
|
-
\****************************************/
|
|
41267
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
41268
|
-
|
|
41269
|
-
var baseIsEqual = __webpack_require__(/*! ./_baseIsEqual */ "./node_modules/lodash/_baseIsEqual.js");
|
|
41270
|
-
|
|
41271
|
-
/**
|
|
41272
|
-
* Performs a deep comparison between two values to determine if they are
|
|
41273
|
-
* equivalent.
|
|
41274
|
-
*
|
|
41275
|
-
* **Note:** This method supports comparing arrays, array buffers, booleans,
|
|
41276
|
-
* date objects, error objects, maps, numbers, `Object` objects, regexes,
|
|
41277
|
-
* sets, strings, symbols, and typed arrays. `Object` objects are compared
|
|
41278
|
-
* by their own, not inherited, enumerable properties. Functions and DOM
|
|
41279
|
-
* nodes are compared by strict equality, i.e. `===`.
|
|
41280
|
-
*
|
|
41281
|
-
* @static
|
|
41282
|
-
* @memberOf _
|
|
41283
|
-
* @since 0.1.0
|
|
41284
|
-
* @category Lang
|
|
41285
|
-
* @param {*} value The value to compare.
|
|
41286
|
-
* @param {*} other The other value to compare.
|
|
41287
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
41288
|
-
* @example
|
|
41289
|
-
*
|
|
41290
|
-
* var object = { 'a': 1 };
|
|
41291
|
-
* var other = { 'a': 1 };
|
|
41292
|
-
*
|
|
41293
|
-
* _.isEqual(object, other);
|
|
41294
|
-
* // => true
|
|
41295
|
-
*
|
|
41296
|
-
* object === other;
|
|
41297
|
-
* // => false
|
|
41298
|
-
*/
|
|
41299
|
-
function isEqual(value, other) {
|
|
41300
|
-
return baseIsEqual(value, other);
|
|
41301
|
-
}
|
|
41302
|
-
|
|
41303
|
-
module.exports = isEqual;
|
|
41304
|
-
|
|
41305
|
-
|
|
41306
41261
|
/***/ }),
|
|
41307
41262
|
|
|
41308
41263
|
/***/ "./node_modules/lodash/isFinite.js":
|
|
@@ -76845,12 +76800,8 @@ var __assign = (this && this.__assign) || function () {
|
|
|
76845
76800
|
};
|
|
76846
76801
|
return __assign.apply(this, arguments);
|
|
76847
76802
|
};
|
|
76848
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
76849
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
76850
|
-
};
|
|
76851
76803
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
76852
76804
|
exports.Watcher = void 0;
|
|
76853
|
-
var isEqual_1 = __importDefault(__webpack_require__(/*! lodash/isEqual */ "./node_modules/lodash/isEqual.js"));
|
|
76854
76805
|
var Types_1 = __webpack_require__(/*! ../Types */ "./src/walletSdk/Types/index.ts");
|
|
76855
76806
|
// Do not create this object directly, use the Anchor class.
|
|
76856
76807
|
var Watcher = /** @class */ (function () {
|
|
@@ -76939,9 +76890,9 @@ var Watcher = /** @class */ (function () {
|
|
|
76939
76890
|
}
|
|
76940
76891
|
return isInProgress;
|
|
76941
76892
|
}
|
|
76942
|
-
// if we've had the transaction before, only report updates
|
|
76893
|
+
// if we've had the transaction before, only report updates if status changed
|
|
76943
76894
|
if (registeredTransaction) {
|
|
76944
|
-
return
|
|
76895
|
+
return registeredTransaction.status !== transaction.status;
|
|
76945
76896
|
}
|
|
76946
76897
|
// if it's NOT a registered transaction, and it's not the first
|
|
76947
76898
|
// roll, maybe it's a new transaction that achieved a final
|
|
@@ -77053,10 +77004,11 @@ var Watcher = /** @class */ (function () {
|
|
|
77053
77004
|
return;
|
|
77054
77005
|
}
|
|
77055
77006
|
var registeredTransaction = _this._transactionsRegistry[assetCode][transaction.id];
|
|
77056
|
-
// if we've had the transaction before, only report if there is a change
|
|
77007
|
+
// if we've had the transaction before, only report if there is a status change
|
|
77008
|
+
var isChanged = true;
|
|
77057
77009
|
if (registeredTransaction &&
|
|
77058
|
-
|
|
77059
|
-
|
|
77010
|
+
registeredTransaction.status === transaction.status) {
|
|
77011
|
+
isChanged = false;
|
|
77060
77012
|
}
|
|
77061
77013
|
_this._transactionsRegistry[assetCode][transaction.id] = transaction;
|
|
77062
77014
|
if (transaction.status.indexOf("pending") === 0 ||
|
|
@@ -77067,7 +77019,9 @@ var Watcher = /** @class */ (function () {
|
|
|
77067
77019
|
_this._oneTransactionWatcher[assetCode][id] = setTimeout(function () {
|
|
77068
77020
|
_this.watchOneTransaction(__assign(__assign({}, allParams), { isRetry: true }));
|
|
77069
77021
|
}, timeout);
|
|
77070
|
-
|
|
77022
|
+
if (isChanged) {
|
|
77023
|
+
onMessage(transaction);
|
|
77024
|
+
}
|
|
77071
77025
|
}
|
|
77072
77026
|
else if ([
|
|
77073
77027
|
Types_1.TransactionStatus.completed,
|
|
@@ -88972,7 +88926,7 @@ module.exports = JSON.parse('{"name":"stellar-sdk","version":"10.4.1","descripti
|
|
|
88972
88926
|
/***/ ((module) => {
|
|
88973
88927
|
|
|
88974
88928
|
"use strict";
|
|
88975
|
-
module.exports = JSON.parse('{"name":"@stellar/typescript-wallet-sdk","version":"1.1.
|
|
88929
|
+
module.exports = JSON.parse('{"name":"@stellar/typescript-wallet-sdk","version":"1.1.2","engines":{"node":">=18"},"browser":"./lib/bundle_browser.js","main":"./lib/bundle.js","types":"./lib/index.d.ts","license":"Apache-2.0","private":false,"devDependencies":{"@babel/preset-env":"^7.20.2","@stellar/eslint-config":"^2.1.2","@stellar/prettier-config":"^1.0.1","@stellar/tsconfig":"^1.0.2","@types/jest":"^29.4.0","@types/lodash":"^4.14.194","@types/sinon":"^10.0.15","babel-jest":"^29.4.1","crypto-browserify":"^3.12.0","eslint":"^8.33.0","husky":"^8.0.0","jest":"^29.4.1","npm-run-all":"^4.1.5","prettier":"^2.0.5","pretty-quick":"^2.0.1","sinon":"^15.1.0","stream-browserify":"^3.0.0","ts-jest":"^29.0.5","ts-loader":"^9.4.2","tslib":"^2.5.0","typescript":"^5.0.4","webpack":"^5.83.1","webpack-cli":"^5.1.1"},"dependencies":{"axios":"^1.4.0","https-browserify":"^1.0.0","jws":"^4.0.0","lodash":"^4.17.21","query-string":"^7.1.3","stellar-sdk":"^10.4.1","stream-http":"^3.2.0","url":"^0.11.0","util":"^0.12.5","utility-types":"^3.10.0"},"scripts":{"prepare":"yarn build","test":"jest --watchAll","build:web":"webpack --config webpack.config.js","build:node":"webpack --env NODE=true --config webpack.config.js","build":"run-p build:web build:node"}}');
|
|
88976
88930
|
|
|
88977
88931
|
/***/ })
|
|
88978
88932
|
|