Skip to content

Commit 847237b

Browse files
committed
Merge branch 'master' into PR-to-origin
2 parents cc95f25 + b098abe commit 847237b

File tree

34 files changed

+427
-288
lines changed

34 files changed

+427
-288
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
# CHANGELOG
22

3+
## 0.48.2 July 3, 2024
4+
5+
Contributed:
6+
7+
- Fix: forget account for legacy account without authorizedAccounts (Thanks to https://github.com/Tbaut)
8+
9+
Changes:
10+
11+
- Adjust ui imports for deterministic bundling
12+
13+
14+
## 0.48.1 June 27, 2024
15+
16+
- **Important** Not published to the stores, aligns with latest released packages.
17+
18+
Changes:
19+
20+
- Bump @polkadot/api to 12.0.2
21+
- NOTE: We are doing a minor bump because the api in this version now gives the option
22+
to modify payloads for `signAndSend`, `signAsync`, and `dryRun` which the extension does not use. That being said, for any user that digests that package it will be available to use as a feature.
23+
- Bump @polkadot/phishing to 0.22.10
24+
25+
326
## 0.47.6 June 18, 2024
427

528
Changes:

CONTRIBUTORS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
634 Jaco 2024 (#1302)
2-
91 Thibaut Sardan fix typos (#1343)
3-
28 Tarik Gul 0.47.6 (#1374)
2+
92 Thibaut Sardan Fix: forget account for legacy account without authorizedAccounts (#1381)
3+
32 Tarik Gul 0.48.2 (#1384)
44
7 Ivan Rukhavets Mention derivation in FAQ (#334)
55
4 Amaury Martiny PostMessageProvider with on('connected' | 'disconnected') (#279)
66
3 Antoine Estienne Add eth test for extension signature (#909)

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,24 @@ Find out more about how to use the extension as a Dapp developper, cookbook, as
2020
2. Run `corepack enable` [More information](https://github.com/nodejs/corepack?tab=readme-ov-file#corepack-enable--name)
2121
2. Install dependencies via `yarn install`
2222
3. Build all packages via `yarn build`
23-
- The `/packages/extension/build` will contain the exact code used in the add-on
24-
4. To regenerate the dst, and src compressed files run: `yarn build:zip`
23+
- The `/packages/extension/build` directory will contain the exact code used in the add-on, and should exactly match the uncompressed `master-build`.
24+
25+
NOTE: If you would like to regenerate the compressed `master-build.zip`, and `master-src.zip` files run: `yarn build:zip`
26+
27+
## Ensuring `master-build` and `master-src` dont have any diffs (For maintainers)
28+
29+
Summary: These are the steps to ensure the following builds don't have any diffs so that the firefox review goes smoothly.
30+
31+
1. Run `yarn build`
32+
2. Run `yarn build:zip` - This will generate a `master-build.zip`, and `master-src.zip`.
33+
3. Move `master-src.zip`, and `master-build.zip` to its own enviornment/folder.
34+
4. Uncompress `master-src.zip` to `master-zrc` and inside of `master-src` run `yarn && yarn build`.
35+
5. Uncompress `master-build.zip` to `master-build`.
36+
6. Now we can compare the two builds using `diff`, and `comm`
37+
- Run `diff -qr <path-to-master-build>/master-build <path-to-master-src>/packages/extension/build | sort`
38+
7. To sanity check important files (`background.js`, and `extension.js`) you can also run:
39+
- `comm -23 <(sort <path-to-master-build>/background.js) <(sort <path-to-master-src>/packages/extension/build/background.js) > diff`
40+
- `comm -23 <(sort <path-to-master-build>/extension.js) <(sort <path-to-master-src>/packages/extension/build/extension.js) > diff`
2541

2642
## Development version
2743

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
},
1515
"sideEffects": false,
1616
"type": "module",
17-
"version": "0.47.6",
17+
"version": "0.48.2",
1818
"versions": {
19-
"git": "0.47.6",
20-
"npm": "0.47.6"
19+
"git": "0.48.2",
20+
"npm": "0.48.2"
2121
},
2222
"workspaces": [
2323
"packages/*"
@@ -44,10 +44,10 @@
4444
"sinon-chrome": "^3.0.1"
4545
},
4646
"resolutions": {
47-
"@polkadot/api": "^11.3.1",
47+
"@polkadot/api": "^12.0.2",
4848
"@polkadot/keyring": "^12.6.2",
4949
"@polkadot/networks": "^12.6.2",
50-
"@polkadot/types": "^11.3.1",
50+
"@polkadot/types": "^12.0.2",
5151
"@polkadot/util": "^12.6.2",
5252
"@polkadot/util-crypto": "^12.6.2",
5353
"@polkadot/x-fetch": "^12.6.2",

packages/extension-base/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@
1818
"./packageDetect.cjs"
1919
],
2020
"type": "module",
21-
"version": "0.47.6",
21+
"version": "0.48.2",
2222
"main": "index.js",
2323
"dependencies": {
24-
"@polkadot/api": "^11.3.1",
25-
"@polkadot/extension-chains": "0.47.6",
26-
"@polkadot/extension-dapp": "0.47.6",
27-
"@polkadot/extension-inject": "0.47.6",
24+
"@polkadot/api": "^12.0.2",
25+
"@polkadot/extension-chains": "0.48.2",
26+
"@polkadot/extension-dapp": "0.48.2",
27+
"@polkadot/extension-inject": "0.48.2",
2828
"@polkadot/keyring": "^12.6.2",
2929
"@polkadot/networks": "^12.6.2",
30-
"@polkadot/phishing": "^0.22.9",
31-
"@polkadot/rpc-provider": "^11.3.1",
32-
"@polkadot/types": "^11.3.1",
30+
"@polkadot/phishing": "^0.22.10",
31+
"@polkadot/rpc-provider": "^12.0.2",
32+
"@polkadot/types": "^12.0.2",
3333
"@polkadot/ui-keyring": "^3.6.6",
3434
"@polkadot/ui-settings": "^3.6.6",
3535
"@polkadot/util": "^12.6.2",
@@ -39,6 +39,6 @@
3939
"tslib": "^2.6.2"
4040
},
4141
"devDependencies": {
42-
"@polkadot/extension-mocks": "0.47.6"
42+
"@polkadot/extension-mocks": "0.48.2"
4343
}
4444
}

packages/extension-base/src/background/handlers/Extension.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import type State from './State.js';
1515
import { ALLOWED_PATH, PASSWORD_EXPIRY_MS } from '@polkadot/extension-base/defaults';
1616
import { metadataExpand } from '@polkadot/extension-chains';
1717
import { TypeRegistry } from '@polkadot/types';
18-
import keyring from '@polkadot/ui-keyring';
18+
import { keyring } from '@polkadot/ui-keyring';
1919
import { accounts as accountsObservable } from '@polkadot/ui-keyring/observable/accounts';
2020
import { assert, isHex } from '@polkadot/util';
2121
import { keyExtractSuri, mnemonicGenerate, mnemonicValidate } from '@polkadot/util-crypto';
@@ -121,11 +121,11 @@ export default class Extension {
121121

122122
// cycle through authUrls and prepare the array of diff
123123
Object.entries(this.#state.authUrls).forEach(([url, urlInfo]) => {
124-
if (!urlInfo.authorizedAccounts.includes(address)) {
125-
return;
124+
// Note that urlInfo.authorizedAccounts may be undefined if this website entry
125+
// was created before the "account authorization per website" functionality was introduced
126+
if (urlInfo.authorizedAccounts?.includes(address)) {
127+
authorizedAccountsDiff.push([url, urlInfo.authorizedAccounts.filter((previousAddress) => previousAddress !== address)]);
126128
}
127-
128-
authorizedAccountsDiff.push([url, urlInfo.authorizedAccounts.filter((previousAddress) => previousAddress !== address)]);
129129
});
130130

131131
this.#state.updateAuthorizedAccounts(authorizedAccountsDiff);

packages/extension-base/src/background/handlers/State.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { BehaviorSubject } from 'rxjs';
1111

1212
import { addMetadata, knownMetadata } from '@polkadot/extension-chains';
1313
import { knownGenesis } from '@polkadot/networks/defaults';
14-
import settings from '@polkadot/ui-settings';
14+
import { settings } from '@polkadot/ui-settings';
1515
import { assert } from '@polkadot/util';
1616

1717
import { MetadataStore } from '../../stores/index.js';

packages/extension-base/src/background/handlers/Tabs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import type { AuthResponse } from './State.js';
1414
import type State from './State.js';
1515

1616
import { checkIfDenied } from '@polkadot/phishing';
17-
import keyring from '@polkadot/ui-keyring';
17+
import { keyring } from '@polkadot/ui-keyring';
1818
import { accounts as accountsObservable } from '@polkadot/ui-keyring/observable/accounts';
1919
import { assert, isNumber } from '@polkadot/util';
2020

packages/extension-base/src/packageInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
// Do not edit, auto-generated by @polkadot/dev
55

6-
export const packageInfo = { name: '@polkadot/extension-base', path: 'auto', type: 'auto', version: '0.47.6' };
6+
export const packageInfo = { name: '@polkadot/extension-base', path: 'auto', type: 'auto', version: '0.48.2' };

packages/extension-chains/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
"./packageDetect.cjs"
1919
],
2020
"type": "module",
21-
"version": "0.47.6",
21+
"version": "0.48.2",
2222
"main": "index.js",
2323
"dependencies": {
24-
"@polkadot/extension-inject": "0.47.6",
24+
"@polkadot/extension-inject": "0.48.2",
2525
"@polkadot/networks": "^12.6.2",
2626
"@polkadot/util": "^12.6.2",
2727
"@polkadot/util-crypto": "^12.6.2",

0 commit comments

Comments
 (0)