Skip to content

Commit 420a62e

Browse files
authored
Merge branch 'develop' into fix/ddw-1108-missing-error-for-syncing-wallet
2 parents f5b9425 + 61aceba commit 420a62e

File tree

6 files changed

+121
-14
lines changed

6 files changed

+121
-14
lines changed

CHANGELOG.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,31 @@
44

55
### Fixes
66

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))
97
- Ensured non-recommended decimal place setting alert is correctly shown ([PR 3007](https://github.com/input-output-hk/daedalus/pull/3007))
108
- Disabled the possibility to choose a syncing wallet for ITN rewards and delegation ([PR 3015](https://github.com/input-output-hk/daedalus/pull/3015))
119

1210
### Chores
1311

1412
- Updated cardano-node to 1.35.1 ([PR 3012](https://github.com/input-output-hk/daedalus/pull/3012))
15-
- Added Vasil-supported cardano-wallet ([PR 3001](https://github.com/input-output-hk/daedalus/pull/3001))
16-
- Upgraded webpack to version 5 ([PR 2772](https://github.com/input-output-hk/daedalus/pull/2772))
1713

1814
### Features
1915

2016
- Updated Terms of Service ([PR 3009](https://github.com/input-output-hk/daedalus/pull/3009))
2117

18+
## 4.12.0
19+
20+
### Fixes
21+
22+
- Fixed downloaded installer being left in Downloads after latest update installs ([PR 2941](https://github.com/input-output-hk/daedalus/pull/2941))
23+
- Fixed incorrect amount of token sent ([PR 2962](https://github.com/input-output-hk/daedalus/pull/2962))
24+
25+
### Chores
26+
27+
- Made Windows installer more resilient w.r.t. auto-updates ([PR 3017](https://github.com/input-output-hk/daedalus/pull/3017))
28+
- Added OS-architecture tuple to installer file names to help with releases ([PR 3016](https://github.com/input-output-hk/daedalus/pull/3016))
29+
- Added Vasil-supported cardano-wallet ([PR 3001](https://github.com/input-output-hk/daedalus/pull/3001))
30+
- Upgraded webpack to version 5 ([PR 2772](https://github.com/input-output-hk/daedalus/pull/2772))
31+
2232
## 4.11.0
2333

2434
### Fixes

default.nix

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,12 @@ let
3737
chmod -R +w $out
3838
cd $out
3939
patch -p1 -i ${./nix/cardano-wallet--enable-aarch64-darwin.patch}
40-
patch -p1 -i ${pkgs.fetchurl {
41-
url = "https://github.com/input-output-hk/cardano-wallet/pull/3382.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;
4246
sha256 = "1ii12g2zikv4197c7bsh4v5dc1jzygn1jap8xvnr7mvh3a09pdgn";
4347
}}
4448
'';
@@ -319,7 +323,7 @@ let
319323
signed-windows-installer = let
320324
backend_version = self.daedalus-bridge.wallet-version;
321325
frontend_version = (builtins.fromJSON (builtins.readFile ./package.json)).version;
322-
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
323327
in pkgs.runCommand "signed-windows-installer-${cluster}" {} ''
324328
mkdir $out
325329
cp -v ${self.signFile "${self.unsigned-windows-installer}/${fullName}"} $out/${fullName}
@@ -436,7 +440,7 @@ let
436440
version = (builtins.fromJSON (builtins.readFile ./package.json)).version;
437441
backend = "cardano-wallet-${nodeImplementation}";
438442
suffix = if buildNum == null then "" else "-${toString buildNum}";
439-
fn = "daedalus-${version}-${self.linuxClusterBinName}${suffix}.bin";
443+
fn = "daedalus-${version}-${self.linuxClusterBinName}${suffix}-x86_64-linux.bin";
440444
in pkgs.runCommand fn {} ''
441445
mkdir -p $out
442446
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
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

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": "4.11.0",
4+
"version": "4.12.0",
55
"description": "Cryptocurrency Wallet",
66
"main": "./dist/main/index.js",
77
"scripts": {

0 commit comments

Comments
 (0)