@polkadot/extension-base 0.46.8 → 0.46.9
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.
|
@@ -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
|
|
@@ -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.46.
|
|
4
|
+
exports.packageInfo = { name: '@polkadot/extension-base', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '0.46.9' };
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"./cjs/packageDetect.js"
|
|
19
19
|
],
|
|
20
20
|
"type": "module",
|
|
21
|
-
"version": "0.46.
|
|
21
|
+
"version": "0.46.9",
|
|
22
22
|
"main": "./cjs/index.js",
|
|
23
23
|
"module": "./index.js",
|
|
24
24
|
"types": "./index.d.ts",
|
|
@@ -217,15 +217,15 @@
|
|
|
217
217
|
}
|
|
218
218
|
},
|
|
219
219
|
"dependencies": {
|
|
220
|
-
"@polkadot/api": "^10.12.
|
|
221
|
-
"@polkadot/extension-chains": "0.46.
|
|
222
|
-
"@polkadot/extension-dapp": "0.46.
|
|
223
|
-
"@polkadot/extension-inject": "0.46.
|
|
220
|
+
"@polkadot/api": "^10.12.4",
|
|
221
|
+
"@polkadot/extension-chains": "0.46.9",
|
|
222
|
+
"@polkadot/extension-dapp": "0.46.9",
|
|
223
|
+
"@polkadot/extension-inject": "0.46.9",
|
|
224
224
|
"@polkadot/keyring": "^12.6.2",
|
|
225
225
|
"@polkadot/networks": "^12.6.2",
|
|
226
|
-
"@polkadot/phishing": "^0.22.
|
|
227
|
-
"@polkadot/rpc-provider": "^10.12.
|
|
228
|
-
"@polkadot/types": "^10.12.
|
|
226
|
+
"@polkadot/phishing": "^0.22.4",
|
|
227
|
+
"@polkadot/rpc-provider": "^10.12.4",
|
|
228
|
+
"@polkadot/types": "^10.12.4",
|
|
229
229
|
"@polkadot/ui-keyring": "^3.6.5",
|
|
230
230
|
"@polkadot/ui-settings": "^3.6.5",
|
|
231
231
|
"@polkadot/util": "^12.6.2",
|
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.46.
|
|
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.46.9' };
|