Skip to content

Commit 61923c8

Browse files
author
Marcin Mazurek
committed
Merge remote-tracking branch 'origin/develop' into feat/ddw-809-implement-analytics-remaining-tracking
2 parents 3965f3f + af8e56a commit 61923c8

File tree

32 files changed

+553
-240
lines changed

32 files changed

+553
-240
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,29 @@
44

55
### Fixes
66

7+
- Ensured non-recommended decimal place setting alert is correctly shown ([PR 3007](https://github.com/input-output-hk/daedalus/pull/3007))
8+
- Disabled the possibility to choose a syncing wallet for ITN rewards and delegation ([PR 3015](https://github.com/input-output-hk/daedalus/pull/3015))
9+
10+
### Chores
11+
12+
- Fix `darwin-launcher.go` to replace its process image with `cardano-launcher` (binary), and not swallow `stdout` ([PR 3023](https://github.com/input-output-hk/daedalus/pull/3023))
13+
- Updated cardano-node to 1.35.1 ([PR 3012](https://github.com/input-output-hk/daedalus/pull/3012))
14+
15+
### Features
16+
17+
- Updated Terms of Service ([PR 3009](https://github.com/input-output-hk/daedalus/pull/3009))
18+
19+
## 4.12.0
20+
21+
### Fixes
22+
723
- Fixed downloaded installer being left in Downloads after latest update installs ([PR 2941](https://github.com/input-output-hk/daedalus/pull/2941))
824
- Fixed incorrect amount of token sent ([PR 2962](https://github.com/input-output-hk/daedalus/pull/2962))
925

1026
### Chores
1127

28+
- Made Windows installer more resilient w.r.t. auto-updates ([PR 3017](https://github.com/input-output-hk/daedalus/pull/3017))
29+
- Added OS-architecture tuple to installer file names to help with releases ([PR 3016](https://github.com/input-output-hk/daedalus/pull/3016))
1230
- Added Vasil-supported cardano-wallet ([PR 3001](https://github.com/input-output-hk/daedalus/pull/3001))
1331
- Upgraded webpack to version 5 ([PR 2772](https://github.com/input-output-hk/daedalus/pull/2772))
1432

default.nix

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ let
3737
chmod -R +w $out
3838
cd $out
3939
patch -p1 -i ${./nix/cardano-wallet--enable-aarch64-darwin.patch}
40+
patch -p1 -i ${builtins.path {
41+
# XXX: unfortunately, GitHub changed lengths of hashes in patches it returns for PRs,
42+
# that’s why we’re providing this patch inside our repo, with the same exact SHA-256,
43+
# to the one released in 4.12.0:
44+
path = ./nix/cardano-wallet--pr-3382--ledger-bug.patch;
45+
recursive = false;
46+
sha256 = "1ii12g2zikv4197c7bsh4v5dc1jzygn1jap8xvnr7mvh3a09pdgn";
47+
}}
4048
'';
4149
};
4250
haskellNix = import sources."haskell.nix" {};
@@ -72,7 +80,20 @@ let
7280
cardanoLib = localLib.iohkNix.cardanoLib;
7381
daedalus-bridge = self.bridgeTable.${nodeImplementation};
7482

75-
nodejs = pkgs.nodejs-16_x;
83+
nodejs = let
84+
njPath = pkgs.path + "/pkgs/development/web/nodejs";
85+
buildNodeJs = pkgs.callPackage (import (njPath + "/nodejs.nix")) {
86+
python = pkgs.python3;
87+
icu = pkgs.icu68; # can’t build against ICU 69: <https://chromium-review.googlesource.com/c/v8/v8/+/2477751>
88+
};
89+
in
90+
buildNodeJs {
91+
enableNpm = true;
92+
version = "14.17.0";
93+
sha256 = "1vf989canwcx0wdpngvkbz2x232yccp7fzs1vcbr60rijgzmpq2n";
94+
patches = pkgs.lib.optional pkgs.stdenv.isDarwin (njPath + "/bypass-xcodebuild.diff");
95+
};
96+
7697
nodePackages = pkgs.nodePackages.override { nodejs = self.nodejs; };
7798
yarnInfo = {
7899
version = "1.22.4";
@@ -302,7 +323,7 @@ let
302323
signed-windows-installer = let
303324
backend_version = self.daedalus-bridge.wallet-version;
304325
frontend_version = (builtins.fromJSON (builtins.readFile ./package.json)).version;
305-
fullName = "daedalus-${frontend_version}-${cluster}${buildNumSuffix}.exe"; # must match to packageFileName in make-installer
326+
fullName = "daedalus-${frontend_version}-${cluster}${buildNumSuffix}-x86_64-windows.exe"; # must match to packageFileName in make-installer
306327
in pkgs.runCommand "signed-windows-installer-${cluster}" {} ''
307328
mkdir $out
308329
cp -v ${self.signFile "${self.unsigned-windows-installer}/${fullName}"} $out/${fullName}
@@ -419,7 +440,7 @@ let
419440
version = (builtins.fromJSON (builtins.readFile ./package.json)).version;
420441
backend = "cardano-wallet-${nodeImplementation}";
421442
suffix = if buildNum == null then "" else "-${toString buildNum}";
422-
fn = "daedalus-${version}-${self.linuxClusterBinName}${suffix}.bin";
443+
fn = "daedalus-${version}-${self.linuxClusterBinName}${suffix}-x86_64-linux.bin";
423444
in pkgs.runCommand fn {} ''
424445
mkdir -p $out
425446
cp ${self.newBundle} $out/${fn}

installers/common/Types.hs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import Turtle (pwd, cd)
4242
import Turtle.Format (format, fp)
4343
import Data.Aeson (FromJSON(..), withObject, eitherDecode, (.:), genericParseJSON, defaultOptions)
4444
import qualified Data.ByteString.Lazy.Char8 as L8
45+
import qualified System.Info
4546

4647
data OS
4748
= Linux64
@@ -113,7 +114,7 @@ packageFileName :: OS -> Cluster -> Version -> Backend -> Text -> Maybe BuildJob
113114
packageFileName _os cluster ver backend _backendVer build = fromText name <.> ext
114115
where
115116
name = T.intercalate "-" parts
116-
parts = ["daedalus", fromVer ver, lshowText cluster] ++ build'
117+
parts = ["daedalus", fromVer ver, lshowText cluster] ++ build' ++ [archOS]
117118
_backend' = case backend of
118119
Cardano _ -> "cardano-wallet"
119120
ext = case _os of
@@ -124,6 +125,13 @@ packageFileName _os cluster ver backend _backendVer build = fromText name <.> ex
124125
Win64 -> "windows"
125126
Macos64 -> "macos"
126127
Linux64 -> "linux"
128+
archOS = case _os of
129+
Win64 -> "x86_64-windows"
130+
Macos64 ->
131+
if System.Info.arch == "aarch64"
132+
then "aarch64-darwin"
133+
else "x86_64-darwin"
134+
Linux64 -> "x86_64-linux"
127135
build' = maybe [] (\b -> [fromBuildJob b]) build
128136

129137
instance FromJSON Version where

installers/common/WindowsInstaller.hs

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ import Development.NSIS (Attrib (IconFile, IconIndex, RebootOK, Recurs
2020
name, nsis, onPagePre, onError, outFile, page, readRegStr,
2121
requestExecutionLevel, rmdir, section, setOutPath, str,
2222
strLength, uninstall, unsafeInject, unsafeInjectGlobal,
23-
loadLanguage,
23+
loadLanguage, sleep, (@=), detailPrint, (%<), (%&&),
24+
not_, mutableInt_, mutable_, while, false, true, strShow, (&),
2425
writeRegDWORD, writeRegStr, (%/=), fileExists)
2526
import Prelude ((!!))
2627
import qualified System.IO as IO
@@ -185,9 +186,30 @@ writeInstallerNSIS outName (Version fullVersion') InstallerConfig{installDirecto
185186
createDirectory "$APPDATA\\$InstallDir\\Secrets-1.0"
186187
createDirectory "$APPDATA\\$InstallDir\\Logs"
187188
createDirectory "$APPDATA\\$InstallDir\\Logs\\pub"
188-
onError (delete [] "$APPDATA\\$InstallDir\\daedalus_lockfile") $
189-
--abort "$SpacedName $(AlreadyRunning)"
190-
unsafeInject $ T.unpack $ "Abort \" " <> installDirectory <> "$(AlreadyRunning)\""
189+
190+
-- XXX: sometimes during auto-update, it takes longer for Daedalus to exit,
191+
-- and cardano-launcher.exe’s lockfile to be unlocked (deletable), so
192+
-- let’s loop waiting for this to happen:
193+
let waitSeconds = 30
194+
lockfileCounter <- mutableInt_ 0
195+
lockfileDeleted <- mutable_ false
196+
while ((lockfileCounter %< waitSeconds) %&& (not_ lockfileDeleted)) $ do
197+
detailPrint (
198+
"Checking if Daedalus is not running ("
199+
Development.NSIS.& strShow (lockfileCounter + 1)
200+
Development.NSIS.& "/"
201+
Development.NSIS.& strShow waitSeconds
202+
Development.NSIS.& ")..."
203+
)
204+
lockfileDeleted @= true
205+
onError (delete [] "$APPDATA\\$InstallDir\\daedalus_lockfile") $ do
206+
lockfileDeleted @= false
207+
iff_ (not_ lockfileDeleted) $ do
208+
sleep 1000 -- milliseconds
209+
lockfileCounter @= lockfileCounter + 1
210+
iff_ (not_ (lockfileDeleted)) $ do
211+
unsafeInject $ T.unpack $ "Abort \"" <> installDirectory <> " $(AlreadyRunning)\""
212+
191213
iff_ (fileExists "$APPDATA\\$InstallDir\\Wallet-1.0\\open\\*.*") $
192214
rmdir [] "$APPDATA\\$InstallDir\\Wallet-1.0\\open"
193215
case oBackend of

installers/nix/electron.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{ stdenv, lib, makeWrapper, fetchurl, unzip, atomEnv, libuuid, at-spi2-atk, at_spi2_core, libxshmfence,
2-
libxkbcommon }:
2+
libxkbcommon, runCommand, binutils-unwrapped }:
33

44
let
5-
version = "13.6.3";
5+
version = (builtins.fromJSON (builtins.readFile ../../package.json)).dependencies.electron;
66
name = "electron-${version}";
77

88
throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}";
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
From 3f0186bdc9231b0bc3523294d4b6ead52b0e1419 Mon Sep 17 00:00:00 2001
2+
From: Samuel Evans-Powell <[email protected]>
3+
Date: Mon, 11 Jul 2022 10:14:31 +0800
4+
Subject: [PATCH 1/2] Bump to cardano-node 1.35.1
5+
6+
---
7+
cabal.project | 4 ++--
8+
1 file changed, 2 insertions(+), 2 deletions(-)
9+
10+
diff --git a/cabal.project b/cabal.project
11+
index 40f1ec8899..9eb3a27fd4 100644
12+
--- a/cabal.project
13+
+++ b/cabal.project
14+
@@ -213,8 +213,8 @@ source-repository-package
15+
source-repository-package
16+
type: git
17+
location: https://github.com/input-output-hk/cardano-node
18+
- tag: 9f1d7dc163ee66410d912e48509d6a2300cfa68a
19+
- --sha256: 06arx9hv7dn3qxfy83f0b6018rxbsvh841nvfyg5w6qclm1hddj7
20+
+ tag: c75451f0ffd7a60b5ad6c4263891e6c8acac105a
21+
+ --sha256: 1z0zv1i58ikmbqg878f9z573jkwp4lzhmmswshm6c96rq6lprzh8
22+
subdir:
23+
cardano-api
24+
cardano-git-rev
25+
26+
From a4d31a3e3d4dbd3b713dff5d911edd3869a3b343 Mon Sep 17 00:00:00 2001
27+
From: Samuel Evans-Powell <[email protected]>
28+
Date: Mon, 11 Jul 2022 10:21:02 +0800
29+
Subject: [PATCH 2/2] Bump version of cardano-node in compatibility matrix
30+
31+
---
32+
README.md | 2 +-
33+
cabal.project | 4 ++--
34+
2 files changed, 3 insertions(+), 3 deletions(-)
35+
36+
diff --git a/README.md b/README.md
37+
index d10239eec3..b0c8c7ceec 100644
38+
--- a/README.md
39+
+++ b/README.md
40+
@@ -73,7 +73,7 @@ See **Installation Instructions** for each available [release](https://github.co
41+
>
42+
> | cardano-wallet | cardano-node (compatible versions) | SMASH (compatible versions)
43+
> | --- | --- | ---
44+
-> | `master` branch | [1.35.0](https://github.com/input-output-hk/cardano-node/releases/tag/1.35.0) | [1.6.1](https://github.com/input-output-hk/smash/releases/tag/1.6.1)
45+
+> | `master` branch | [1.35.1](https://github.com/input-output-hk/cardano-node/releases/tag/1.35.1) | [1.6.1](https://github.com/input-output-hk/smash/releases/tag/1.6.1)
46+
> | [v2022-07-01](https://github.com/input-output-hk/cardano-wallet/releases/tag/v2022-07-01) | [1.35.0](https://github.com/input-output-hk/cardano-node/releases/tag/1.35.0) | [1.6.1](https://github.com/input-output-hk/smash/releases/tag/1.6.1)
47+
> | [v2022-05-27](https://github.com/input-output-hk/cardano-wallet/releases/tag/v2022-05-27) | [1.34.1](https://github.com/input-output-hk/cardano-node/releases/tag/1.34.1) | [1.6.1](https://github.com/input-output-hk/smash/releases/tag/1.6.1)
48+
> | [v2022-04-27](https://github.com/input-output-hk/cardano-wallet/releases/tag/v2022-04-27) | [1.34.1](https://github.com/input-output-hk/cardano-node/releases/tag/1.34.1) | [1.6.1](https://github.com/input-output-hk/smash/releases/tag/1.6.1)
49+
diff --git a/cabal.project b/cabal.project
50+
index 9eb3a27fd4..c83a3e282c 100644
51+
--- a/cabal.project
52+
+++ b/cabal.project
53+
@@ -183,8 +183,8 @@ source-repository-package
54+
source-repository-package
55+
type: git
56+
location: https://github.com/input-output-hk/cardano-ledger
57+
- tag: ce3057e0863304ccb3f79d78c77136219dc786c6
58+
- --sha256: 19ijcy1sl1iqa7diy5nsydnjsn3281kp75i2i42qv0fpn58238s9
59+
+ tag: 3be8a19083fc13d9261b1640e27dd389b51bb08e
60+
+ --sha256: 0dvm9l43mp1i34bcywmznd0660hhcfxwgawypk9q1hjkml1i41z3
61+
subdir:
62+
eras/alonzo/impl
63+
eras/alonzo/test-suite

nix/darwin-launcher.go

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ import (
55
"os"
66
"os/exec"
77
"path/filepath"
8+
"syscall"
89
)
910

1011
func main() {
12+
fmt.Fprintf(os.Stderr, "darwin-launcher: PID = %d\n", os.Getpid())
13+
1114
ex, err := os.Executable()
1215
if err != nil {
1316
panic(err)
@@ -17,14 +20,23 @@ func main() {
1720

1821
os.Setenv("PATH", fmt.Sprintf("%s:%s", installDir, os.Getenv("PATH")))
1922

20-
launcherConfig := filepath.Join(installDir, "../Resources/launcher-config.yaml")
21-
helper := filepath.Join(installDir, "../Resources/helper")
22-
23+
launcherConfigPath := filepath.Join(installDir, "../Resources/launcher-config.yaml")
24+
helperPath := filepath.Join(installDir, "../Resources/helper")
2325

24-
if err = exec.Command(helper).Run(); err != nil {
26+
helperCmd := exec.Command(helperPath)
27+
helperCmd.Stdout = os.Stdout
28+
helperCmd.Stderr = os.Stderr
29+
if err := helperCmd.Run(); err != nil {
2530
panic(err)
2631
}
27-
if err = exec.Command("cardano-launcher", "--config", launcherConfig).Run(); err != nil {
28-
panic(err)
32+
33+
// Replace the current process (otherwise WDIO complains in end-to-end tests):
34+
img := filepath.Join(installDir, "cardano-launcher")
35+
argv := []string{"cardano-launcher", "--config", launcherConfigPath}
36+
env := os.Environ()
37+
if err := syscall.Exec(img, argv, env); err != nil {
38+
fmt.Println(err)
2939
}
40+
41+
fmt.Fprintf(os.Stderr, "this won’t happen\n")
3042
}

nix/sources.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"cardano-node": {
3-
"branch": "tags/1.35.0",
3+
"branch": "tags/1.35.1",
44
"description": null,
55
"homepage": null,
66
"owner": "input-output-hk",
77
"repo": "cardano-node",
8-
"rev": "9f1d7dc163ee66410d912e48509d6a2300cfa68a",
9-
"sha256": "06arx9hv7dn3qxfy83f0b6018rxbsvh841nvfyg5w6qclm1hddj7",
8+
"rev": "c75451f0ffd7a60b5ad6c4263891e6c8acac105a",
9+
"sha256": "1z0zv1i58ikmbqg878f9z573jkwp4lzhmmswshm6c96rq6lprzh8",
1010
"type": "tarball",
11-
"url": "https://github.com/input-output-hk/cardano-node/archive/9f1d7dc163ee66410d912e48509d6a2300cfa68a.tar.gz",
11+
"url": "https://github.com/input-output-hk/cardano-node/archive/c75451f0ffd7a60b5ad6c4263891e6c8acac105a.tar.gz",
1212
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
1313
},
1414
"cardano-shell": {

nix/yarn-nix-shell.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,9 @@ if [ -z "$command" ] ; then
2929
fi
3030

3131
export NETWORK
32+
33+
# Prevent segfaults on Darwin in `GC_*` code:
34+
export GC_DONT_GC=1
35+
3236
# `return` will make the user stay in `nix-shell` after the initial command finishes:
3337
exec nix-shell --argstr nodeImplementation cardano --argstr cluster "$cluster" --command "$command ; return"

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "daedalus",
33
"productName": "Daedalus",
4-
"version": "4.11.0",
4+
"version": "4.12.0",
55
"description": "Cryptocurrency Wallet",
66
"main": "./dist/main/index.js",
77
"scripts": {
@@ -13,7 +13,7 @@
1313
"build:main": "yarn webpack -c source/main/webpack.config.js --progress",
1414
"build:renderer": "yarn webpack -c source/renderer/webpack.config.js --progress",
1515
"build:cleanup": "rimraf ./dist",
16-
"build:electron": "electron-rebuild -w usb --useCache -s --debug",
16+
"build:electron": "electron-rebuild --useCache && electron-rebuild -w usb --useCache -s --debug",
1717
"check:all": "yarn prettier:check && yarn lint && yarn compile && yarn stylelint && yarn lockfile:check && yarn i18n:manage && yarn storybook:build",
1818
"start": "yarn electron ./",
1919
"start:dev": "nodemon --watch 'dist/main' --exec 'NODE_ENV=development yarn start'",

0 commit comments

Comments
 (0)