Skip to content

Commit a64cea9

Browse files
committed
Merge branch 'develop' into fix/ddw-941-rewards-export-remove-date-column
# Conflicts: # source/renderer/app/i18n/locales/defaultMessages.json
2 parents f9c3549 + 7a41f8d commit a64cea9

File tree

313 files changed

+2329
-2614
lines changed

Some content is hidden

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

313 files changed

+2329
-2614
lines changed

.github/workflows/chromatic.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ jobs:
2828
token: ${{ secrets.GITHUB_TOKEN }}
2929
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
3030
exitZeroOnChanges: true
31+
buildScriptName: 'storybook:build:chromatic'
3132
- name: Publish to Chromatic and auto accept changes
3233
if: github.ref == 'refs/heads/develop'
3334
uses: chromaui/action@v1
3435
with:
3536
token: ${{ secrets.GITHUB_TOKEN }}
3637
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
3738
autoAcceptChanges: true
39+
buildScriptName: 'storybook:build:chromatic'

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,6 @@ Debug
119119
/cardano-cli
120120
/cardano-wallet
121121
.vscode
122+
123+
# Typescript
124+
*.scss.d.ts

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44

55
### Features
66

7+
- Implemented error message when trying to leave wallet without enough ada to support tokens ([PR 2783](https://github.com/input-output-hk/daedalus/pull/2783))
8+
9+
### Chores
10+
11+
- Removed SASS ts-lint ignore comments ([PR 2870](https://github.com/input-output-hk/daedalus/pull/2870))
12+
- Enabled debugging of the main process ([PR 2893](https://github.com/input-output-hk/daedalus/pull/2893))
13+
14+
## 4.9.0
15+
16+
### Features
17+
718
- Added display of current/unspent rewards ([PR 2803](https://github.com/input-output-hk/daedalus/pull/2803))
819
- Improve the syncing screen by showing syncing progress split into three stages ([PR 2877](https://github.com/input-output-hk/daedalus/pull/2877))
920
- Improved stake pool searchbar ([PR 2847](https://github.com/input-output-hk/daedalus/pull/2847))
@@ -73,7 +84,6 @@
7384

7485
### Fixes
7586

76-
- Fixed styling of the incentivized testnet rewards wallet dropdown ([PR 2816](https://github.com/input-output-hk/daedalus/pull/2816/files))
7787
- Fixed blockchain verification progress text ([PR 2840](https://github.com/input-output-hk/daedalus/pull/2840))
7888

7989
## 4.7.0
@@ -84,10 +94,12 @@
8494

8595
### Fixes
8696

97+
- Fixed immediate language updates of application top menu bar ([PR 2813](https://github.com/input-output-hk/daedalus/pull/2813))
8798
- Fixed receiver address validation by disallowing rewards addresses ([PR 2781](https://github.com/input-output-hk/daedalus/pull/2781))
8899

89100
### Chores
90101

102+
- Integrated Chromatic for visual regression testing ([PR 2776](https://github.com/input-output-hk/daedalus/pull/2776))
91103
- Updated `trezor-connect` dependency to version `8.2.4` ([PR 2726](https://github.com/input-output-hk/daedalus/pull/2726))
92104
- Updated vulnerable dependencies ([PR 2769](https://github.com/input-output-hk/daedalus/pull/2769))
93105
- Updated CWB and Cardano Node ([PR 2799](https://github.com/input-output-hk/daedalus/pull/2799))

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,15 @@ Make sure to list bootstrap in externals in `webpack.config.base.js` or the app
194194
externals: ['bootstrap']
195195
```
196196

197+
### Debugging
198+
199+
You can debug the main process by following one of these approaches:
200+
- [VSCode](https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_attaching-to-nodejs)
201+
- [Chrome](https://nodejs.org/en/docs/guides/debugging-getting-started/#inspector-clients)
202+
- [IntelliJ](https://www.jetbrains.com/help/idea/run-debug-configuration-node-js-remote-debug.html)
203+
204+
The inspector runs on port 9229
205+
197206
## Testing
198207

199208
You can find more details regarding tests setup within

gulpfile.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const rendererWebpackConfig = require('./source/renderer/webpack.config');
88

99
// Setup electron-connect server to start the app in development mode
1010
let electronServer;
11+
const electronServerAgs = ['--inspect=9229'];
1112
// Gulp input sources for main and renderer compilation
1213
const mainInputSource = () => gulp.src('source/main/index.ts');
1314
const rendererInputSource = () => gulp.src('source/renderer/index.ts');
@@ -47,7 +48,7 @@ const buildMainWatch = () => (done) =>
4748
.pipe(
4849
webpackStream(mainWebpackWatchConfig, webpack, () => {
4950
// Restart app every time after main script has been re-compiled
50-
electronServer.restart();
51+
electronServer.restart(electronServerAgs);
5152
done();
5253
})
5354
)
@@ -79,7 +80,7 @@ gulp.task(
7980
gulp.task('clean:dist', shell.task('rimraf ./dist'));
8081

8182
gulp.task('server:start', (done) => {
82-
electronServer.start();
83+
electronServer.start(electronServerAgs);
8384
done();
8485
});
8586

@@ -92,13 +93,10 @@ gulp.task('server:create:dev', (done) => {
9293
});
9394

9495
gulp.task('server:create:debug', (done) => {
95-
createElectronServer(
96-
{
97-
NODE_ENV: process.env.NODE_ENV,
98-
XCURSOR_PATH: '/usr/share/icons' || 'development',
99-
},
100-
['--inspect', '--inspect-brk']
101-
);
96+
createElectronServer({
97+
NODE_ENV: process.env.NODE_ENV,
98+
XCURSOR_PATH: '/usr/share/icons' || 'development',
99+
});
102100
done();
103101
});
104102

@@ -171,6 +169,8 @@ gulp.task(
171169
)
172170
);
173171

172+
gulp.task('typedef:sass', shell.task('yarn typedef:sass --watch'));
173+
174174
gulp.task(
175175
'build:watch',
176176
gulp.series(
@@ -206,7 +206,10 @@ gulp.task(
206206

207207
gulp.task(
208208
'dev',
209-
gulp.series('server:create:dev', 'build:watch', 'server:start')
209+
gulp.parallel(
210+
gulp.series('server:create:dev', 'build:watch', 'server:start'),
211+
gulp.series('typedef:sass')
212+
)
210213
);
211214

212215
gulp.task(

package.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"cleanup": "mop -v",
3636
"lint": "eslint --format=node_modules/eslint-formatter-pretty source storybook utils --ext .ts,.tsx",
3737
"compile": "tsc --noEmit",
38+
"precompile": "yarn typedef:sass",
3839
"prettier": "./node_modules/.bin/prettier \"**/*.*\"",
3940
"prettier:check": "yarn prettier --check",
4041
"prettier:format": "yarn prettier --write --loglevel warn",
@@ -43,6 +44,7 @@
4344
"manage:translations": "gulp purge:translations && gulp clear:cache && gulp build && ts-node ./translations/translation-runner.ts",
4445
"storybook": "start-storybook -p 6006 -c storybook --ci /",
4546
"storybook:build": "build-storybook -c storybook -o dist/storybook",
47+
"storybook:build:chromatic": "build-storybook -c storybook",
4648
"themes:check:createTheme": "gulp build:themes && ts-node -r esm ./dist/scripts/check.js",
4749
"themes:update": "gulp build:themes && ts-node -r esm ./dist/scripts/update.js && yarn prettier --loglevel warn --write source/renderer/app/themes/daedalus/*.ts",
4850
"themes:copy": "ts-node -r @babel/register -r @babel/polyfill source/renderer/app/themes/utils/copyTheme.ts && yarn prettier --loglevel warn --write source/renderer/app/themes/daedalus/*.ts",
@@ -62,7 +64,8 @@
6264
"yoroi:wallet:importer": "ts-node utils/api-importer/yoroi-wallet-importer.ts",
6365
"create-news-verification-hashes": "ts-node utils/create-news-verification-hashes/index.ts",
6466
"lockfile:check": "ts-node utils/lockfile-checker/index.ts --check",
65-
"lockfile:fix": "ts-node utils/lockfile-checker/index.ts --fix"
67+
"lockfile:fix": "ts-node utils/lockfile-checker/index.ts --fix",
68+
"typedef:sass": "typed-scss-modules source/renderer/app"
6669
},
6770
"bin": {
6871
"electron": "./node_modules/.bin/electron"
@@ -148,12 +151,12 @@
148151
"mini-css-extract-plugin": "0.12.0",
149152
"minimist": "1.2.5",
150153
"mobx-react-devtools": "6.1.1",
151-
"node-forge": "0.10.0",
154+
"node-forge": "1.0.0",
152155
"node-libs-browser": "2.2.1",
153156
"node-sass": "4.14.1",
154157
"nodemon": "2.0.4",
155158
"npmlog": "4.1.2",
156-
"postcss": "7.0.39",
159+
"postcss": "8.2.13",
157160
"postcss-modules": "1.5.0",
158161
"prettier": "2.1.2",
159162
"pretty-quick": "3.0.2",
@@ -175,6 +178,7 @@
175178
"timemachine": "0.3.2",
176179
"transform-loader": "0.2.4",
177180
"ts-node": "^10.4.0",
181+
"typed-scss-modules": "5.0.0",
178182
"typescript": "^4.5.5",
179183
"url-loader": "2.0.1",
180184
"utf-8-validate": "5.0.2",
@@ -232,6 +236,7 @@
232236
"mobx-react-form": "2.0.8",
233237
"mobx-react-router": "4.1.0",
234238
"moment": "2.29.0",
239+
"nanoid": "3.2.0",
235240
"node-downloader-helper": "1.0.18",
236241
"omit-deep-lodash": "1.1.5",
237242
"pbkdf2": "3.0.17",
@@ -249,7 +254,7 @@
249254
"react-intl": "2.7.2",
250255
"react-lottie": "1.2.3",
251256
"react-markdown": "4.3.1",
252-
"react-polymorph": "1.0.3",
257+
"react-polymorph": "1.0.2",
253258
"react-router": "5.2.0",
254259
"react-router-dom": "5.2.0",
255260
"react-svg-inline": "2.1.1",

source/common/types/logging.types.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ import type { AdaApiStakePool } from '../../renderer/app/api/staking/types';
1919

2020
export type LoggingLevel = 'debug' | 'info' | 'error' | 'warn';
2121
export type Logger = {
22-
debug: (arg0: string, arg1: Record<string, any> | null | undefined) => void;
23-
info: (arg0: string, arg1: Record<string, any> | null | undefined) => void;
24-
error: (arg0: string, arg1: Record<string, any> | null | undefined) => void;
25-
warn: (arg0: string, arg1: Record<string, any> | null | undefined) => void;
22+
debug: (arg0: string, arg1?: Record<string, any> | null | undefined) => void;
23+
info: (arg0: string, arg1?: Record<string, any> | null | undefined) => void;
24+
error: (arg0: string, arg1?: Record<string, any> | null | undefined) => void;
25+
warn: (arg0: string, arg1?: Record<string, any> | null | undefined) => void;
2626
};
2727
export type FormatMessageContextParams = {
2828
appName: string;

source/main/ipc/downloadManagerChannel.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,9 @@ const getDownloadLocalData = async ({
211211

212212
const getDownloadsLocalData = async (): Promise<
213213
DownloadsLocalDataMainResponse
214-
// @ts-ignore ts-migrate(2322) FIXME: Type 'unknown' is not assignable to type 'Download... Remove this comment to see the full error message
215-
> => localStorage.getAll();
214+
> => {
215+
return localStorage.getAll() as Promise<DownloadsLocalDataMainResponse>;
216+
};
216217

217218
const clearDownloadLocalData = async ({
218219
fileName,

source/renderer/app/actions/lib/Action.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default class Action<Params> {
3030
this.listeners.push(listener);
3131
}
3232

33-
trigger(params: Params) {
33+
trigger(params?: Params) {
3434
this.listeners.forEach((listener) => listener(params));
3535
}
3636

source/renderer/app/actions/wallets-actions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export default class WalletsActions {
6060
passphrase: string;
6161
assets?: Array<AssetToken>;
6262
assetsAmounts?: Array<string>;
63+
hasAssetsRemainingAfterTransaction?: boolean;
6364
}> = new Action();
6465
chooseWalletExportType: Action<{
6566
walletExportType: WalletExportTypeChoices;

0 commit comments

Comments
 (0)