Skip to content

Commit 804c02d

Browse files
[DDW-1179] Merges-in latest develop branch and fix conflicts
2 parents f357ddc + 48ef792 commit 804c02d

File tree

13 files changed

+109
-43
lines changed

13 files changed

+109
-43
lines changed

.buildkite/pipeline.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,37 @@
11
env:
22
ARTIFACT_BUCKET: s3://ci-output-sink
33
steps:
4+
5+
- input: ':recycle: Trigger ‘x86_64-darwin’'
6+
key: 'trigger-x86_64-darwin'
7+
8+
- input: ':recycle: Trigger ‘aarch64-darwin’'
9+
key: 'trigger-aarch64-darwin'
10+
411
- label: 'daedalus-x86_64-darwin'
512
command: 'scripts/with-nix-2.5.sh scripts/build-installer-unix.sh --build-id $BUILDKITE_BUILD_NUMBER'
13+
depends_on: 'trigger-x86_64-darwin'
614
env:
715
NIX_SSL_CERT_FILE: /nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt
816
agents:
917
queue: daedalus
1018
system: x86_64-darwin
19+
1120
- label: 'daedalus-aarch64-darwin'
1221
command: 'scripts/with-nix-2.5.sh scripts/build-installer-unix.sh --build-id $BUILDKITE_BUILD_NUMBER'
22+
depends_on: 'trigger-aarch64-darwin'
1323
env:
1424
NIX_SSL_CERT_FILE: /nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt
1525
UPLOAD_DIR_OVERRIDE: UNSAFE-internal-build
1626
agents:
1727
queue: daedalus
1828
system: aarch64-darwin
29+
1930
- label: 'daedalus-x86_64-linux-nix'
2031
command: 'scripts/with-nix-2.5.sh scripts/build-installer-nix.sh $BUILDKITE_BUILD_NUMBER'
2132
agents:
2233
system: x86_64-linux
34+
2335
- label: 'daedalus-x86_64-windows-nix'
2436
command: 'scripts/with-nix-2.5.sh scripts/build-cross-windows.sh $BUILDKITE_BUILD_NUMBER'
2537
agents:

CHANGELOG.md

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

33
## vNext
44

5+
### Chores
6+
7+
- Updated `@cardano-foundation/ledgerjs-hw-app-cardano` to version `6.0.0` and `@ledgerhq/hw-transport-node-hid` to version `6.27.12` ([PR 3093](https://github.com/input-output-hk/daedalus/pull/3093))
8+
9+
## 5.2.0
10+
511
### Features
612

13+
- Added custom dimension to track legacy and hardware wallets ([PR 3091](https://github.com/input-output-hk/daedalus/pull/3091))
714
- Implemented CPU name grouping mechanism for analytics ([PR 3089](https://github.com/input-output-hk/daedalus/pull/3089))
815
- Implemented rounding RAM size in analytics ([PR 3088](https://github.com/input-output-hk/daedalus/pull/3088))
916

1017
### Chores
1118

12-
- Updated `@cardano-foundation/ledgerjs-hw-app-cardano` package to version `6.0.0` ([PR 3093](https://github.com/input-output-hk/daedalus/pull/3093))
19+
- Update `cardano-node` to 1.35.4 for the Preview network respin ([PR 3082](https://github.com/input-output-hk/daedalus/pull/3082))
1320
- Updated new Catalyst API URL ([PR 3087](https://github.com/input-output-hk/daedalus/pull/3087))
1421
- Fixed Storybook state for General stories ([PR 3064](https://github.com/input-output-hk/daedalus/pull/3064))
1522

CODE-OF-CONDUCT.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
See [Code of Conduct](https://github.com/input-output-hk/cardano-engineering-handbook/blob/main/CODE-OF-CONDUCT.md)

README.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<blockquote>
2-
<sub>Document maintainer: Nikola Glumac<br/>Document status: Active</sub>
2+
<sub>Document maintainer: Daniel Main<br/>Document status: Active</sub>
33
</blockquote>
44

55
# Daedalus
@@ -20,7 +20,7 @@ Daedalus - Cryptocurrency Wallet
2020

2121
[Nix](https://nixos.org/nix/) is needed to run Daedalus in `nix-shell`.
2222

23-
1. Install nix: `curl -L https://nixos.org/nix/install | sh` (use `sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume` on macOS Catalina)
23+
1. Install nix: `curl -L https://nixos.org/nix/install | sh` (use `sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume` on macOS 10.15 and higher)
2424
2. Employ the signed IOHK binary cache:
2525
```bash
2626
$ sudo mkdir -p /etc/nix
@@ -41,9 +41,15 @@ Daedalus - Cryptocurrency Wallet
4141
substituters = https://cache.iog.io https://cache.nixos.org/
4242
trusted-substituters =
4343
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
44+
45+
# Only if using mac
4446
extra-sandbox-paths = /System/Library/Frameworks /System/Library/PrivateFrameworks /usr/lib
47+
4548
experimental-features = nix-command flakes
4649
50+
# If you are running on Linux x86/64
51+
system = x86_64-linux
52+
4753
# If you are running on a Mac with Intel chip
4854
system = x86_64-darwin
4955
@@ -70,16 +76,16 @@ If you get SSL error when running `nix-shell` (SSL peer certificate or SSH remot
7076
1. Run `yarn nix:selfnode` from `daedalus`.
7177
2. Run `yarn dev` from the subsequent `nix-shell` (use `KEEP_LOCAL_CLUSTER_RUNNING` environment variable to keep the local cluster running after Daedalus exits: `KEEP_LOCAL_CLUSTER_RUNNING=true yarn dev`)
7278
3. Once Daedalus has started and has gotten past the loading screen run the following commands from a new terminal window if you wish to import funded wallets:
73-
- Byron wallets: `yarn byron:wallet:importer`
74-
- Shelley wallets: `yarn shelley:wallet:importer`
75-
- Mary wallets: `yarn mary:wallet:importer` (all of which contain native tokens which are visible once selfnode enters Mary era)
76-
- Yoroi Byron wallets: `yarn yoroi:wallet:importer`
77-
- _ITN Byron wallets:_ `yarn itn:byron:wallet:importer` **[Deprecated]**
78-
- _ITN Shelley wallets:_ `yarn itn:shelley:wallet:importer` **[Deprecated]**
79+
- Byron wallets: `yarn byron:wallet:importer`
80+
- Shelley wallets: `yarn shelley:wallet:importer`
81+
- Mary wallets: `yarn mary:wallet:importer` (all of which contain native tokens which are visible once selfnode enters Mary era)
82+
- Yoroi Byron wallets: `yarn yoroi:wallet:importer`
83+
- _ITN Byron wallets:_ `yarn itn:byron:wallet:importer` **[Deprecated]**
84+
- _ITN Shelley wallets:_ `yarn itn:shelley:wallet:importer` **[Deprecated]**
7985

80-
These scripts import 3 wallets by default. You can import up to 10 wallets by supplying `WALLET_COUNT` environment variable (e.g. `WALLET_COUNT=10 yarn mary:wallet:importer`).
86+
These scripts import 3 wallets by default. You can import up to 10 wallets by supplying `WALLET_COUNT` environment variable (e.g. `WALLET_COUNT=10 yarn mary:wallet:importer`).
8187

82-
List of all funded wallet recovery phrases can be found here: https://github.com/input-output-hk/daedalus/blob/develop/utils/api-importer/mnemonics.js
88+
List of all funded wallet recovery phrases can be found here: https://github.com/input-output-hk/daedalus/blob/develop/utils/api-importer/mnemonics.js
8389

8490
**Notes:**
8591
- Cardano wallet process ID shown on the "Diagnostics" screen is faked and expected to match the Cardano node process ID.

nix/sources.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"cardano-node": {
3-
"branch": "tags/1.35.3",
3+
"branch": "tags/1.35.4",
44
"description": null,
55
"homepage": null,
66
"owner": "input-output-hk",
77
"repo": "cardano-node",
8-
"rev": "950c4e222086fed5ca53564e642434ce9307b0b9",
9-
"sha256": "020fwimsm24yblr1fmnwx240wj8r3x715p89cpjgnnd8axwf32p0",
8+
"rev": "ebc7be471b30e5931b35f9bbc236d21c375b91bb",
9+
"sha256": "1j01m2cp2vdcl26zx9xmipr551v3b2rz9kfn9ik8byfwj1z7652r",
1010
"type": "tarball",
11-
"url": "https://github.com/input-output-hk/cardano-node/archive/950c4e222086fed5ca53564e642434ce9307b0b9.tar.gz",
11+
"url": "https://github.com/input-output-hk/cardano-node/archive/ebc7be471b30e5931b35f9bbc236d21c375b91bb.tar.gz",
1212
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
1313
},
1414
"cardano-shell": {
@@ -24,15 +24,15 @@
2424
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
2525
},
2626
"cardano-wallet": {
27-
"branch": "v2022-10-06",
27+
"branch": "v2022-12-14",
2828
"description": "Official Wallet Backend & API for Cardano decentralized",
2929
"homepage": null,
3030
"owner": "input-output-hk",
3131
"repo": "cardano-wallet",
32-
"rev": "2130fe0acf19fa218cef8de4ef325ae9078e356e",
33-
"sha256": "0d0wk6n7vij4qkp2qml5qdghk41dvm1078ps48673waf4cxjxaz0",
32+
"rev": "bbf11d4feefd5b770fb36717ec5c4c5c112aca87",
33+
"sha256": "1gvxmyclarklajifbyi2l8zwc1gqhbdps73rl9if9a3mpn5xngcp",
3434
"type": "tarball",
35-
"url": "https://github.com/input-output-hk/cardano-wallet/archive/2130fe0acf19fa218cef8de4ef325ae9078e356e.tar.gz",
35+
"url": "https://github.com/input-output-hk/cardano-wallet/archive/bbf11d4feefd5b770fb36717ec5c4c5c112aca87.tar.gz",
3636
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
3737
},
3838
"cardano-world": {
@@ -41,10 +41,10 @@
4141
"homepage": null,
4242
"owner": "input-output-hk",
4343
"repo": "cardano-world",
44-
"rev": "7561fe35ee8c532f2666f0627d49ea6e107e0e3f",
45-
"sha256": "1sxf611cnqlwc3sz10nnxjip2w9j7ii9n42zby90j409sx40mg7g",
44+
"rev": "a0a315100ee320395be97fcc83f46678d5a7fb6e",
45+
"sha256": "08scj58jixs15sjidhjfw93y3vyqp3vmbjmlrc4hpp5q5xwri3k6",
4646
"type": "tarball",
47-
"url": "https://github.com/input-output-hk/cardano-world/archive/7561fe35ee8c532f2666f0627d49ea6e107e0e3f.tar.gz",
47+
"url": "https://github.com/input-output-hk/cardano-world/archive/a0a315100ee320395be97fcc83f46678d5a7fb6e.tar.gz",
4848
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
4949
},
5050
"flake-compat": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "daedalus",
33
"productName": "Daedalus",
4-
"version": "5.1.1",
4+
"version": "5.2.0",
55
"description": "Cryptocurrency Wallet",
66
"main": "./dist/main/index.js",
77
"scripts": {

source/main/environment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const isDevelopment = checkIsDevelopment(NETWORK);
5353
const analyticsFeatureEnabled = true;
5454
const keepLocalClusterRunning = process.env.KEEP_LOCAL_CLUSTER_RUNNING;
5555
const API_VERSION = process.env.API_VERSION || 'dev';
56-
const NODE_VERSION = '1.35.3'; // TODO: pick up this value from process.env
56+
const NODE_VERSION = '1.35.4'; // TODO: pick up this value from process.env
5757

5858
const mainProcessID = get(process, 'ppid', '-');
5959
const rendererProcessID = process.pid;

source/renderer/app/analytics/MatomoAnalyticsTracker.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ import { Environment } from '../../../common/types/environment.types';
44
import LocalStorageApi from '../api/utils/localStorage';
55
import { MatomoClient } from './MatomoClient';
66
import { NoopAnalyticsClient } from './noopAnalyticsClient';
7+
import AdaApi from '../api/api';
78

89
export class MatomoAnalyticsTracker implements AnalyticsTracker {
910
#analyticsClient: AnalyticsClient;
1011

1112
constructor(
1213
private environment: Environment,
13-
private localStorageApi: LocalStorageApi
14+
private localStorageApi: LocalStorageApi,
15+
private adaApi: AdaApi
1416
) {
1517
this.#analyticsClient = NoopAnalyticsClient;
1618
this.#enableTrackingIfAccepted();
@@ -19,6 +21,7 @@ export class MatomoAnalyticsTracker implements AnalyticsTracker {
1921
async enableTracking() {
2022
this.#analyticsClient = new MatomoClient(
2123
this.environment,
24+
this.adaApi,
2225
await this.localStorageApi.getUserID()
2326
);
2427
}

source/renderer/app/analytics/MatomoClient.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@ import { AnalyticsClient } from './types';
33
import { Environment } from '../../../common/types/environment.types';
44
import {
55
ANALYTICS_API_ENDPOINT,
6-
CPU_DIMENSION_KEY,
76
DEV_MODE_SITE_MAP_ID,
87
NETWORK_TO_ANALYTICS_SITE_ID_MAP,
9-
OS_DIMENSION_KEY,
10-
RAM_DIMENSION_KEY,
11-
VERSION_DIMENSION_KEY,
128
} from '../config/analyticsConfig';
13-
import { formattedBytesToSize } from '../utils/formatters';
14-
import { getShortCpuDescription } from '../utils/getShortCpuDescription';
9+
import { getCustomDimensions } from './getCustomDimensions';
10+
import AdaApi from '../api/api';
1511

1612
/**
1713
* Matomo API reference:
@@ -20,24 +16,28 @@ import { getShortCpuDescription } from '../utils/getShortCpuDescription';
2016
export class MatomoClient implements AnalyticsClient {
2117
private matomoTracker: MatomoTracker;
2218

23-
constructor(private environment: Environment, private userId: string) {
19+
constructor(
20+
private environment: Environment,
21+
private adaApi: AdaApi,
22+
private userId: string
23+
) {
2424
this.matomoTracker = new MatomoTracker(
2525
this.getMatomoSiteId(environment),
2626
ANALYTICS_API_ENDPOINT
2727
);
2828
}
2929

3030
sendPageNavigationEvent = async (pageTitle: string) => {
31+
const customDimensions = await getCustomDimensions(
32+
this.environment,
33+
this.adaApi
34+
);
35+
3136
this.matomoTracker.track({
3237
_id: this.userId,
3338
action_name: pageTitle,
3439
url: this.getAnalyticsURL(),
35-
[CPU_DIMENSION_KEY]: getShortCpuDescription(
36-
this.environment.cpu[0]?.model
37-
),
38-
[RAM_DIMENSION_KEY]: formattedBytesToSize(this.environment.ram, 0),
39-
[OS_DIMENSION_KEY]: this.environment.os,
40-
[VERSION_DIMENSION_KEY]: this.environment.version,
40+
...customDimensions,
4141
});
4242
};
4343

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { Environment } from '../../../common/types/environment.types';
2+
import {
3+
CPU_DIMENSION_KEY,
4+
OS_DIMENSION_KEY,
5+
RAM_DIMENSION_KEY,
6+
USES_HARDWARE_WALLET_DIMENSION_KEY,
7+
USES_LEGACY_WALLET_DIMENSION_KEY,
8+
VERSION_DIMENSION_KEY,
9+
} from '../config/analyticsConfig';
10+
import { getShortCpuDescription } from '../utils/getShortCpuDescription';
11+
import { formattedBytesToSize } from '../utils/formatters';
12+
import AdaApi from '../api/api';
13+
14+
const booleanToText = (flag: boolean) => (flag ? 'yes' : 'no');
15+
16+
export const getCustomDimensions = async (
17+
environment: Environment,
18+
adaApi: AdaApi
19+
) => {
20+
const userWallets = await adaApi.getWallets();
21+
const usesByronWallets = userWallets.some((wallet) => wallet.isLegacy);
22+
const usesHardwareWallets = userWallets.some(
23+
(wallet) => wallet.isHardwareWallet
24+
);
25+
26+
return {
27+
[CPU_DIMENSION_KEY]: getShortCpuDescription(environment.cpu[0]?.model),
28+
[RAM_DIMENSION_KEY]: formattedBytesToSize(environment.ram, 0),
29+
[OS_DIMENSION_KEY]: environment.os,
30+
[VERSION_DIMENSION_KEY]: environment.version,
31+
[USES_LEGACY_WALLET_DIMENSION_KEY]: booleanToText(usesByronWallets),
32+
[USES_HARDWARE_WALLET_DIMENSION_KEY]: booleanToText(usesHardwareWallets),
33+
};
34+
};

0 commit comments

Comments
 (0)