Skip to content

Commit 95c5950

Browse files
[DDW-779] Merges-in latest develo branch and fix yarn.lock conflicts
2 parents 43c8120 + 516f47b commit 95c5950

File tree

133 files changed

+3312
-872
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+3312
-872
lines changed

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,24 @@
44

55
### Chores
66

7-
- Updated `trezor-connect` dependency to version `8.2.2` ([PR 2726](https://github.com/input-output-hk/daedalus/pull/2726))
7+
- Updated `trezor-connect` dependency to version `8.2.3` ([PR 2726](https://github.com/input-output-hk/daedalus/pull/2726))
8+
- Updated `cardano-wallet` to version `2021-11-11` ([PR 2765](https://github.com/input-output-hk/daedalus/pull/2765))
89
- Added jest library for unit testing ([PR 2633](https://github.com/input-output-hk/daedalus/pull/2633))
910
- Updated `cardano-launcher` to version `0.20211105.1` and added Cardano Node RTS flags which improve resource usage ([PR 2735](https://github.com/input-output-hk/daedalus/pull/2735), [PR 2741](https://github.com/input-output-hk/daedalus/pull/2741))
1011

12+
### Features
13+
14+
- Implemented "discreet mode" ([PR 2723](https://github.com/input-output-hk/daedalus/pull/2723), [PR 2724](https://github.com/input-output-hk/daedalus/pull/2724), [PR 2725](https://github.com/input-output-hk/daedalus/pull/2725), [PR 2742](https://github.com/input-output-hk/daedalus/pull/2742), [PR 2740](https://github.com/input-output-hk/daedalus/pull/2740), [PR 2756](https://github.com/input-output-hk/daedalus/pull/2756))
15+
- Updated slider component to only execute onAfterChange if slider had moved ([PR 2766](https://github.com/input-output-hk/daedalus/pull/2766))
16+
17+
### Fixes
18+
19+
- Fixed app update for specific platform ([PR 2759](https://github.com/input-output-hk/daedalus/pull/2759))
20+
21+
### Fixes
22+
23+
- Fixed checkbox tick offset ([PR 2751](https://github.com/input-output-hk/daedalus/pull/2751))
24+
1125
## 4.5.2
1226

1327
### Fixes

jest.config.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,11 @@ module.exports = {
8585
// ],
8686

8787
// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
88-
// moduleNameMapper: {},
88+
moduleNameMapper: {
89+
// Jest does not support WASM imports from ESM modules
90+
// https://github.com/facebook/jest/issues/9430
91+
'^@iohk-jormungandr/wallet-js$': 'identity-obj-proxy',
92+
},
8993

9094
// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
9195
// modulePathIgnorePatterns: [],
@@ -121,7 +125,7 @@ module.exports = {
121125
// rootDir: undefined,
122126

123127
// A list of paths to directories that Jest should use to search for files in
124-
roots: ['<rootDir>/tests'],
128+
roots: ['<rootDir>/tests', '<rootDir>/source'],
125129

126130
// Allows you to use a custom runner instead of Jest's default test runner
127131
// runner: "jest-runner",
@@ -171,7 +175,11 @@ module.exports = {
171175
// timers: "real",
172176

173177
// A map from regular expressions to paths to transformers
174-
// transform: undefined,
178+
transform: {
179+
'\\.[jt]sx?$': 'babel-jest',
180+
'^.+\\.svg$': 'jest-svg-transformer',
181+
'.+\\.(css|styl|less|sass|scss)$': 'jest-css-modules-transform',
182+
},
175183

176184
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
177185
// transformIgnorePatterns: [

nix/sources.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
"homepage": null,
3030
"owner": "input-output-hk",
3131
"repo": "cardano-wallet",
32-
"rev": "6626489542ce442a8451fb46fb5339346e62b4ee",
33-
"sha256": "0n1vgbz3m73v33462ifg3qas9djwlpcvi1m0qxc7j15l3w5qhlw5",
32+
"rev": "dac16ba7e3bf64bf5474497656932fd342c3b720",
33+
"sha256": "012lnp5rah4qyl8r0v04d0rz28b1rdaz6flhjrahf45b9gx7mny1",
3434
"type": "tarball",
35-
"url": "https://github.com/input-output-hk/cardano-wallet/archive/6626489542ce442a8451fb46fb5339346e62b4ee.tar.gz",
35+
"url": "https://github.com/input-output-hk/cardano-wallet/archive/dac16ba7e3bf64bf5474497656932fd342c3b720.tar.gz",
3636
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
3737
},
3838
"gitignore": {

package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"start:dev": "NODE_ENV=development gulp start",
1313
"dev": "IS_WATCH_MODE=true gulp dev",
1414
"test": "NODE_ENV=test yarn build && yarn test:unit && yarn test:e2e:fail-fast",
15-
"test:jest": "jest",
15+
"test:jest": "NODE_OPTIONS=--experimental-vm-modules jest",
1616
"test:generate:report": "node tests/reporter.js",
1717
"test:unit": "yarn cucumber:run --require 'tests/**/unit/**/*.js' --tags '@unit and not @skip and not @wip'",
1818
"test:unit:rerun": "yarn cucumber:rerun --require 'tests/**/unit/**/*.js' --tags '@unit and not @skip and not @wip'",
@@ -87,6 +87,8 @@
8787
"@storybook/addons": "5.3.14",
8888
"@storybook/core": "5.3.14",
8989
"@storybook/react": "5.3.14",
90+
"@testing-library/jest-dom": "5.15.1",
91+
"@testing-library/react": "12.1.2",
9092
"asar": "2.1.0",
9193
"autodll-webpack-plugin": "0.4.2",
9294
"axios": "0.21.1",
@@ -130,8 +132,11 @@
130132
"hash.js": "1.1.7",
131133
"html-loader": "0.5.5",
132134
"husky": "4.3.0",
135+
"identity-obj-proxy": "3.0.0",
133136
"jest": "26.6.3",
137+
"jest-css-modules-transform": "^4.3.0",
134138
"jest-environment-jsdom": "26.6.2",
139+
"jest-svg-transformer": "^1.0.0",
135140
"markdown-loader": "5.1.0",
136141
"mini-css-extract-plugin": "0.9.0",
137142
"minimist": "1.2.5",
@@ -278,7 +283,6 @@
278283
"**/**/node-fetch": "2.6.1",
279284
"**/**/mobx-react-lite": "2.2.2",
280285
"**/**/ini": "1.3.8",
281-
"**/**/usb": "1.7.2",
282-
"**/**/istanbul-lib-report": "2.0.8"
286+
"**/**/usb": "1.7.2"
283287
}
284288
}

source/common/config/electron-store.config.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@ export const STORAGE_KEYS: {
2020
CURRENCY_ACTIVE: 'CURRENCY-ACTIVE',
2121
CURRENCY_SELECTED: 'CURRENCY-SELECTED',
2222
DATA_LAYER_MIGRATION_ACCEPTANCE: 'DATA-LAYER-MIGRATION-ACCEPTANCE',
23+
DISCREET_MODE_ENABLED: 'DISCREET-MODE-ENABLED',
24+
DISCREET_MODE_SETTINGS_TOOLTIP: 'DISCREET-MODE-SETTINGS-TOOLTIP',
25+
DISCREET_MODE_NOTIFICATION: 'DISCREET-MODE-NOTIFICATION',
2326
DOWNLOAD_MANAGER: 'DOWNLOAD-MANAGER',
24-
HARDWARE_WALLET_DEVICES: 'HARDWARE-WALLET-DEVICES',
2527
HARDWARE_WALLETS: 'HARDWARE-WALLETS',
28+
HARDWARE_WALLET_DEVICES: 'HARDWARE-WALLET-DEVICES',
2629
READ_NEWS: 'READ-NEWS',
2730
RESET: 'RESET',
2831
SMASH_SERVER: 'SMASH-SERVER',
@@ -35,7 +38,7 @@ export const STORAGE_KEYS: {
3538
USER_LOCALE: 'USER-LOCALE',
3639
USER_NUMBER_FORMAT: 'USER-NUMBER-FORMAT',
3740
USER_TIME_FORMAT: 'USER-TIME-FORMAT',
38-
WALLET_MIGRATION_STATUS: 'WALLET-MIGRATION-STATUS',
3941
WALLETS: 'WALLETS',
42+
WALLET_MIGRATION_STATUS: 'WALLET-MIGRATION-STATUS',
4043
WINDOW_BOUNDS: 'WINDOW-BOUNDS',
4144
};

source/common/types/electron-store.types.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ export type StorageKey =
1111
| 'CURRENCY-ACTIVE'
1212
| 'CURRENCY-SELECTED'
1313
| 'DATA-LAYER-MIGRATION-ACCEPTANCE'
14+
| 'DISCREET-MODE-ENABLED'
15+
| 'DISCREET-MODE-SETTINGS-TOOLTIP'
16+
| 'DISCREET-MODE-NOTIFICATION'
1417
| 'DOWNLOAD-MANAGER'
1518
| 'HARDWARE-WALLET-DEVICES'
1619
| 'HARDWARE-WALLETS'

source/main/cardano/CardanoWalletLauncher.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,7 @@ export async function CardanoWalletLauncher(
140140
});
141141

142142
// RTS flags:
143-
// 1) "-H4G -M6553M -c70" 16.0% peak RSS reduction and a sub-percentile CPU regression
144-
// 2) "-H4G -M6553M" 18.5% peak RSS reduction and a second-best CPU regression
145-
nodeConfig.rtsOpts = ['-H4G', '-M6553M', '-c70'];
143+
nodeConfig.rtsOpts = [];
146144
logger.info('Launching Cardano Node with RTS flags', {
147145
rtsFlags: nodeConfig.rtsOpts,
148146
});

source/main/ipc/electronStoreConversation.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ const reset = async () => {
3232
await unset(keys.CURRENCY_ACTIVE);
3333
await unset(keys.CURRENCY_SELECTED);
3434
await unset(keys.DATA_LAYER_MIGRATION_ACCEPTANCE);
35+
await unset(keys.DISCREET_MODE_ENABLED);
36+
await unset(keys.DISCREET_MODE_SETTINGS_TOOLTIP);
37+
await unset(keys.DISCREET_MODE_NOTIFICATION);
3538
await unset(keys.DOWNLOAD_MANAGER);
3639
await unset(keys.HARDWARE_WALLET_DEVICES);
3740
await unset(keys.HARDWARE_WALLETS);
Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
// @flow
22
export const installChromeExtensions = async (isDev: boolean) => {
33
if (isDev) {
4-
const installer = require('electron-devtools-installer'); // eslint-disable-line global-require
4+
const {
5+
default: installExtension,
6+
REACT_DEVELOPER_TOOLS,
7+
} = require('electron-devtools-installer'); // eslint-disable-line global-require
8+
const { app } = require('electron');
59

6-
const extensions = ['REACT_DEVELOPER_TOOLS'];
7-
const forceDownload = !!process.env.UPGRADE_EXTENSIONS;
8-
for (const name of extensions) {
9-
try {
10-
await installer.default(installer[name], forceDownload);
11-
} catch (e) {} // eslint-disable-line
12-
}
10+
const extensions = [REACT_DEVELOPER_TOOLS];
11+
const options = {
12+
loadExtensionOptions: { allowFileAccess: true },
13+
};
14+
15+
try {
16+
await app.whenReady();
17+
await installExtension(extensions, options);
18+
} catch (e) {} // eslint-disable-line
1319
}
1420
};

source/renderer/app/App.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ export default class App extends Component<{
4848
!isNodeStopping && // Daedalus is not shutting down
4949
!isNodeStopped; // Daedalus is not shutting down
5050

51+
if (document.documentElement) {
52+
document.documentElement.lang = locale;
53+
}
54+
5155
return (
5256
<Fragment>
5357
<ThemeManager variables={themeVars} />

0 commit comments

Comments
 (0)