@openocean.finance/wallet 0.4.59 → 0.4.60

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.
@@ -92,6 +92,9 @@ var MyNearWallet = /** @class */ (function (_super) {
92
92
  return __generator(this, function (_a) {
93
93
  switch (_a.label) {
94
94
  case 0:
95
+ if (window.localStorage.getItem('connectwallet') !== this.name) {
96
+ return [2 /*return*/];
97
+ }
95
98
  account_id = '';
96
99
  query = window.location.search.substring(1);
97
100
  vars = query.split("&");
@@ -123,6 +126,7 @@ var MyNearWallet = /** @class */ (function (_super) {
123
126
  case 0: return [4 /*yield*/, (0, helper_1.sleep)(1000)];
124
127
  case 1:
125
128
  _a.sent();
129
+ window.localStorage.setItem('connectwallet', this.name);
126
130
  return [4 /*yield*/, (0, near_api_js_1.connect)({
127
131
  networkId: "mainnet",
128
132
  keyStore: new near_api_js_1.keyStores.BrowserLocalStorageKeyStore(),
@@ -92,6 +92,9 @@ var NearWallet = /** @class */ (function (_super) {
92
92
  return __generator(this, function (_a) {
93
93
  switch (_a.label) {
94
94
  case 0:
95
+ if (window.localStorage.getItem('connectwallet') !== this.name) {
96
+ return [2 /*return*/];
97
+ }
95
98
  account_id = '';
96
99
  query = window.location.search.substring(1);
97
100
  vars = query.split("&");
@@ -123,6 +126,7 @@ var NearWallet = /** @class */ (function (_super) {
123
126
  case 0: return [4 /*yield*/, (0, helper_1.sleep)(1000)];
124
127
  case 1:
125
128
  _a.sent();
129
+ window.localStorage.setItem('connectwallet', this.name);
126
130
  return [4 /*yield*/, (0, near_api_js_1.connect)({
127
131
  networkId: "mainnet",
128
132
  keyStore: new near_api_js_1.keyStores.BrowserLocalStorageKeyStore(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openocean.finance/wallet",
3
- "version": "0.4.59",
3
+ "version": "0.4.60",
4
4
  "description": "A multi-chain wallets manager",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {