@polkadot/extension-base 0.46.8 → 0.47.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.
|
@@ -84,7 +84,7 @@ export default class Extension {
|
|
|
84
84
|
authorizedAccountsDiff.push([url, urlInfo.authorizedAccounts.filter((previousAddress) => previousAddress !== address)]);
|
|
85
85
|
});
|
|
86
86
|
this.__internal__state.updateAuthorizedAccounts(authorizedAccountsDiff);
|
|
87
|
-
// cycle through default account selection for auth and remove any
|
|
87
|
+
// cycle through default account selection for auth and remove any occurrence of the account
|
|
88
88
|
const newDefaultAuthAccounts = this.__internal__state.defaultAuthAccountSelection.filter((defaultSelectionAddress) => defaultSelectionAddress !== address);
|
|
89
89
|
this.__internal__state.updateDefaultAuthAccounts(newDefaultAuthAccounts);
|
|
90
90
|
keyring.forgetAccount(address);
|
|
@@ -10,12 +10,12 @@ const tabs = new Tabs(state);
|
|
|
10
10
|
export default function handler({ id, message, request }, port, extensionPortName = PORT_EXTENSION) {
|
|
11
11
|
const isExtension = !port || port?.name === extensionPortName;
|
|
12
12
|
const sender = port?.sender;
|
|
13
|
-
if (!sender) {
|
|
13
|
+
if (!isExtension && !sender) {
|
|
14
14
|
throw new Error('Unable to extract message sender');
|
|
15
15
|
}
|
|
16
16
|
const from = isExtension
|
|
17
17
|
? 'extension'
|
|
18
|
-
:
|
|
18
|
+
: sender?.url || sender?.tab?.url || '<unknown>';
|
|
19
19
|
const source = `${from}: ${id}: ${message}`;
|
|
20
20
|
console.log(` [in] ${source}`); // :: ${JSON.stringify(request)}`);
|
|
21
21
|
const promise = isExtension
|
|
@@ -87,7 +87,7 @@ class Extension {
|
|
|
87
87
|
authorizedAccountsDiff.push([url, urlInfo.authorizedAccounts.filter((previousAddress) => previousAddress !== address)]);
|
|
88
88
|
});
|
|
89
89
|
this.__internal__state.updateAuthorizedAccounts(authorizedAccountsDiff);
|
|
90
|
-
// cycle through default account selection for auth and remove any
|
|
90
|
+
// cycle through default account selection for auth and remove any occurrence of the account
|
|
91
91
|
const newDefaultAuthAccounts = this.__internal__state.defaultAuthAccountSelection.filter((defaultSelectionAddress) => defaultSelectionAddress !== address);
|
|
92
92
|
this.__internal__state.updateDefaultAuthAccounts(newDefaultAuthAccounts);
|
|
93
93
|
ui_keyring_1.default.forgetAccount(address);
|
|
@@ -15,12 +15,12 @@ const tabs = new Tabs_js_1.default(state);
|
|
|
15
15
|
function handler({ id, message, request }, port, extensionPortName = defaults_js_1.PORT_EXTENSION) {
|
|
16
16
|
const isExtension = !port || port?.name === extensionPortName;
|
|
17
17
|
const sender = port?.sender;
|
|
18
|
-
if (!sender) {
|
|
18
|
+
if (!isExtension && !sender) {
|
|
19
19
|
throw new Error('Unable to extract message sender');
|
|
20
20
|
}
|
|
21
21
|
const from = isExtension
|
|
22
22
|
? 'extension'
|
|
23
|
-
:
|
|
23
|
+
: sender?.url || sender?.tab?.url || '<unknown>';
|
|
24
24
|
const source = `${from}: ${id}: ${message}`;
|
|
25
25
|
console.log(` [in] ${source}`); // :: ${JSON.stringify(request)}`);
|
|
26
26
|
const promise = isExtension
|
package/cjs/packageInfo.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.packageInfo = void 0;
|
|
4
|
-
exports.packageInfo = { name: '@polkadot/extension-base', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '0.
|
|
4
|
+
exports.packageInfo = { name: '@polkadot/extension-base', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '0.47.1' };
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"./cjs/packageDetect.js"
|
|
19
19
|
],
|
|
20
20
|
"type": "module",
|
|
21
|
-
"version": "0.
|
|
21
|
+
"version": "0.47.1",
|
|
22
22
|
"main": "./cjs/index.js",
|
|
23
23
|
"module": "./index.js",
|
|
24
24
|
"types": "./index.d.ts",
|
|
@@ -217,17 +217,17 @@
|
|
|
217
217
|
}
|
|
218
218
|
},
|
|
219
219
|
"dependencies": {
|
|
220
|
-
"@polkadot/api": "^10.
|
|
221
|
-
"@polkadot/extension-chains": "0.
|
|
222
|
-
"@polkadot/extension-dapp": "0.
|
|
223
|
-
"@polkadot/extension-inject": "0.
|
|
220
|
+
"@polkadot/api": "^10.13.1",
|
|
221
|
+
"@polkadot/extension-chains": "0.47.1",
|
|
222
|
+
"@polkadot/extension-dapp": "0.47.1",
|
|
223
|
+
"@polkadot/extension-inject": "0.47.1",
|
|
224
224
|
"@polkadot/keyring": "^12.6.2",
|
|
225
225
|
"@polkadot/networks": "^12.6.2",
|
|
226
|
-
"@polkadot/phishing": "^0.22.
|
|
227
|
-
"@polkadot/rpc-provider": "^10.
|
|
228
|
-
"@polkadot/types": "^10.
|
|
229
|
-
"@polkadot/ui-keyring": "^3.6.
|
|
230
|
-
"@polkadot/ui-settings": "^3.6.
|
|
226
|
+
"@polkadot/phishing": "^0.22.5",
|
|
227
|
+
"@polkadot/rpc-provider": "^10.13.1",
|
|
228
|
+
"@polkadot/types": "^10.13.1",
|
|
229
|
+
"@polkadot/ui-keyring": "^3.6.6",
|
|
230
|
+
"@polkadot/ui-settings": "^3.6.6",
|
|
231
231
|
"@polkadot/util": "^12.6.2",
|
|
232
232
|
"@polkadot/util-crypto": "^12.6.2",
|
|
233
233
|
"eventemitter3": "^5.0.1",
|
package/packageInfo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const packageInfo = { name: '@polkadot/extension-base', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '0.
|
|
1
|
+
export const packageInfo = { name: '@polkadot/extension-base', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '0.47.1' };
|