@polkadot/extension-base 0.41.3-5 → 0.42.1
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/background/handlers/Extension.cjs +9 -8
- package/background/handlers/Extension.js +6 -6
- package/background/handlers/State.cjs +9 -12
- package/background/handlers/State.js +6 -8
- package/background/handlers/Tabs.cjs +6 -5
- package/background/handlers/Tabs.js +5 -5
- package/background/handlers/helpers.cjs +20 -0
- package/background/handlers/helpers.d.ts +1 -0
- package/background/handlers/helpers.js +13 -0
- package/background/types.d.ts +1 -0
- package/package.json +8 -3
- package/packageInfo.cjs +1 -1
- package/packageInfo.js +1 -1
- package/stores/Base.cjs +5 -10
- package/stores/Base.js +1 -2
|
@@ -13,8 +13,6 @@ var _classPrivateFieldLooseKey2 = _interopRequireDefault(require("@babel/runtime
|
|
|
13
13
|
|
|
14
14
|
var _defaults = require("@polkadot/extension-base/defaults");
|
|
15
15
|
|
|
16
|
-
var _chrome = _interopRequireDefault(require("@polkadot/extension-inject/chrome"));
|
|
17
|
-
|
|
18
16
|
var _types = require("@polkadot/types");
|
|
19
17
|
|
|
20
18
|
var _uiKeyring = _interopRequireDefault(require("@polkadot/ui-keyring"));
|
|
@@ -25,6 +23,8 @@ var _util = require("@polkadot/util");
|
|
|
25
23
|
|
|
26
24
|
var _utilCrypto = require("@polkadot/util-crypto");
|
|
27
25
|
|
|
26
|
+
var _helpers = require("./helpers.cjs");
|
|
27
|
+
|
|
28
28
|
var _subscriptions = require("./subscriptions.cjs");
|
|
29
29
|
|
|
30
30
|
// Copyright 2019-2021 @polkadot/extension authors & contributors
|
|
@@ -436,9 +436,12 @@ class Extension {
|
|
|
436
436
|
seedCreate(_ref19) {
|
|
437
437
|
let {
|
|
438
438
|
length = SEED_DEFAULT_LENGTH,
|
|
439
|
+
seed: _seed,
|
|
439
440
|
type
|
|
440
441
|
} = _ref19;
|
|
441
|
-
|
|
442
|
+
|
|
443
|
+
const seed = _seed || (0, _utilCrypto.mnemonicGenerate)(length);
|
|
444
|
+
|
|
442
445
|
return {
|
|
443
446
|
address: _uiKeyring.default.createFromUri(getSuri(seed, type), {}, type).address,
|
|
444
447
|
seed
|
|
@@ -607,18 +610,16 @@ class Extension {
|
|
|
607
610
|
}
|
|
608
611
|
|
|
609
612
|
windowOpen(path) {
|
|
610
|
-
const url = `${
|
|
613
|
+
const url = `${chrome.extension.getURL('index.html')}#${path}`;
|
|
611
614
|
|
|
612
615
|
if (!_defaults.ALLOWED_PATH.includes(path)) {
|
|
613
616
|
console.error('Not allowed to open the url:', url);
|
|
614
617
|
return false;
|
|
615
618
|
}
|
|
616
619
|
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
void _chrome.default.tabs.create({
|
|
620
|
+
(0, _helpers.withErrorLog)(() => chrome.tabs.create({
|
|
620
621
|
url
|
|
621
|
-
});
|
|
622
|
+
}));
|
|
622
623
|
return true;
|
|
623
624
|
}
|
|
624
625
|
|
|
@@ -3,12 +3,12 @@ import _classPrivateFieldLooseKey from "@babel/runtime/helpers/esm/classPrivateF
|
|
|
3
3
|
// Copyright 2019-2021 @polkadot/extension authors & contributors
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
import { ALLOWED_PATH, PASSWORD_EXPIRY_MS } from '@polkadot/extension-base/defaults';
|
|
6
|
-
import chrome from '@polkadot/extension-inject/chrome';
|
|
7
6
|
import { TypeRegistry } from '@polkadot/types';
|
|
8
7
|
import keyring from '@polkadot/ui-keyring';
|
|
9
8
|
import { accounts as accountsObservable } from '@polkadot/ui-keyring/observable/accounts';
|
|
10
9
|
import { assert, isHex } from '@polkadot/util';
|
|
11
10
|
import { keyExtractSuri, mnemonicGenerate, mnemonicValidate } from '@polkadot/util-crypto';
|
|
11
|
+
import { withErrorLog } from "./helpers.js";
|
|
12
12
|
import { createSubscription, unsubscribe } from "./subscriptions.js";
|
|
13
13
|
const SEED_DEFAULT_LENGTH = 12;
|
|
14
14
|
const SEED_LENGTHS = [12, 15, 18, 21, 24];
|
|
@@ -362,9 +362,11 @@ export default class Extension {
|
|
|
362
362
|
|
|
363
363
|
seedCreate({
|
|
364
364
|
length = SEED_DEFAULT_LENGTH,
|
|
365
|
+
seed: _seed,
|
|
365
366
|
type
|
|
366
367
|
}) {
|
|
367
|
-
const seed = mnemonicGenerate(length);
|
|
368
|
+
const seed = _seed || mnemonicGenerate(length);
|
|
369
|
+
|
|
368
370
|
return {
|
|
369
371
|
address: keyring.createFromUri(getSuri(seed, type), {}, type).address,
|
|
370
372
|
seed
|
|
@@ -527,11 +529,9 @@ export default class Extension {
|
|
|
527
529
|
return false;
|
|
528
530
|
}
|
|
529
531
|
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
void chrome.tabs.create({
|
|
532
|
+
withErrorLog(() => chrome.tabs.create({
|
|
533
533
|
url
|
|
534
|
-
});
|
|
534
|
+
}));
|
|
535
535
|
return true;
|
|
536
536
|
}
|
|
537
537
|
|
|
@@ -17,18 +17,17 @@ var _getId = require("@polkadot/extension-base/utils/getId");
|
|
|
17
17
|
|
|
18
18
|
var _extensionChains = require("@polkadot/extension-chains");
|
|
19
19
|
|
|
20
|
-
var _chrome = _interopRequireDefault(require("@polkadot/extension-inject/chrome"));
|
|
21
|
-
|
|
22
20
|
var _uiSettings = _interopRequireDefault(require("@polkadot/ui-settings"));
|
|
23
21
|
|
|
24
22
|
var _util = require("@polkadot/util");
|
|
25
23
|
|
|
26
24
|
var _index = require("../../stores/index.cjs");
|
|
27
25
|
|
|
26
|
+
var _helpers = require("./helpers.cjs");
|
|
27
|
+
|
|
28
28
|
// Copyright 2019-2021 @polkadot/extension-bg authors & contributors
|
|
29
29
|
// SPDX-License-Identifier: Apache-2.0
|
|
30
|
-
const NOTIFICATION_URL =
|
|
31
|
-
|
|
30
|
+
const NOTIFICATION_URL = chrome.extension.getURL('notification.html');
|
|
32
31
|
const POPUP_WINDOW_OPTS = {
|
|
33
32
|
focused: true,
|
|
34
33
|
height: 621,
|
|
@@ -269,14 +268,13 @@ class State {
|
|
|
269
268
|
}
|
|
270
269
|
|
|
271
270
|
popupClose() {
|
|
272
|
-
(0, _classPrivateFieldLooseBase2.default)(this, _windows)[_windows].forEach(id =>
|
|
273
|
-
void _chrome.default.windows.remove(id));
|
|
271
|
+
(0, _classPrivateFieldLooseBase2.default)(this, _windows)[_windows].forEach(id => (0, _helpers.withErrorLog)(() => chrome.windows.remove(id)));
|
|
274
272
|
|
|
275
273
|
(0, _classPrivateFieldLooseBase2.default)(this, _windows)[_windows] = [];
|
|
276
274
|
}
|
|
277
275
|
|
|
278
276
|
popupOpen() {
|
|
279
|
-
(0, _classPrivateFieldLooseBase2.default)(this, _notification)[_notification] !== 'extension' &&
|
|
277
|
+
(0, _classPrivateFieldLooseBase2.default)(this, _notification)[_notification] !== 'extension' && chrome.windows.create((0, _classPrivateFieldLooseBase2.default)(this, _notification)[_notification] === 'window' ? NORMAL_WINDOW_OPTS : POPUP_WINDOW_OPTS, window => {
|
|
280
278
|
if (window) {
|
|
281
279
|
(0, _classPrivateFieldLooseBase2.default)(this, _windows)[_windows].push(window.id || 0);
|
|
282
280
|
}
|
|
@@ -297,11 +295,10 @@ class State {
|
|
|
297
295
|
const authCount = this.numAuthRequests;
|
|
298
296
|
const metaCount = this.numMetaRequests;
|
|
299
297
|
const signCount = this.numSignRequests;
|
|
300
|
-
const text = authCount ? 'Auth' : metaCount ? 'Meta' : signCount ? `${signCount}` : '';
|
|
301
|
-
|
|
302
|
-
void _chrome.default.browserAction.setBadgeText({
|
|
298
|
+
const text = authCount ? 'Auth' : metaCount ? 'Meta' : signCount ? `${signCount}` : '';
|
|
299
|
+
(0, _helpers.withErrorLog)(() => chrome.browserAction.setBadgeText({
|
|
303
300
|
text
|
|
304
|
-
});
|
|
301
|
+
}));
|
|
305
302
|
|
|
306
303
|
if (shouldClose && text === '') {
|
|
307
304
|
this.popupClose();
|
|
@@ -421,7 +418,7 @@ class State {
|
|
|
421
418
|
const provider = (0, _classPrivateFieldLooseBase2.default)(this, _injectedProviders)[_injectedProviders].get(port);
|
|
422
419
|
|
|
423
420
|
if (provider) {
|
|
424
|
-
|
|
421
|
+
(0, _helpers.withErrorLog)(() => provider.disconnect());
|
|
425
422
|
}
|
|
426
423
|
|
|
427
424
|
(0, _classPrivateFieldLooseBase2.default)(this, _injectedProviders)[_injectedProviders].delete(port);
|
|
@@ -5,10 +5,10 @@ import _classPrivateFieldLooseKey from "@babel/runtime/helpers/esm/classPrivateF
|
|
|
5
5
|
import { BehaviorSubject } from 'rxjs';
|
|
6
6
|
import { getId } from '@polkadot/extension-base/utils/getId';
|
|
7
7
|
import { addMetadata, knownMetadata } from '@polkadot/extension-chains';
|
|
8
|
-
import chrome from '@polkadot/extension-inject/chrome';
|
|
9
8
|
import settings from '@polkadot/ui-settings';
|
|
10
9
|
import { assert } from '@polkadot/util';
|
|
11
10
|
import { MetadataStore } from "../../stores/index.js";
|
|
11
|
+
import { withErrorLog } from "./helpers.js";
|
|
12
12
|
const NOTIFICATION_URL = chrome.extension.getURL('notification.html');
|
|
13
13
|
const POPUP_WINDOW_OPTS = {
|
|
14
14
|
focused: true,
|
|
@@ -239,8 +239,7 @@ export default class State {
|
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
popupClose() {
|
|
242
|
-
_classPrivateFieldLooseBase(this, _windows)[_windows].forEach(id =>
|
|
243
|
-
void chrome.windows.remove(id));
|
|
242
|
+
_classPrivateFieldLooseBase(this, _windows)[_windows].forEach(id => withErrorLog(() => chrome.windows.remove(id)));
|
|
244
243
|
|
|
245
244
|
_classPrivateFieldLooseBase(this, _windows)[_windows] = [];
|
|
246
245
|
}
|
|
@@ -267,11 +266,10 @@ export default class State {
|
|
|
267
266
|
const authCount = this.numAuthRequests;
|
|
268
267
|
const metaCount = this.numMetaRequests;
|
|
269
268
|
const signCount = this.numSignRequests;
|
|
270
|
-
const text = authCount ? 'Auth' : metaCount ? 'Meta' : signCount ? `${signCount}` : '';
|
|
271
|
-
|
|
272
|
-
void chrome.browserAction.setBadgeText({
|
|
269
|
+
const text = authCount ? 'Auth' : metaCount ? 'Meta' : signCount ? `${signCount}` : '';
|
|
270
|
+
withErrorLog(() => chrome.browserAction.setBadgeText({
|
|
273
271
|
text
|
|
274
|
-
});
|
|
272
|
+
}));
|
|
275
273
|
|
|
276
274
|
if (shouldClose && text === '') {
|
|
277
275
|
this.popupClose();
|
|
@@ -391,7 +389,7 @@ export default class State {
|
|
|
391
389
|
const provider = _classPrivateFieldLooseBase(this, _injectedProviders)[_injectedProviders].get(port);
|
|
392
390
|
|
|
393
391
|
if (provider) {
|
|
394
|
-
provider.disconnect()
|
|
392
|
+
withErrorLog(() => provider.disconnect());
|
|
395
393
|
}
|
|
396
394
|
|
|
397
395
|
_classPrivateFieldLooseBase(this, _injectedProviders)[_injectedProviders].delete(port);
|
|
@@ -27,6 +27,8 @@ var _RequestBytesSign = _interopRequireDefault(require("../RequestBytesSign.cjs"
|
|
|
27
27
|
|
|
28
28
|
var _RequestExtrinsicSign = _interopRequireDefault(require("../RequestExtrinsicSign.cjs"));
|
|
29
29
|
|
|
30
|
+
var _helpers = require("./helpers.cjs");
|
|
31
|
+
|
|
30
32
|
var _subscriptions = require("./subscriptions.cjs");
|
|
31
33
|
|
|
32
34
|
// Copyright 2019-2021 @polkadot/extension authors & contributors
|
|
@@ -166,9 +168,9 @@ class Tabs {
|
|
|
166
168
|
const subscriptionId = await (0, _classPrivateFieldLooseBase2.default)(this, _state)[_state].rpcSubscribe(request, cb, port);
|
|
167
169
|
port.onDisconnect.addListener(() => {
|
|
168
170
|
(0, _subscriptions.unsubscribe)(id);
|
|
169
|
-
this.rpcUnsubscribe({ ...request,
|
|
171
|
+
(0, _helpers.withErrorLog)(() => this.rpcUnsubscribe({ ...request,
|
|
170
172
|
subscriptionId
|
|
171
|
-
}, port)
|
|
173
|
+
}, port));
|
|
172
174
|
});
|
|
173
175
|
return true;
|
|
174
176
|
}
|
|
@@ -202,10 +204,9 @@ class Tabs {
|
|
|
202
204
|
id
|
|
203
205
|
} = _ref6;
|
|
204
206
|
return id;
|
|
205
|
-
}).filter(id => (0, _util.isNumber)(id)).forEach(id =>
|
|
206
|
-
void chrome.tabs.update(id, {
|
|
207
|
+
}).filter(id => (0, _util.isNumber)(id)).forEach(id => (0, _helpers.withErrorLog)(() => chrome.tabs.update(id, {
|
|
207
208
|
url
|
|
208
|
-
}));
|
|
209
|
+
})));
|
|
209
210
|
});
|
|
210
211
|
}
|
|
211
212
|
|
|
@@ -10,6 +10,7 @@ import { accounts as accountsObservable } from '@polkadot/ui-keyring/observable/
|
|
|
10
10
|
import { assert, isNumber } from '@polkadot/util';
|
|
11
11
|
import RequestBytesSign from "../RequestBytesSign.js";
|
|
12
12
|
import RequestExtrinsicSign from "../RequestExtrinsicSign.js";
|
|
13
|
+
import { withErrorLog } from "./helpers.js";
|
|
13
14
|
import { createSubscription, unsubscribe } from "./subscriptions.js";
|
|
14
15
|
|
|
15
16
|
function transformAccounts(accounts, anyType = false) {
|
|
@@ -130,9 +131,9 @@ export default class Tabs {
|
|
|
130
131
|
const subscriptionId = await _classPrivateFieldLooseBase(this, _state)[_state].rpcSubscribe(request, cb, port);
|
|
131
132
|
port.onDisconnect.addListener(() => {
|
|
132
133
|
unsubscribe(id);
|
|
133
|
-
this.rpcUnsubscribe({ ...request,
|
|
134
|
+
withErrorLog(() => this.rpcUnsubscribe({ ...request,
|
|
134
135
|
subscriptionId
|
|
135
|
-
}, port)
|
|
136
|
+
}, port));
|
|
136
137
|
});
|
|
137
138
|
return true;
|
|
138
139
|
}
|
|
@@ -163,10 +164,9 @@ export default class Tabs {
|
|
|
163
164
|
}, tabs => {
|
|
164
165
|
tabs.map(({
|
|
165
166
|
id
|
|
166
|
-
}) => id).filter(id => isNumber(id)).forEach(id =>
|
|
167
|
-
void chrome.tabs.update(id, {
|
|
167
|
+
}) => id).filter(id => isNumber(id)).forEach(id => withErrorLog(() => chrome.tabs.update(id, {
|
|
168
168
|
url
|
|
169
|
-
}));
|
|
169
|
+
})));
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
172
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.withErrorLog = withErrorLog;
|
|
7
|
+
|
|
8
|
+
// Copyright 2019-2021 @polkadot/extension authors & contributors
|
|
9
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
10
|
+
function withErrorLog(fn) {
|
|
11
|
+
try {
|
|
12
|
+
const p = fn();
|
|
13
|
+
|
|
14
|
+
if (p && typeof p === 'object' && typeof p.catch === 'function') {
|
|
15
|
+
p.catch(console.error);
|
|
16
|
+
}
|
|
17
|
+
} catch (e) {
|
|
18
|
+
console.error(e);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function withErrorLog(fn: () => unknown): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Copyright 2019-2021 @polkadot/extension authors & contributors
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
export function withErrorLog(fn) {
|
|
4
|
+
try {
|
|
5
|
+
const p = fn();
|
|
6
|
+
|
|
7
|
+
if (p && typeof p === 'object' && typeof p.catch === 'function') {
|
|
8
|
+
p.catch(console.error);
|
|
9
|
+
}
|
|
10
|
+
} catch (e) {
|
|
11
|
+
console.error(e);
|
|
12
|
+
}
|
|
13
|
+
}
|
package/background/types.d.ts
CHANGED
|
@@ -241,6 +241,7 @@ export interface ResponseSigningIsLocked {
|
|
|
241
241
|
export declare type RequestSigningSubscribe = null;
|
|
242
242
|
export interface RequestSeedCreate {
|
|
243
243
|
length?: SeedLengths;
|
|
244
|
+
seed?: string;
|
|
244
245
|
type?: KeypairType;
|
|
245
246
|
}
|
|
246
247
|
export interface RequestSeedValidate {
|
package/package.json
CHANGED
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
},
|
|
15
15
|
"sideEffects": false,
|
|
16
16
|
"type": "module",
|
|
17
|
-
"version": "0.
|
|
17
|
+
"version": "0.42.1",
|
|
18
18
|
"main": "index.js",
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@babel/runtime": "^7.16.3",
|
|
21
21
|
"@polkadot/api": "^6.11.1",
|
|
22
|
-
"@polkadot/extension-dapp": "^0.
|
|
23
|
-
"@polkadot/extension-inject": "^0.
|
|
22
|
+
"@polkadot/extension-dapp": "^0.42.1",
|
|
23
|
+
"@polkadot/extension-inject": "^0.42.1",
|
|
24
24
|
"@polkadot/keyring": "^8.1.2",
|
|
25
25
|
"@polkadot/phishing": "^0.6.510",
|
|
26
26
|
"@polkadot/ui-keyring": "^0.87.5"
|
|
@@ -44,6 +44,11 @@
|
|
|
44
44
|
"default": "./background/handlers/Extension.test.js"
|
|
45
45
|
},
|
|
46
46
|
"./background/handlers/Extension.test.d.ts": "./background/handlers/Extension.test.d.ts",
|
|
47
|
+
"./background/handlers/helpers": {
|
|
48
|
+
"require": "./background/handlers/helpers.cjs",
|
|
49
|
+
"default": "./background/handlers/helpers.js"
|
|
50
|
+
},
|
|
51
|
+
"./background/handlers/helpers.d.ts": "./background/handlers/helpers.d.ts",
|
|
47
52
|
"./background/handlers/index.d.ts": "./background/handlers/index.d.ts",
|
|
48
53
|
"./background/handlers/State": {
|
|
49
54
|
"require": "./background/handlers/State.cjs",
|
package/packageInfo.cjs
CHANGED
package/packageInfo.js
CHANGED
package/stores/Base.cjs
CHANGED
|
@@ -11,12 +11,10 @@ var _classPrivateFieldLooseBase2 = _interopRequireDefault(require("@babel/runtim
|
|
|
11
11
|
|
|
12
12
|
var _classPrivateFieldLooseKey2 = _interopRequireDefault(require("@babel/runtime/helpers/classPrivateFieldLooseKey"));
|
|
13
13
|
|
|
14
|
-
var _chrome = _interopRequireDefault(require("@polkadot/extension-inject/chrome"));
|
|
15
|
-
|
|
16
14
|
// Copyright 2019-2021 @polkadot/extension-base authors & contributors
|
|
17
15
|
// SPDX-License-Identifier: Apache-2.0
|
|
18
16
|
const lastError = type => {
|
|
19
|
-
const error =
|
|
17
|
+
const error = chrome.runtime.lastError;
|
|
20
18
|
|
|
21
19
|
if (error) {
|
|
22
20
|
console.error(`BaseStore.${type}:: runtime.lastError:`, error);
|
|
@@ -35,7 +33,7 @@ class BaseStore {
|
|
|
35
33
|
}
|
|
36
34
|
|
|
37
35
|
all(update) {
|
|
38
|
-
|
|
36
|
+
chrome.storage.local.get(null, result => {
|
|
39
37
|
lastError('all');
|
|
40
38
|
Object.entries(result).filter(_ref => {
|
|
41
39
|
let [key] = _ref;
|
|
@@ -49,8 +47,7 @@ class BaseStore {
|
|
|
49
47
|
|
|
50
48
|
get(_key, update) {
|
|
51
49
|
const key = `${(0, _classPrivateFieldLooseBase2.default)(this, _prefix)[_prefix]}${_key}`;
|
|
52
|
-
|
|
53
|
-
_chrome.default.storage.local.get([key], result => {
|
|
50
|
+
chrome.storage.local.get([key], result => {
|
|
54
51
|
lastError('get');
|
|
55
52
|
update(result[key]);
|
|
56
53
|
});
|
|
@@ -58,8 +55,7 @@ class BaseStore {
|
|
|
58
55
|
|
|
59
56
|
remove(_key, update) {
|
|
60
57
|
const key = `${(0, _classPrivateFieldLooseBase2.default)(this, _prefix)[_prefix]}${_key}`;
|
|
61
|
-
|
|
62
|
-
_chrome.default.storage.local.remove(key, () => {
|
|
58
|
+
chrome.storage.local.remove(key, () => {
|
|
63
59
|
lastError('remove');
|
|
64
60
|
update && update();
|
|
65
61
|
});
|
|
@@ -67,8 +63,7 @@ class BaseStore {
|
|
|
67
63
|
|
|
68
64
|
set(_key, value, update) {
|
|
69
65
|
const key = `${(0, _classPrivateFieldLooseBase2.default)(this, _prefix)[_prefix]}${_key}`;
|
|
70
|
-
|
|
71
|
-
_chrome.default.storage.local.set({
|
|
66
|
+
chrome.storage.local.set({
|
|
72
67
|
[key]: value
|
|
73
68
|
}, () => {
|
|
74
69
|
lastError('set');
|
package/stores/Base.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import _classPrivateFieldLooseBase from "@babel/runtime/helpers/esm/classPrivateFieldLooseBase";
|
|
2
2
|
import _classPrivateFieldLooseKey from "@babel/runtime/helpers/esm/classPrivateFieldLooseKey";
|
|
3
|
+
|
|
3
4
|
// Copyright 2019-2021 @polkadot/extension-base authors & contributors
|
|
4
5
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
import chrome from '@polkadot/extension-inject/chrome';
|
|
6
|
-
|
|
7
6
|
const lastError = type => {
|
|
8
7
|
const error = chrome.runtime.lastError;
|
|
9
8
|
|