Skip to content

Commit dc9ad4e

Browse files
committed
Merge branch 'develop' into chore/ddw-1034-refactor-error-handling-in-rewards-only-wallets
2 parents af13d3a + 3b34f67 commit dc9ad4e

File tree

379 files changed

+29921
-30633
lines changed

Some content is hidden

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

379 files changed

+29921
-30633
lines changed

.babelrc

Lines changed: 0 additions & 30 deletions
This file was deleted.

.buildkite/pipeline.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,26 @@ env:
22
ARTIFACT_BUCKET: s3://ci-output-sink
33
steps:
44
- label: 'daedalus-x86_64-darwin'
5-
command: 'scripts/build-installer-unix.sh --build-id $BUILDKITE_BUILD_NUMBER'
5+
command: 'scripts/with-nix-2.5.sh scripts/build-installer-unix.sh --build-id $BUILDKITE_BUILD_NUMBER'
66
env:
77
NIX_SSL_CERT_FILE: /nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt
88
agents:
99
queue: daedalus
1010
system: x86_64-darwin
11+
- label: 'daedalus-aarch64-darwin'
12+
command: 'scripts/with-nix-2.5.sh scripts/build-installer-unix.sh --build-id $BUILDKITE_BUILD_NUMBER'
13+
env:
14+
NIX_SSL_CERT_FILE: /nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt
15+
UPLOAD_DIR_OVERRIDE: UNSAFE-internal-build
16+
agents:
17+
queue: daedalus
18+
system: aarch64-darwin
1119
- label: 'daedalus-x86_64-linux-nix'
12-
command: 'scripts/build-installer-nix.sh $BUILDKITE_BUILD_NUMBER'
20+
command: 'scripts/with-nix-2.5.sh scripts/build-installer-nix.sh $BUILDKITE_BUILD_NUMBER'
1321
agents:
1422
system: x86_64-linux
1523
- label: 'daedalus-x86_64-windows-nix'
16-
command: 'scripts/build-cross-windows.sh $BUILDKITE_BUILD_NUMBER'
24+
command: 'scripts/with-nix-2.5.sh scripts/build-cross-windows.sh $BUILDKITE_BUILD_NUMBER'
1725
agents:
1826
system: x86_64-linux
1927

.eslintrc

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
"plugin:@typescript-eslint/recommended",
1111
"plugin:react/recommended",
1212
"prettier",
13-
"prettier/babel",
14-
"prettier/@typescript-eslint",
15-
"prettier/react",
1613
"plugin:jest/recommended"
1714
],
1815
"env": {
@@ -22,9 +19,11 @@
2219
"jest": true
2320
},
2421
"rules": {
22+
"arrow-body-style": 0,
2523
"class-methods-use-this": 0,
2624
"consistent-return": "warn",
2725
"@typescript-eslint/generic-spacing": 0,
26+
"@typescript-eslint/space-after-type-colon": 0,
2827
"jsx-a11y/alt-text": 0,
2928
"lines-between-class-members": 0,
3029
"global-require": 0,
@@ -60,6 +59,7 @@
6059
"react/destructuring-assignment": 0,
6160
"react/display-name": 0,
6261
"react/jsx-curly-brace-presence": 0,
62+
"react/jsx-curly-newline": 0,
6363
"react/jsx-filename-extension": 0,
6464
"react/jsx-fragments": 0,
6565
"react/jsx-no-bind": "warn",
@@ -76,22 +76,28 @@
7676
"@typescript-eslint/no-empty-function": 1,
7777
"@typescript-eslint/ban-types": 1,
7878
"import/no-unresolved": 1,
79-
"@typescript-eslint/no-var-requires": 1,
79+
"@typescript-eslint/no-var-requires": 0,
8080
"camelcase": 1,
8181
"no-empty": 1,
8282
"@typescript-eslint/no-explicit-any": 1,
8383
"no-shadow": 1,
8484
"react/no-did-update-set-state": 1,
8585
"react/sort-comp": 0,
8686
"react/state-in-constructor": 0,
87-
"react/static-property-placement": 0
87+
"react/static-property-placement": 0,
88+
"react/jsx-no-useless-fragment": 0,
89+
"prefer-regex-literals": 0,
90+
"no-unused-vars": "warn",
91+
"react/no-unused-class-component-methods": "warn",
92+
"react/no-unstable-nested-components": "warn",
93+
"no-promise-executor-return": "warn",
94+
"default-param-last": "warn"
8895
},
8996
"plugins": ["@typescript-eslint", "import", "promise", "react", "jest"],
9097
"globals": {
9198
"API": true,
9299
"API_VERSION": true,
93100
"NETWORK": true,
94-
"MOBX_DEV_TOOLS": true,
95101
"BUILD_NUMBER": true,
96102
"Process": true // TODO: remove after fix
97103
},
@@ -109,6 +115,12 @@
109115
"no-useless-constructor": "off",
110116
"@typescript-eslint/no-useless-constructor": "error"
111117
}
118+
},
119+
{
120+
"files": "hardware-wallet-tests/**/*.ts",
121+
"rules": {
122+
"jest/no-standalone-expect": "off"
123+
}
112124
}
113125
]
114126
}

.github/workflows/chromatic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Setup Node.js
1919
uses: actions/setup-node@v2
2020
with:
21-
node-version: "14"
21+
node-version: "16"
2222
- name: Install dependencies
2323
run: yarn
2424
- name: Publish to Chromatic

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ build/Release
3131
# Dependency directory
3232
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
3333
node_modules
34+
/node_modules.*
3435

3536
# OSX
3637
.DS_Store
@@ -41,6 +42,14 @@ installers/tls/client
4142
installers/tls/server
4243
installers/DLLs
4344
installers/libressl
45+
installers/cfg-files
46+
installers/config.yaml
47+
installers/icons/electron.icns
48+
installers/installer-config.json
49+
installers/topology.yaml
50+
installers/csl-daedalus/
51+
installers/delegation.cert
52+
installers/signing.key
4453

4554
# temporary certs for daedalus dev
4655
tls/client
@@ -119,6 +128,8 @@ Debug
119128
/cardano-cli
120129
/cardano-wallet
121130
.vscode
131+
.yalc
132+
yalc.lock
122133

123134
# Typescript
124135
*.scss.d.ts

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
!source/
66
!features/
77
!storybook/
8+
!hardware-wallet-tests/
9+
!tests/
810

911
# Now we ignore all files
1012
*.*

CHANGELOG.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,41 @@
22

33
## vNext
44

5+
### Fixes
6+
7+
- Fixed downloaded installer being left in Downloads after latest update installs ([PR 2941](https://github.com/input-output-hk/daedalus/pull/2941))
8+
- Fixed incorrect amount of token sent ([PR 2962](https://github.com/input-output-hk/daedalus/pull/2962))
9+
10+
### Chores
11+
12+
- Added Vasil-supported cardano-wallet ([PR 3001](https://github.com/input-output-hk/daedalus/pull/3001))
13+
- Upgraded webpack to version 5 ([PR 2772](https://github.com/input-output-hk/daedalus/pull/2772))
14+
15+
## 4.11.0
16+
17+
### Fixes
18+
19+
- Fixed incorrect behaviour of creating new wallet when paired incorrect hardware wallet during address verification ([PR 2906](https://github.com/input-output-hk/daedalus/pull/2906))
20+
- Fixed phrasing of insufficient funds for tokens message ([PR 2966](https://github.com/input-output-hk/daedalus/pull/2966))
21+
- Improved error handling for incorrect passphrase and incorrect hardware wallet error ([PR 2860](https://github.com/input-output-hk/daedalus/pull/2860))
22+
523
### Features
624

25+
- Added support for Ledger Nano S Plus ([PR 2975](https://github.com/input-output-hk/daedalus/pull/2975))
26+
- Support of Apple AArch64 chip ([PR 2684](https://github.com/input-output-hk/daedalus/pull/2684))
27+
28+
### Chores
29+
30+
- Bumped vulnerable dependencies versions ([PR 2943](https://github.com/input-output-hk/daedalus/pull/2943))
31+
- Added support for Trezor firmware 2.5.1 ([PR 2991](https://github.com/input-output-hk/daedalus/pull/2991))
32+
- Added steps on how to link with `react-polymorph` and other external UI libraries ([PR 2948](https://github.com/input-output-hk/daedalus/pull/2948))
33+
- Published selfnode installers for all 3 platforms ([PR 2971](https://github.com/input-output-hk/daedalus/pull/2971))
34+
35+
## 4.10.0
36+
37+
### Features
38+
39+
- Implemented hover tooltips for menu ([PR 2938](https://github.com/input-output-hk/daedalus/pull/2938))
740
- Improved UI regarding the Hardware Wallet public key export error ([PR 2922](https://github.com/input-output-hk/daedalus/pull/2922))
841
- Added ASCII name to token header when metadata name is missing ([PR 2904](https://github.com/input-output-hk/daedalus/pull/2904))
942
- Improved IPC by reducing the amount of messages from periodic events ([PR 2892](https://github.com/input-output-hk/daedalus/pull/2892))
@@ -12,6 +45,10 @@
1245

1346
### Fixes
1447

48+
- Fixed dialogs being closed after receiving address shared ([PR 2965](https://github.com/input-output-hk/daedalus/pull/2965))
49+
- Fixed no progress shown on loading screen on Windows ([PR 2967](https://github.com/input-output-hk/daedalus/pull/2967))
50+
- Fixes hardware wallet issues on Windows ([PR 2900](https://github.com/input-output-hk/daedalus/pull/2900))
51+
- Fixed stake pool list styling ([PR 2920](https://github.com/input-output-hk/daedalus/pull/2920))
1552
- Fixed PopOver overlap ([PR 2954](https://github.com/input-output-hk/daedalus/pull/2954))
1653
- Fixed tooltip being hidden in several places ([PR-2934](https://github.com/input-output-hk/daedalus/pull/2934))
1754
- Adjusted padding for search field in stake pools ([PR 2945](https://github.com/input-output-hk/daedalus/pull/2945))
@@ -28,6 +65,9 @@
2865

2966
### Chores
3067

68+
- Updated cardano-wallet to v2022-04-27 and cardano-node to 1.34.1 ([PR 2951](https://github.com/input-output-hk/daedalus/pull/2951))
69+
- Refactor to remove duplicated code ([PR 2956](https://github.com/input-output-hk/daedalus/pull/2956))
70+
- Updated cardano-launcher to 0.20220119.0 ([PR 2839](https://github.com/input-output-hk/daedalus/pull/2839))
3171
- Added `storybook:build` check to pre-push hook ([PR 2955](https://github.com/input-output-hk/daedalus/pull/2955))
3272
- Using new faker.js ([PR 2855](https://github.com/input-output-hk/daedalus/pull/2855))
3373
- Fixed spelling issues and typos ([PR 2915](https://github.com/input-output-hk/daedalus/pull/2915))
@@ -81,7 +121,7 @@
81121
- Fixed behaviour of wallet settings option of the app menu ([PR 2838](https://github.com/input-output-hk/daedalus/pull/2838))
82122
- Fixed styling of ITN rewards feature ([PR 2861](https://github.com/input-output-hk/daedalus/pull/2861))
83123
- Fixed available disk space takes a long time to show ([PR 2849](https://github.com/input-output-hk/daedalus/pull/2849))
84-
124+
85125
### Chores
86126

87127
- Migrated codebase from javascript to typescript ([PR 2843](https://github.com/input-output-hk/daedalus/pull/2843))

README.md

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,13 @@ Daedalus - Cryptocurrency Wallet
4242
trusted-substituters =
4343
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
4444
extra-sandbox-paths = /System/Library/Frameworks /System/Library/PrivateFrameworks /usr/lib
45+
experimental-features = nix-command flakes
4546
46-
# If you are running on a Mac with M1 chip please uncomment 'system' setting to enforce running on Rosetta2
47-
# system = x86_64-darwin
47+
# If you are running on a Mac with Intel chip
48+
system = x86_64-darwin
49+
50+
# If you are running on a Mac with M1 chip
51+
system = aarch64-darwin
4852
```
4953

5054
3. Run `nix-shell` with correct list of arguments or by using existing `package.json` scripts to load a shell with all the correct versions of all the required dependencies for development.
@@ -105,21 +109,6 @@ If you get SSL error when running `nix-shell` (SSL peer certificate or SSH remot
105109
1. Run `yarn nix:testnet` from `daedalus`.
106110
2. Run `yarn dev` from the subsequent `nix-shell`
107111

108-
##### Staging
109-
110-
1. Run `yarn nix:staging` from `daedalus`.
111-
2. Run `yarn dev` from the subsequent `nix-shell`
112-
113-
##### Shelley QA
114-
115-
1. Run `yarn nix:shelley_qa` from `daedalus`.
116-
2. Run `yarn dev` from the subsequent `nix-shell`
117-
118-
##### Alonzo Purple
119-
120-
1. Run `yarn nix:alonzo_purple` from `daedalus`.
121-
2. Run `yarn dev` from the subsequent `nix-shell`
122-
123112
##### Native token metadata server
124113

125114
Daedalus, by default, uses the following metadata server for all networks except for the mainnet: `https://metadata.cardano-testnet.iohkdev.io/`.
@@ -222,6 +211,26 @@ You can debug the main process by following one of these approaches:
222211

223212
The inspector runs on port 9229
224213

214+
### Linking with UI Libraries (e.g. React Polymorph)
215+
216+
You can link libraries with Daedalus using one of the following steps:
217+
218+
#### 1) Using `yalc`
219+
220+
1) Install `yalc` globally using `yarn global add yalc`.
221+
2) Run `yalc publish` from the library's root directory that you want to link with Daedalus.
222+
3) Switch to Daedalus and run `yalc add <package-name>` or preferably `yalc link <package-name>`.
223+
4) You should be able to start Daedalus and see the changes you are making locally in the library.
224+
5) To make sure your changes are reflected as you update code in the library, use `yalc push`.
225+
226+
#### 2) Using `yarn link`
227+
228+
1) From the Daedalus root directory, go to `node_modules/react` and `yarn link`.
229+
2) Navigate to the `react-dom` package in the same directory and run `yarn link` again.
230+
3) Go to the library's root directory and run `yarn link`, `yarn link react` and `yarn link react-dom`.
231+
4) Go back to the Daedalus root directory and run `yarn link <package-name>`.
232+
5) Finally, run `yarn build:watch` from the library's root directory.
233+
225234
## Testing
226235

227236
You can find more details regarding tests setup within
-107 KB
Binary file not shown.

declaration.d.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
import { IpcRenderer } from 'electron';
2+
import type { request as httpRequest } from 'http';
3+
import type { request as httpsRequest, globalAgent } from 'https';
4+
import { Environment } from './source/common/types/environment.types';
5+
16
declare module '*.svg' {
27
const content: any;
38
export default content;
@@ -22,6 +27,15 @@ type Daedalus = {
2227
};
2328
};
2429

30+
interface Http {
31+
request: httpRequest;
32+
}
33+
34+
interface Https {
35+
request: httpsRequest;
36+
Agent: globalAgent;
37+
}
38+
2539
export type $ElementType<
2640
T extends { [P in K & any]: any },
2741
K extends keyof T | number
@@ -39,7 +53,18 @@ declare global {
3953
WALLET_COUNT: number;
4054
}
4155
}
56+
/* eslint-disable no-var, vars-on-top */
4257
var daedalus: Daedalus;
58+
var environment: Environment;
59+
var http: Http;
60+
var https: Https;
61+
var legacyStateDir: string;
62+
var isFlight: boolean;
63+
var ipcRenderer: Pick<
64+
IpcRenderer,
65+
'on' | 'once' | 'send' | 'removeListener' | 'removeAllListeners'
66+
>;
67+
/* eslint-enable no-var, vars-on-top */
4368
}
4469

4570
export {};

0 commit comments

Comments
 (0)