From 916fa6da338554c732b915f183e7c04024e47ffc Mon Sep 17 00:00:00 2001 From: shawnbusuttil Date: Fri, 8 Apr 2022 10:59:13 +0100 Subject: [PATCH 01/40] [DDW 1034]: Refactor error handling for reward only wallets --- source/renderer/app/api/api.ts | 96 +++---------------- source/renderer/app/api/errors.ts | 60 ++++++++++++ .../app/i18n/locales/defaultMessages.json | 76 +++++++-------- 3 files changed, 110 insertions(+), 122 deletions(-) diff --git a/source/renderer/app/api/api.ts b/source/renderer/app/api/api.ts index f1c7dbd24a..a54beacde0 100644 --- a/source/renderer/app/api/api.ts +++ b/source/renderer/app/api/api.ts @@ -228,6 +228,7 @@ import Asset from '../domains/Asset'; import { getAssets } from './assets/requests/getAssets'; import { getAccountPublicKey } from './wallets/requests/getAccountPublicKey'; import { doesWalletRequireAdaToRemainToSupportTokens } from './utils/apiHelpers'; +import { handleNotEnoughMoneyError } from './errors'; export default class AdaApi { config: RequestConfig; @@ -1059,51 +1060,14 @@ export default class AdaApi { minimumAda, }; } catch (error) { - let notEnoughMoneyError; - - if (walletBalance.gt(availableBalance)) { - // 1. Amount exceeds availableBalance due to pending transactions: - // - walletBalance > availableBalance - // = show "Cannot calculate fees while there are pending transactions." - notEnoughMoneyError = 'canNotCalculateTransactionFees'; - } else if ( - !walletBalance.isZero() && - walletBalance.isEqualTo(rewardsBalance) - ) { - // 2. Wallet contains only rewards: - // - walletBalance === rewardsBalance - // = show "Cannot send from a wallet that contains only rewards balances." - notEnoughMoneyError = 'inputsDepleted'; - } else { - // 3. Amount exceeds walletBalance: - // - walletBalance === availableBalance - // = show "Not enough Ada. Try sending a smaller amount." - notEnoughMoneyError = 'notEnoughFundsForTransaction'; - } - - // ApiError with logging showcase - throw new ApiError(error, { - // @ts-ignore ts-migrate(2322) FIXME: Type 'boolean' is not assignable to type 'Record availableBalance - // = show "Cannot calculate fees while there are pending transactions." - notEnoughMoneyError = 'canNotCalculateTransactionFees'; - } else if ( - !walletBalance.isZero() && - walletBalance.isEqualTo(rewardsBalance) - ) { - // 2. Wallet contains only rewards: - // - walletBalance === rewardsBalance - // = show "Cannot send from a wallet that contains only rewards balances." - notEnoughMoneyError = 'inputsDepleted'; - } else { - // 3. Amount exceeds walletBalance: - // - walletBalance === availableBalance - // = show "Not enough Ada. Try sending a smaller amount." - notEnoughMoneyError = 'notEnoughFundsForTransaction'; - } - - // ApiError with logging showcase - throw new ApiError(error, { - // @ts-ignore ts-migrate(2322) FIXME: Type 'boolean' is not assignable to type 'Record { + let notEnoughMoneyError; + + const { walletBalance, availableBalance, rewardsBalance } = balance; + + if (walletBalance.gt(availableBalance)) { + // 1. Amount exceeds availableBalance due to pending transactions: + // - walletBalance > availableBalance + // = show "Cannot calculate fees while there are pending transactions." + notEnoughMoneyError = 'canNotCalculateTransactionFees'; + } else if ( + !walletBalance.isZero() && + walletBalance.isEqualTo(rewardsBalance) + ) { + // 2. Wallet contains only rewards: + // - walletBalance === rewardsBalance + // = show "Cannot send from a wallet that contains only rewards balances." + notEnoughMoneyError = 'inputsDepleted'; + } else { + // 3. Amount exceeds walletBalance: + // - walletBalance === availableBalance + // = show "Not enough Ada. Try sending a smaller amount." + notEnoughMoneyError = 'notEnoughFundsForTransaction'; + } + + // ApiError with logging showcase + throw new ApiError(error, { + // @ts-ignore ts-migrate(2322) FIXME: Type 'boolean' is not assignable to type 'Record Date: Tue, 7 Jun 2022 17:30:34 +0200 Subject: [PATCH 02/40] Use the same exact version of Node.js in Yarn/`nix-shell` that our Electron uses --- default.nix | 18 ++++++++- nix/chromium-2477751.patch | 76 ++++++++++++++++++++++++++++++++++++++ release.nix | 5 ++- 3 files changed, 97 insertions(+), 2 deletions(-) create mode 100644 nix/chromium-2477751.patch diff --git a/default.nix b/default.nix index c8d230a5e0..4b5f4655dd 100644 --- a/default.nix +++ b/default.nix @@ -65,7 +65,23 @@ let cardanoLib = localLib.iohkNix.cardanoLib; daedalus-bridge = self.bridgeTable.${nodeImplementation}; - nodejs = pkgs.nodejs-16_x; + nodejs = let + njPath = pkgs.path + "/pkgs/development/web/nodejs"; + buildNodeJs = pkgs.callPackage (import (njPath + "/nodejs.nix")) { python = pkgs.python3; }; + in + buildNodeJs { + enableNpm = true; + version = "14.16.0"; + sha256 = "19nz2mhmn6ikahxqyna1dn25pb5v3z9vsz9zb2flb6zp2yk4hxjf"; + patches = [ + # this is needed because of newer ICU in our Nixpkgs, cf. + # • + # • + # • download raw with: `curl --silent 'https://chromium.googlesource.com/v8/v8/+/035c305ce7761f51328b45f1bd83e26aef267c9d%5E%21/?format=TEXT' | base64 --decode` + ./nix/chromium-2477751.patch + ] ++ (pkgs.lib.optional pkgs.stdenv.isDarwin (njPath + "/bypass-xcodebuild.diff")); + }; + nodePackages = pkgs.nodePackages.override { nodejs = self.nodejs; }; yarnInfo = { version = "1.22.4"; diff --git a/nix/chromium-2477751.patch b/nix/chromium-2477751.patch new file mode 100644 index 0000000000..ecd8771f54 --- /dev/null +++ b/nix/chromium-2477751.patch @@ -0,0 +1,76 @@ +diff --git a/deps/v8/src/objects/js-list-format.cc b/deps/v8/src/objects/js-list-format.cc +index b17d38c..e48a387 100644 +--- a/deps/v8/src/objects/js-list-format.cc ++++ b/deps/v8/src/objects/js-list-format.cc +@@ -29,46 +29,27 @@ + namespace internal { + + namespace { +-const char* kStandard = "standard"; +-const char* kOr = "or"; +-const char* kUnit = "unit"; +-const char* kStandardShort = "standard-short"; +-const char* kOrShort = "or-short"; +-const char* kUnitShort = "unit-short"; +-const char* kStandardNarrow = "standard-narrow"; +-const char* kOrNarrow = "or-narrow"; +-const char* kUnitNarrow = "unit-narrow"; + +-const char* GetIcuStyleString(JSListFormat::Style style, +- JSListFormat::Type type) { ++UListFormatterWidth GetIcuWidth(JSListFormat::Style style) { ++ switch (style) { ++ case JSListFormat::Style::LONG: ++ return ULISTFMT_WIDTH_WIDE; ++ case JSListFormat::Style::SHORT: ++ return ULISTFMT_WIDTH_SHORT; ++ case JSListFormat::Style::NARROW: ++ return ULISTFMT_WIDTH_NARROW; ++ } ++ UNREACHABLE(); ++} ++ ++UListFormatterType GetIcuType(JSListFormat::Type type) { + switch (type) { + case JSListFormat::Type::CONJUNCTION: +- switch (style) { +- case JSListFormat::Style::LONG: +- return kStandard; +- case JSListFormat::Style::SHORT: +- return kStandardShort; +- case JSListFormat::Style::NARROW: +- return kStandardNarrow; +- } ++ return ULISTFMT_TYPE_AND; + case JSListFormat::Type::DISJUNCTION: +- switch (style) { +- case JSListFormat::Style::LONG: +- return kOr; +- case JSListFormat::Style::SHORT: +- return kOrShort; +- case JSListFormat::Style::NARROW: +- return kOrNarrow; +- } ++ return ULISTFMT_TYPE_OR; + case JSListFormat::Type::UNIT: +- switch (style) { +- case JSListFormat::Style::LONG: +- return kUnit; +- case JSListFormat::Style::SHORT: +- return kUnitShort; +- case JSListFormat::Style::NARROW: +- return kUnitNarrow; +- } ++ return ULISTFMT_TYPE_UNITS; + } + UNREACHABLE(); + } +@@ -143,7 +124,7 @@ + icu::Locale icu_locale = r.icu_locale; + UErrorCode status = U_ZERO_ERROR; + icu::ListFormatter* formatter = icu::ListFormatter::createInstance( +- icu_locale, GetIcuStyleString(style_enum, type_enum), status); ++ icu_locale, GetIcuType(type_enum), GetIcuWidth(style_enum), status); + if (U_FAILURE(status) || formatter == nullptr) { + delete formatter; + THROW_NEW_ERROR(isolate, NewRangeError(MessageTemplate::kIcuError), diff --git a/release.nix b/release.nix index db66536d79..5ff3f8589e 100644 --- a/release.nix +++ b/release.nix @@ -69,8 +69,11 @@ in { in { daedalus-installer = allArchesNoWindows; yaml2json = allArchesNoWindows; + nodejs = allArchesNoWindows; bridgeTable = { cardano = allArches; }; cardano-node = allArches; -})) +})) // { + recurseForDerivations = {}; +} From d10eab533236a55473dd59727aa563cb044f8fdd Mon Sep 17 00:00:00 2001 From: Michal Rus Date: Wed, 8 Jun 2022 16:12:29 +0200 Subject: [PATCH 03/40] [DDW-1109] Use Node.js 14.17.0 and Electron 14.0.2; patch `electron-rebuild` forcing proper Electron-Node.js headers --- default.nix | 17 ++++----- installers/nix/electron.nix | 26 ++++++++----- nix/chromium-2477751.patch | 76 ------------------------------------- package.json | 4 +- shell.nix | 61 ++++++++++++++++++++++------- yarn.lock | 15 ++------ yarn2nix.nix | 74 +++++++++++++++++++++++------------- 7 files changed, 124 insertions(+), 149 deletions(-) delete mode 100644 nix/chromium-2477751.patch diff --git a/default.nix b/default.nix index 4b5f4655dd..54b4dcc558 100644 --- a/default.nix +++ b/default.nix @@ -67,19 +67,16 @@ let nodejs = let njPath = pkgs.path + "/pkgs/development/web/nodejs"; - buildNodeJs = pkgs.callPackage (import (njPath + "/nodejs.nix")) { python = pkgs.python3; }; + buildNodeJs = pkgs.callPackage (import (njPath + "/nodejs.nix")) { + python = pkgs.python3; + icu = pkgs.icu68; # can’t build against ICU 69: + }; in buildNodeJs { enableNpm = true; - version = "14.16.0"; - sha256 = "19nz2mhmn6ikahxqyna1dn25pb5v3z9vsz9zb2flb6zp2yk4hxjf"; - patches = [ - # this is needed because of newer ICU in our Nixpkgs, cf. - # • - # • - # • download raw with: `curl --silent 'https://chromium.googlesource.com/v8/v8/+/035c305ce7761f51328b45f1bd83e26aef267c9d%5E%21/?format=TEXT' | base64 --decode` - ./nix/chromium-2477751.patch - ] ++ (pkgs.lib.optional pkgs.stdenv.isDarwin (njPath + "/bypass-xcodebuild.diff")); + version = "14.17.0"; + sha256 = "1vf989canwcx0wdpngvkbz2x232yccp7fzs1vcbr60rijgzmpq2n"; + patches = pkgs.lib.optional pkgs.stdenv.isDarwin (njPath + "/bypass-xcodebuild.diff"); }; nodePackages = pkgs.nodePackages.override { nodejs = self.nodejs; }; diff --git a/installers/nix/electron.nix b/installers/nix/electron.nix index f2850de6c5..7a71288ce0 100644 --- a/installers/nix/electron.nix +++ b/installers/nix/electron.nix @@ -1,10 +1,16 @@ { stdenv, lib, makeWrapper, fetchurl, unzip, atomEnv, libuuid, at-spi2-atk, at_spi2_core, libxshmfence, - libxkbcommon }: + libxkbcommon, runCommand, binutils-unwrapped }: let - version = "13.6.3"; + version = (builtins.fromJSON (builtins.readFile ../../package.json)).dependencies.electron; name = "electron-${version}"; + # XXX: There should be a better way to get this info, but I haven’t found one: + bundledNodeVersion = builtins.readFile (runCommand "electron-node-version" {} '' + ${unzip}/bin/unzip ${linux.src} electron + ${binutils-unwrapped}/bin/strings electron | grep -Po 'node-v\K.*?(?=-headers\.tar\.gz)' | tr -d '\n' >$out + ''); + throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}"; meta = with lib; { @@ -16,24 +22,24 @@ let }; linux = { - inherit name version meta; + inherit name version meta bundledNodeVersion; src = { i686-linux = fetchurl { url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-ia32.zip"; - sha256 = "db9261c05ed57af2fcd4a84b89d299c76948b9d57ce0dba38e3240eb43935257"; + sha256 = "0hlggn4ffs0fjgygc5akq23qy16dca29py594xck18qqwri2yp9f"; }; x86_64-linux = fetchurl { url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-x64.zip"; - sha256 = "7607422a4ba80cda4bd7fefb2fbe2f4e0b9a73db92e1e82dc01012a85b5d0d2b"; + sha256 = "1x5xb78lw3a9y19wgbb89vwghda36z45d0rw648a2ymq5s5lccy9"; }; armv7l-linux = fetchurl { url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-armv7l.zip"; - sha256 = "a293a9684e16a427a9f68d101814575a4b1dd232dc3fca47552f906019a6cadc"; + sha256 = "1v0z3mfiwxk6pz9hqrpv25rd7qx82y0k8y3q34zk5wvgmy207j2k"; }; aarch64-linux = fetchurl { url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-arm64.zip"; - sha256 = "1599d259832c806b98751a68fb93112711963d259024f0e36f12f064995b3251"; + sha256 = "0nayflxpmd9wjnqrj74k8lid92445bywq4v1qy7bdbj4rh8jlb0c"; }; }.${stdenv.hostPlatform.system} or throwSystem; @@ -54,16 +60,16 @@ let }; darwin = { - inherit name version meta; + inherit name version meta bundledNodeVersion; src = { x86_64-darwin = fetchurl { url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-darwin-x64.zip"; - sha256 = "6bf09794d6f020bbaaf806a7758da125137b3c96646f4503eb81b9541e50e02f"; + sha256 = "15gk17wfrw2fwvdiidcbh8cxby4ain5y9i1ciygf8qjpk01wasvm"; }; aarch64-darwin = fetchurl { url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-darwin-arm64.zip"; - sha256 = "374ddf0581794b31eee900828172f9218193c032c0e46bffcfac6aec95c22f1a"; + sha256 = "0vw77az374cgmncki46pff18w0izp5i00q8z667i6rbh4nj1sqcs"; }; }.${stdenv.hostPlatform.system} or throwSystem; diff --git a/nix/chromium-2477751.patch b/nix/chromium-2477751.patch deleted file mode 100644 index ecd8771f54..0000000000 --- a/nix/chromium-2477751.patch +++ /dev/null @@ -1,76 +0,0 @@ -diff --git a/deps/v8/src/objects/js-list-format.cc b/deps/v8/src/objects/js-list-format.cc -index b17d38c..e48a387 100644 ---- a/deps/v8/src/objects/js-list-format.cc -+++ b/deps/v8/src/objects/js-list-format.cc -@@ -29,46 +29,27 @@ - namespace internal { - - namespace { --const char* kStandard = "standard"; --const char* kOr = "or"; --const char* kUnit = "unit"; --const char* kStandardShort = "standard-short"; --const char* kOrShort = "or-short"; --const char* kUnitShort = "unit-short"; --const char* kStandardNarrow = "standard-narrow"; --const char* kOrNarrow = "or-narrow"; --const char* kUnitNarrow = "unit-narrow"; - --const char* GetIcuStyleString(JSListFormat::Style style, -- JSListFormat::Type type) { -+UListFormatterWidth GetIcuWidth(JSListFormat::Style style) { -+ switch (style) { -+ case JSListFormat::Style::LONG: -+ return ULISTFMT_WIDTH_WIDE; -+ case JSListFormat::Style::SHORT: -+ return ULISTFMT_WIDTH_SHORT; -+ case JSListFormat::Style::NARROW: -+ return ULISTFMT_WIDTH_NARROW; -+ } -+ UNREACHABLE(); -+} -+ -+UListFormatterType GetIcuType(JSListFormat::Type type) { - switch (type) { - case JSListFormat::Type::CONJUNCTION: -- switch (style) { -- case JSListFormat::Style::LONG: -- return kStandard; -- case JSListFormat::Style::SHORT: -- return kStandardShort; -- case JSListFormat::Style::NARROW: -- return kStandardNarrow; -- } -+ return ULISTFMT_TYPE_AND; - case JSListFormat::Type::DISJUNCTION: -- switch (style) { -- case JSListFormat::Style::LONG: -- return kOr; -- case JSListFormat::Style::SHORT: -- return kOrShort; -- case JSListFormat::Style::NARROW: -- return kOrNarrow; -- } -+ return ULISTFMT_TYPE_OR; - case JSListFormat::Type::UNIT: -- switch (style) { -- case JSListFormat::Style::LONG: -- return kUnit; -- case JSListFormat::Style::SHORT: -- return kUnitShort; -- case JSListFormat::Style::NARROW: -- return kUnitNarrow; -- } -+ return ULISTFMT_TYPE_UNITS; - } - UNREACHABLE(); - } -@@ -143,7 +124,7 @@ - icu::Locale icu_locale = r.icu_locale; - UErrorCode status = U_ZERO_ERROR; - icu::ListFormatter* formatter = icu::ListFormatter::createInstance( -- icu_locale, GetIcuStyleString(style_enum, type_enum), status); -+ icu_locale, GetIcuType(type_enum), GetIcuWidth(style_enum), status); - if (U_FAILURE(status) || formatter == nullptr) { - delete formatter; - THROW_NEW_ERROR(isolate, NewRangeError(MessageTemplate::kIcuError), diff --git a/package.json b/package.json index 7ee30d0528..494f3e5358 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "main": "./dist/main/index.js", "scripts": { "build": "gulp build", - "build:electron": "electron-rebuild -w usb --useCache -s --debug", + "build:electron": "electron-rebuild --useCache && electron-rebuild -w usb --useCache -s --debug", "check:all": "yarn prettier:check && yarn lint && yarn compile && yarn stylelint && yarn lockfile:check && yarn manage:translations && yarn storybook:build", "start": "gulp start", "start:dev": "NODE_ENV=development gulp start", @@ -214,7 +214,7 @@ "classnames": "2.2.6", "csv-stringify": "5.5.1", "cucumber-html-reporter": "5.2.0", - "electron": "13.6.3", + "electron": "14.0.2", "electron-log-daedalus": "2.2.21", "electron-store": "8.0.1", "es6-error": "4.1.1", diff --git a/shell.nix b/shell.nix index a21b7354cc..82b8b2eeef 100644 --- a/shell.nix +++ b/shell.nix @@ -114,16 +114,6 @@ let ln -svf $(type -P cardano-node) ln -svf $(type -P cardano-wallet) ln -svf $(type -P cardano-cli) - mkdir -p ${BUILDTYPE}/ - ${let - # (TODO: investigate why – @michalrus) - sourceBUILDTYPE = "Release"; - in '' - ln -svf $PWD/node_modules/usb/build/${sourceBUILDTYPE}/usb_bindings.node ${BUILDTYPE}/ - ln -svf $PWD/node_modules/node-hid/build/${sourceBUILDTYPE}/HID.node ${BUILDTYPE}/ - ln -svf $PWD/node_modules/node-hid/build/${sourceBUILDTYPE}/HID_hidraw.node ${BUILDTYPE}/ - ln -svf $PWD/node_modules/usb-detection/build/${sourceBUILDTYPE}/detection.node ${BUILDTYPE}/ - ''} ${pkgs.lib.optionalString (nodeImplementation == "cardano") '' source <(cardano-node --bash-completion-script `type -p cardano-node`) @@ -138,15 +128,58 @@ let '' } yarn install --frozen-lockfile + + # Rebuild native modules for : + ( + cd node_modules/electron-rebuild/ + ${daedalusPkgs.rawapp.patchElectronRebuild} + ) + find Debug/ Release/ -name '*.node' | xargs rm -v || true yarn build:electron + + ${let + # Several native modules have to be linked in ${BUILDTYPE}/ in + # root directory, for `yarn dev` to work correctly. If a Debug + # version of such extension exists, we use it, otherwise, we + # use Release: + tryLink = dependency: fileName: '' + symlinkTarget=$(ls 2>/dev/null -d \ + "$PWD/node_modules/${dependency}/build/Debug/${fileName}" \ + "$PWD/node_modules/${dependency}/build/Release/${fileName}" \ + | head -1 + ) + + if [ -z "$symlinkTarget" ] ; then + echo >&2 "fatal: symlink target not found: ‘${fileName}’ in ‘${dependency}’" + exit 1 + fi + + ${localLib.optionalString pkgs.stdenv.isLinux '' + ${pkgs.patchelf}/bin/patchelf --set-rpath ${pkgs.lib.makeLibraryPath [ + pkgs.stdenv.cc.cc pkgs.udev + ]} "$symlinkTarget" + ''} + + mkdir -p ${BUILDTYPE}/ + ln -svf "$symlinkTarget" ${BUILDTYPE}/ + unset symlinkTarget + ''; + in '' + ${tryLink "usb" "usb_bindings.node"} + ${tryLink "node-hid" "HID.node"} + ${tryLink "node-hid" "HID_hidraw.node"} + ${tryLink "usb-detection" "detection.node"} + ''} + ${localLib.optionalString pkgs.stdenv.isLinux '' - ${pkgs.patchelf}/bin/patchelf --set-rpath ${pkgs.lib.makeLibraryPath [ pkgs.stdenv.cc.cc pkgs.udev ]} ${BUILDTYPE}/usb_bindings.node - ${pkgs.patchelf}/bin/patchelf --set-rpath ${pkgs.lib.makeLibraryPath [ pkgs.stdenv.cc.cc pkgs.udev ]} ${BUILDTYPE}/HID.node - # TODO: is this needed for `detection.node`? - ${pkgs.patchelf}/bin/patchelf --set-rpath ${pkgs.lib.makeLibraryPath [ pkgs.stdenv.cc.cc pkgs.udev ]} ${BUILDTYPE}/detection.node ln -svf ${daedalusPkgs.electron}/bin/electron ./node_modules/electron/dist/electron ln -svf ${pkgs.chromedriver}/bin/chromedriver ./node_modules/electron-chromedriver/bin/chromedriver ''} + + ${localLib.optionalString (daedalusPkgs.nodejs.version != daedalusPkgs.electron.bundledNodeVersion) '' + echo 'Warning: Electron’s bundled Node.js version (${daedalusPkgs.electron.bundledNodeVersion}) differs from ours (${daedalusPkgs.nodejs.version}).' + ''} + echo 'jq < $LAUNCHER_CONFIG' echo debug the node by running debug-node ''; diff --git a/yarn.lock b/yarn.lock index 0bbcf832f9..565e20a0cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7469,9 +7469,9 @@ electron-to-chromium@^1.3.896: version "1.4.4" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.4.tgz#57311918524c1a26878c330537f967804d43788a" -electron@13.6.3: - version "13.6.3" - resolved "https://registry.yarnpkg.com/electron/-/electron-13.6.3.tgz#c0217178807d3e0b2175c49dbe33ea8dac447e73" +electron@14.0.2: + version "14.0.2" + resolved "https://registry.yarnpkg.com/electron/-/electron-14.0.2.tgz#28c81978a889fe649cddfc03c132a6ee2dc84653" dependencies: "@electron/get" "^1.0.1" "@types/node" "^14.6.2" @@ -16002,14 +16002,7 @@ socks-proxy-agent@^6.0.0: debug "^4.3.3" socks "^2.6.2" -socks@^2.6.1: - version "2.6.2" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.2.tgz#ec042d7960073d40d94268ff3bb727dc685f111a" - dependencies: - ip "^1.1.5" - smart-buffer "^4.2.0" - -socks@^2.6.2: +socks@^2.6.1, socks@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.2.tgz#ec042d7960073d40d94268ff3bb727dc685f111a" dependencies: diff --git a/yarn2nix.nix b/yarn2nix.nix index c043d79f4f..671e8c3f54 100644 --- a/yarn2nix.nix +++ b/yarn2nix.nix @@ -33,24 +33,29 @@ let main = "main/index.js"; }; newPackagePath = builtins.toFile "package.json" (builtins.toJSON newPackage); - windowsElectronVersion = "13.6.3"; - electronPath = "https://github.com/electron/electron/releases/download/v${windowsElectronVersion}"; + electronVersion = origPackage.dependencies.electron; + electronPath = "https://github.com/electron/electron/releases/download/v${electronVersion}"; windowsElectron = fetchurl { - url = "${electronPath}/electron-v${windowsElectronVersion}-win32-x64.zip"; - sha256 = "18085a2509447fef8896daeee96a12f48f8e60a4d5ec4cfab44d8d59b9d89a72"; + url = "${electronPath}/electron-v${electronVersion}-win32-x64.zip"; + sha256 = "0gcshwmx0cy8146pcr0mavwl3rv86ma59ar6v4rgl5pl6pgmfifc"; }; electronPathHash = builtins.hashString "sha256" electronPath; electron-cache = runCommand "electron-cache" {} '' # newer style mkdir -p $out/${electronPathHash}/ - ln -sv ${windowsElectron} $out/${electronPathHash}/electron-v${windowsElectronVersion}-win32-x64.zip - mkdir $out/httpsgithub.comelectronelectronreleasesdownloadv${windowsElectronVersion}electron-v${windowsElectronVersion}-win32-x64.zip - ln -s ${windowsElectron} $out/httpsgithub.comelectronelectronreleasesdownloadv${windowsElectronVersion}electron-v${windowsElectronVersion}-win32-x64.zip/electron-v${windowsElectronVersion}-win32-x64.zip + ln -sv ${windowsElectron} $out/${electronPathHash}/electron-v${electronVersion}-win32-x64.zip + mkdir $out/httpsgithub.comelectronelectronreleasesdownloadv${electronVersion}electron-v${electronVersion}-win32-x64.zip + ln -s ${windowsElectron} $out/httpsgithub.comelectronelectronreleasesdownloadv${electronVersion}electron-v${electronVersion}-win32-x64.zip/electron-v${electronVersion}-win32-x64.zip ''; - electron-gyp = fetchurl { - url = "https://www.electronjs.org/headers/v${windowsElectronVersion}/node-v${windowsElectronVersion}-headers.tar.gz"; - sha256 = "f8567511857ab62659505ba5158b6ad69afceb512105a3251d180fe47f44366c"; + electron-node-headers = fetchurl { + url = "https://www.electronjs.org/headers/v${electronVersion}/node-v${electronVersion}-headers.tar.gz"; + sha256 = "1qkzqv0k7hxc0kzbri69caabhwzwccl415kg41iksryawsbmciiq"; }; + electron-node-headers-unpacked = runCommand "electron-node-headers-${electronVersion}-unpacked" {} '' + tar -xf ${electron-node-headers} + mkdir -p $out + mv node_headers/* $out/ + ''; filter = name: type: let baseName = baseNameOf (toString name); sansPrefix = lib.removePrefix (toString ./.) name; @@ -72,6 +77,32 @@ let pkgconfig libusb ]; + + # We patch `node_modules/electron-rebuild` to force specific Node.js + # headers to be used when building native extensions for + # Electron. Electron’s Node.js ABI differs from the same version of + # Node.js, because different libraries are used in Electon, + # e.g. BoringSSL instead of OpenSSL, + # cf. + # + # We also use this same code in `shell.nix`, since for some reason + # `electron-rebuild` there determines incorrect headers to use + # automatically, and we keep getting ABI errors. TODO: investigate + # why… + # + # TODO: That `sed` is rather awful… Can it be done better? – @michalrus + patchElectronRebuild = '' + nodeGypJs=lib/src/module-type/node-gyp.js + if [ ! -e $nodeGypJs ] ; then + echo >&2 'shouldn’t happen unless electron-rebuild changes' + exit 1 + fi + + # Patch idempotently (matters in repetitive shell.nix): + if ! grep -F ${electron-node-headers} $nodeGypJs ; then + sed -r 's|const extraNodeGypArgs.*|\0 extraNodeGypArgs.push("--tarball", "${electron-node-headers}", "--nodedir", "${electron-node-headers-unpacked}");|' -i $nodeGypJs + fi + ''; in yarn2nix.mkYarnPackage { name = "daedalus-js"; @@ -122,12 +153,6 @@ yarn2nix.mkYarnPackage { export HOME=$(realpath home) yarn --offline run build - mkdir -pv $HOME/.electron-gyp/ - tar -xvf ${electron-gyp} -C $HOME/.electron-gyp - mv -vi $HOME/.electron-gyp/node_headers $HOME/.electron-gyp/${windowsElectronVersion}/ - - ln -sv $HOME/.electron-gyp $HOME/.node-gyp - #export DEBUG=electron-rebuild ls -ltrha $NIX_BUILD_TOP/daedalus/node_modules/ @@ -195,25 +220,22 @@ yarn2nix.mkYarnPackage { # libunistring # libusb1 #] ++ stdenv.cc.libc.buildInputs; + + # `yarnPreBuild` is only used in `yarn2nix.mkYarnModules`, not `yarn2nix.mkYarnPackage`: yarnPreBuild = '' mkdir -p $HOME/.node-gyp/${nodejs.version} echo 9 > $HOME/.node-gyp/${nodejs.version}/installVersion ln -sfv ${nodejs}/include $HOME/.node-gyp/${nodejs.version} ''; + + inherit patchElectronRebuild; # for use in shell.nix + pkgConfig = { electron-rebuild = { - # TODO: That is rather awful… Can it be done better? – @michalrus - postInstall = '' - nodeGypJs=lib/src/module-type/node-gyp.js - if [ ! -e $nodeGypJs ] ; then - echo >&2 'shouldn’t happen unless electron-rebuild changes' - exit 1 - fi - - sed -r 's|const extraNodeGypArgs.*|\0 extraNodeGypArgs.push("--tarball", "${electron-gyp}", "--nodedir", process.env["HOME"] + "/.node-gyp/${windowsElectronVersion}");|' -i $nodeGypJs - ''; + postInstall = patchElectronRebuild; }; }; + # work around some purity problems in nix yarnLock = ./yarn.lock; packageJSON = ./package.json; From 9520af6a0d3eba11248ea88dd0ab719ccc95bc25 Mon Sep 17 00:00:00 2001 From: Michal Rus Date: Wed, 8 Jun 2022 16:41:28 +0200 Subject: [PATCH 04/40] =?UTF-8?q?[DDW-1109]=20Remove=20`app.allowRendererP?= =?UTF-8?q?rocessReuse`=20=E2=80=93=20no=20longer=20in=20Electron=20?= =?UTF-8?q?=E2=89=A514.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/main/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/main/index.ts b/source/main/index.ts index c3d1794ec7..26ed5c214f 100644 --- a/source/main/index.ts +++ b/source/main/index.ts @@ -84,7 +84,8 @@ if (isBlankScreenFixActive) { // (1/2) this line increases the limit for the main process EventEmitter.defaultMaxListeners = 100; // Default: 10 -app.allowRendererProcessReuse = true; +// No longer in Electron ≥14.0, but behavior stays as if `true`: +// app.allowRendererProcessReuse = true; const safeExit = async () => { pauseActiveDownloads(); From 3b8a99b51e48cbb1148672a3b99a2ef6339b01a7 Mon Sep 17 00:00:00 2001 From: Michal Rus Date: Fri, 10 Jun 2022 14:46:18 +0200 Subject: [PATCH 05/40] [DDW-1109] Patch `electron-rebuild` in `postinstall.sh`; fix Darwin --- installers/nix/electron.nix | 59 +++++++++++++++++++------------------ scripts/postinstall.sh | 5 ++++ shell.nix | 10 +++---- yarn2nix.nix | 18 +++++++---- 4 files changed, 52 insertions(+), 40 deletions(-) diff --git a/installers/nix/electron.nix b/installers/nix/electron.nix index 7a71288ce0..8ad96e0012 100644 --- a/installers/nix/electron.nix +++ b/installers/nix/electron.nix @@ -7,7 +7,7 @@ let # XXX: There should be a better way to get this info, but I haven’t found one: bundledNodeVersion = builtins.readFile (runCommand "electron-node-version" {} '' - ${unzip}/bin/unzip ${linux.src} electron + ${unzip}/bin/unzip ${allPlatforms.x86_64-linux} electron ${binutils-unwrapped}/bin/strings electron | grep -Po 'node-v\K.*?(?=-headers\.tar\.gz)' | tr -d '\n' >$out ''); @@ -21,27 +21,37 @@ let platforms = [ "x86_64-darwin" "aarch64-darwin" "x86_64-linux" "i686-linux" "armv7l-linux" "aarch64-linux" ]; }; + allPlatforms = { + i686-linux = fetchurl { + url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-ia32.zip"; + sha256 = "0hlggn4ffs0fjgygc5akq23qy16dca29py594xck18qqwri2yp9f"; + }; + x86_64-linux = fetchurl { + url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-x64.zip"; + sha256 = "1x5xb78lw3a9y19wgbb89vwghda36z45d0rw648a2ymq5s5lccy9"; + }; + armv7l-linux = fetchurl { + url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-armv7l.zip"; + sha256 = "1v0z3mfiwxk6pz9hqrpv25rd7qx82y0k8y3q34zk5wvgmy207j2k"; + }; + aarch64-linux = fetchurl { + url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-arm64.zip"; + sha256 = "0nayflxpmd9wjnqrj74k8lid92445bywq4v1qy7bdbj4rh8jlb0c"; + }; + x86_64-darwin = fetchurl { + url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-darwin-x64.zip"; + sha256 = "15gk17wfrw2fwvdiidcbh8cxby4ain5y9i1ciygf8qjpk01wasvm"; + }; + aarch64-darwin = fetchurl { + url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-darwin-arm64.zip"; + sha256 = "0vw77az374cgmncki46pff18w0izp5i00q8z667i6rbh4nj1sqcs"; + }; + }; + linux = { inherit name version meta bundledNodeVersion; - src = { - i686-linux = fetchurl { - url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-ia32.zip"; - sha256 = "0hlggn4ffs0fjgygc5akq23qy16dca29py594xck18qqwri2yp9f"; - }; - x86_64-linux = fetchurl { - url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-x64.zip"; - sha256 = "1x5xb78lw3a9y19wgbb89vwghda36z45d0rw648a2ymq5s5lccy9"; - }; - armv7l-linux = fetchurl { - url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-armv7l.zip"; - sha256 = "1v0z3mfiwxk6pz9hqrpv25rd7qx82y0k8y3q34zk5wvgmy207j2k"; - }; - aarch64-linux = fetchurl { - url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-arm64.zip"; - sha256 = "0nayflxpmd9wjnqrj74k8lid92445bywq4v1qy7bdbj4rh8jlb0c"; - }; - }.${stdenv.hostPlatform.system} or throwSystem; + src = allPlatforms.${stdenv.hostPlatform.system} or throwSystem; buildInputs = [ unzip makeWrapper ]; @@ -62,16 +72,7 @@ let darwin = { inherit name version meta bundledNodeVersion; - src = { - x86_64-darwin = fetchurl { - url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-darwin-x64.zip"; - sha256 = "15gk17wfrw2fwvdiidcbh8cxby4ain5y9i1ciygf8qjpk01wasvm"; - }; - aarch64-darwin = fetchurl { - url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-darwin-arm64.zip"; - sha256 = "0vw77az374cgmncki46pff18w0izp5i00q8z667i6rbh4nj1sqcs"; - }; - }.${stdenv.hostPlatform.system} or throwSystem; + src = allPlatforms.${stdenv.hostPlatform.system} or throwSystem; buildInputs = [ unzip ]; diff --git a/scripts/postinstall.sh b/scripts/postinstall.sh index b361f58733..efe4d45adf 100755 --- a/scripts/postinstall.sh +++ b/scripts/postinstall.sh @@ -2,4 +2,9 @@ if [[ "$CI" != "true" ]]; then yarn lockfile:fix + + # Let’s patch electron-rebuild to force correct Node.js headers to + # build native modules against even in `nix-shell`, otherwise, it + # doesn’t work reliably. + $(nix-build -A rawapp.patchElectronRebuild) fi diff --git a/shell.nix b/shell.nix index 82b8b2eeef..0cda576867 100644 --- a/shell.nix +++ b/shell.nix @@ -130,10 +130,6 @@ let yarn install --frozen-lockfile # Rebuild native modules for : - ( - cd node_modules/electron-rebuild/ - ${daedalusPkgs.rawapp.patchElectronRebuild} - ) find Debug/ Release/ -name '*.node' | xargs rm -v || true yarn build:electron @@ -166,9 +162,11 @@ let ''; in '' ${tryLink "usb" "usb_bindings.node"} - ${tryLink "node-hid" "HID.node"} - ${tryLink "node-hid" "HID_hidraw.node"} ${tryLink "usb-detection" "detection.node"} + ${tryLink "node-hid" "HID.node"} + ${localLib.optionalString pkgs.stdenv.isLinux '' + ${tryLink "node-hid" "HID_hidraw.node"} + ''} ''} ${localLib.optionalString pkgs.stdenv.isLinux '' diff --git a/yarn2nix.nix b/yarn2nix.nix index 671e8c3f54..ad4a52fca5 100644 --- a/yarn2nix.nix +++ b/yarn2nix.nix @@ -10,7 +10,7 @@ , lz4 , pkgconfig , systemd -, writeShellScriptBin +, writeShellScript , xz , nodePackages , zlib @@ -91,15 +91,21 @@ let # why… # # TODO: That `sed` is rather awful… Can it be done better? – @michalrus - patchElectronRebuild = '' + patchElectronRebuild = writeShellScript "patch-electron-rebuild" '' + echo 'Patching electron-rebuild to force our Node.js headers…' + nodeGypJs=lib/src/module-type/node-gyp.js if [ ! -e $nodeGypJs ] ; then - echo >&2 'shouldn’t happen unless electron-rebuild changes' + # makes it work both here, and in shell.nix: + nodeGypJs="node_modules/electron-rebuild/$nodeGypJs" + fi + if [ ! -e $nodeGypJs ] ; then + echo >&2 'fatal: shouldn’t happen unless electron-rebuild changes' exit 1 fi # Patch idempotently (matters in repetitive shell.nix): - if ! grep -F ${electron-node-headers} $nodeGypJs ; then + if ! grep -qF ${electron-node-headers} $nodeGypJs ; then sed -r 's|const extraNodeGypArgs.*|\0 extraNodeGypArgs.push("--tarball", "${electron-node-headers}", "--nodedir", "${electron-node-headers-unpacked}");|' -i $nodeGypJs fi ''; @@ -232,7 +238,9 @@ yarn2nix.mkYarnPackage { pkgConfig = { electron-rebuild = { - postInstall = patchElectronRebuild; + postInstall = '' + ${patchElectronRebuild} + ''; }; }; From 09f05b0a50bde04cca7331d83523709157ff5db7 Mon Sep 17 00:00:00 2001 From: Michal Rus Date: Mon, 13 Jun 2022 12:26:34 +0200 Subject: [PATCH 06/40] [DDW-1109] Try to fix `aarch64-darwin` segfaults --- .buildkite/pipeline.yml | 8 +++---- scripts/build-installer-unix.sh--nix-2.5 | 17 -------------- scripts/with-nix-2.5.sh | 28 ++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 21 deletions(-) delete mode 100755 scripts/build-installer-unix.sh--nix-2.5 create mode 100755 scripts/with-nix-2.5.sh diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index caf04cc89d..2c074b450f 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -2,14 +2,14 @@ env: ARTIFACT_BUCKET: s3://ci-output-sink steps: - label: 'daedalus-x86_64-darwin' - command: 'scripts/build-installer-unix.sh--nix-2.5 --build-id $BUILDKITE_BUILD_NUMBER' + command: 'scripts/with-nix-2.5.sh scripts/build-installer-unix.sh --build-id $BUILDKITE_BUILD_NUMBER' env: NIX_SSL_CERT_FILE: /nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt agents: queue: daedalus system: x86_64-darwin - label: 'daedalus-aarch64-darwin' - command: 'scripts/build-installer-unix.sh--nix-2.5 --build-id $BUILDKITE_BUILD_NUMBER' + command: 'scripts/with-nix-2.5.sh scripts/build-installer-unix.sh --build-id $BUILDKITE_BUILD_NUMBER' env: NIX_SSL_CERT_FILE: /nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt UPLOAD_DIR_OVERRIDE: UNSAFE-internal-build @@ -17,11 +17,11 @@ steps: queue: daedalus system: aarch64-darwin - label: 'daedalus-x86_64-linux-nix' - command: 'scripts/build-installer-nix.sh $BUILDKITE_BUILD_NUMBER' + command: 'scripts/with-nix-2.5.sh scripts/build-installer-nix.sh $BUILDKITE_BUILD_NUMBER' agents: system: x86_64-linux - label: 'daedalus-x86_64-windows-nix' - command: 'scripts/build-cross-windows.sh $BUILDKITE_BUILD_NUMBER' + command: 'scripts/with-nix-2.5.sh scripts/build-cross-windows.sh $BUILDKITE_BUILD_NUMBER' agents: system: x86_64-linux diff --git a/scripts/build-installer-unix.sh--nix-2.5 b/scripts/build-installer-unix.sh--nix-2.5 deleted file mode 100755 index 514c2e6fa0..0000000000 --- a/scripts/build-installer-unix.sh--nix-2.5 +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash -set -e - -echo '~~~ Obtaining pkgs.nixUnstable' - -myDir=$(dirname "$0") -nixUnstable=$(nix-build "$myDir"/../default.nix -A pkgs.nixUnstable) - -PATH="$nixUnstable/bin:$PATH" - -export NIX_CONFIG=' - experimental-features = nix-command flakes -' - -nix --version - -exec "$myDir/build-installer-unix.sh" "$@" diff --git a/scripts/with-nix-2.5.sh b/scripts/with-nix-2.5.sh new file mode 100755 index 0000000000..8efc520a62 --- /dev/null +++ b/scripts/with-nix-2.5.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +set -e + +if [ $# -eq 0 ] ; then + echo >&2 "fatal: usage: $0 [...]" + exit 1 +fi + +echo "~~~ Obtaining ‘pkgs.nixUnstable’" + +myDir=$(dirname "$0") +nixUnstable=$(nix-build "$myDir"/../default.nix -A pkgs.nixUnstable) + +PATH="$nixUnstable/bin:$PATH" + +# *Maybe* prevent segfaults on `aarch64-darwin`: +export NIX_DONT_GC=1 + +export NIX_CONFIG=' + experimental-features = nix-command flakes +' + +nix --version +echo + +echo "~~~ Running ‘$1’" + +exec "$@" From 251e043bd72c8a1373b4082f2fe9629e36234d5d Mon Sep 17 00:00:00 2001 From: Michal Rus Date: Mon, 13 Jun 2022 13:30:55 +0200 Subject: [PATCH 07/40] [DDW-1109] Fix `tests.runShellcheck` --- scripts/postinstall.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/postinstall.sh b/scripts/postinstall.sh index efe4d45adf..8cca006fed 100755 --- a/scripts/postinstall.sh +++ b/scripts/postinstall.sh @@ -6,5 +6,5 @@ if [[ "$CI" != "true" ]]; then # Let’s patch electron-rebuild to force correct Node.js headers to # build native modules against even in `nix-shell`, otherwise, it # doesn’t work reliably. - $(nix-build -A rawapp.patchElectronRebuild) + eval "$(nix-build -A rawapp.patchElectronRebuild)" fi From a2f716cef52596ea18927114c1f2e54d5ad2acc3 Mon Sep 17 00:00:00 2001 From: Michal Rus Date: Mon, 13 Jun 2022 14:07:14 +0200 Subject: [PATCH 08/40] [DDW-1109] Go back to Electron 13.6.3 --- installers/nix/electron.nix | 71 +++++++++++++++++-------------------- package.json | 2 +- shell.nix | 8 ++--- source/main/index.ts | 3 +- yarn.lock | 6 ++-- yarn2nix.nix | 4 +-- 6 files changed, 41 insertions(+), 53 deletions(-) diff --git a/installers/nix/electron.nix b/installers/nix/electron.nix index 8ad96e0012..26b5ee8b8e 100644 --- a/installers/nix/electron.nix +++ b/installers/nix/electron.nix @@ -5,12 +5,6 @@ let version = (builtins.fromJSON (builtins.readFile ../../package.json)).dependencies.electron; name = "electron-${version}"; - # XXX: There should be a better way to get this info, but I haven’t found one: - bundledNodeVersion = builtins.readFile (runCommand "electron-node-version" {} '' - ${unzip}/bin/unzip ${allPlatforms.x86_64-linux} electron - ${binutils-unwrapped}/bin/strings electron | grep -Po 'node-v\K.*?(?=-headers\.tar\.gz)' | tr -d '\n' >$out - ''); - throwSystem = throw "Unsupported system: ${stdenv.hostPlatform.system}"; meta = with lib; { @@ -21,37 +15,27 @@ let platforms = [ "x86_64-darwin" "aarch64-darwin" "x86_64-linux" "i686-linux" "armv7l-linux" "aarch64-linux" ]; }; - allPlatforms = { - i686-linux = fetchurl { - url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-ia32.zip"; - sha256 = "0hlggn4ffs0fjgygc5akq23qy16dca29py594xck18qqwri2yp9f"; - }; - x86_64-linux = fetchurl { - url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-x64.zip"; - sha256 = "1x5xb78lw3a9y19wgbb89vwghda36z45d0rw648a2ymq5s5lccy9"; - }; - armv7l-linux = fetchurl { - url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-armv7l.zip"; - sha256 = "1v0z3mfiwxk6pz9hqrpv25rd7qx82y0k8y3q34zk5wvgmy207j2k"; - }; - aarch64-linux = fetchurl { - url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-arm64.zip"; - sha256 = "0nayflxpmd9wjnqrj74k8lid92445bywq4v1qy7bdbj4rh8jlb0c"; - }; - x86_64-darwin = fetchurl { - url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-darwin-x64.zip"; - sha256 = "15gk17wfrw2fwvdiidcbh8cxby4ain5y9i1ciygf8qjpk01wasvm"; - }; - aarch64-darwin = fetchurl { - url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-darwin-arm64.zip"; - sha256 = "0vw77az374cgmncki46pff18w0izp5i00q8z667i6rbh4nj1sqcs"; - }; - }; - linux = { - inherit name version meta bundledNodeVersion; - - src = allPlatforms.${stdenv.hostPlatform.system} or throwSystem; + inherit name version meta; + + src = { + i686-linux = fetchurl { + url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-ia32.zip"; + sha256 = "db9261c05ed57af2fcd4a84b89d299c76948b9d57ce0dba38e3240eb43935257"; + }; + x86_64-linux = fetchurl { + url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-x64.zip"; + sha256 = "7607422a4ba80cda4bd7fefb2fbe2f4e0b9a73db92e1e82dc01012a85b5d0d2b"; + }; + armv7l-linux = fetchurl { + url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-armv7l.zip"; + sha256 = "a293a9684e16a427a9f68d101814575a4b1dd232dc3fca47552f906019a6cadc"; + }; + aarch64-linux = fetchurl { + url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-linux-arm64.zip"; + sha256 = "1599d259832c806b98751a68fb93112711963d259024f0e36f12f064995b3251"; + }; + }.${stdenv.hostPlatform.system} or throwSystem; buildInputs = [ unzip makeWrapper ]; @@ -70,9 +54,18 @@ let }; darwin = { - inherit name version meta bundledNodeVersion; - - src = allPlatforms.${stdenv.hostPlatform.system} or throwSystem; + inherit name version meta; + + src = { + x86_64-darwin = fetchurl { + url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-darwin-x64.zip"; + sha256 = "6bf09794d6f020bbaaf806a7758da125137b3c96646f4503eb81b9541e50e02f"; + }; + aarch64-darwin = fetchurl { + url = "https://github.com/electron/electron/releases/download/v${version}/electron-v${version}-darwin-arm64.zip"; + sha256 = "374ddf0581794b31eee900828172f9218193c032c0e46bffcfac6aec95c22f1a"; + }; + }.${stdenv.hostPlatform.system} or throwSystem; buildInputs = [ unzip ]; diff --git a/package.json b/package.json index 494f3e5358..8ed5268948 100644 --- a/package.json +++ b/package.json @@ -214,7 +214,7 @@ "classnames": "2.2.6", "csv-stringify": "5.5.1", "cucumber-html-reporter": "5.2.0", - "electron": "14.0.2", + "electron": "13.6.3", "electron-log-daedalus": "2.2.21", "electron-store": "8.0.1", "es6-error": "4.1.1", diff --git a/shell.nix b/shell.nix index 0cda576867..171a53a904 100644 --- a/shell.nix +++ b/shell.nix @@ -146,8 +146,8 @@ let ) if [ -z "$symlinkTarget" ] ; then - echo >&2 "fatal: symlink target not found: ‘${fileName}’ in ‘${dependency}’" - exit 1 + echo >&2 "error: symlink target not found: ‘${fileName}’ in ‘${dependency}’" + # ~exit 1~ — do not exit, let the person fix from inside `nix-shell` fi ${localLib.optionalString pkgs.stdenv.isLinux '' @@ -174,10 +174,6 @@ let ln -svf ${pkgs.chromedriver}/bin/chromedriver ./node_modules/electron-chromedriver/bin/chromedriver ''} - ${localLib.optionalString (daedalusPkgs.nodejs.version != daedalusPkgs.electron.bundledNodeVersion) '' - echo 'Warning: Electron’s bundled Node.js version (${daedalusPkgs.electron.bundledNodeVersion}) differs from ours (${daedalusPkgs.nodejs.version}).' - ''} - echo 'jq < $LAUNCHER_CONFIG' echo debug the node by running debug-node ''; diff --git a/source/main/index.ts b/source/main/index.ts index 26ed5c214f..c3d1794ec7 100644 --- a/source/main/index.ts +++ b/source/main/index.ts @@ -84,8 +84,7 @@ if (isBlankScreenFixActive) { // (1/2) this line increases the limit for the main process EventEmitter.defaultMaxListeners = 100; // Default: 10 -// No longer in Electron ≥14.0, but behavior stays as if `true`: -// app.allowRendererProcessReuse = true; +app.allowRendererProcessReuse = true; const safeExit = async () => { pauseActiveDownloads(); diff --git a/yarn.lock b/yarn.lock index 565e20a0cf..0abc7bee29 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7469,9 +7469,9 @@ electron-to-chromium@^1.3.896: version "1.4.4" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.4.tgz#57311918524c1a26878c330537f967804d43788a" -electron@14.0.2: - version "14.0.2" - resolved "https://registry.yarnpkg.com/electron/-/electron-14.0.2.tgz#28c81978a889fe649cddfc03c132a6ee2dc84653" +electron@13.6.3: + version "13.6.3" + resolved "https://registry.yarnpkg.com/electron/-/electron-13.6.3.tgz#c0217178807d3e0b2175c49dbe33ea8dac447e73" dependencies: "@electron/get" "^1.0.1" "@types/node" "^14.6.2" diff --git a/yarn2nix.nix b/yarn2nix.nix index ad4a52fca5..4566683f7f 100644 --- a/yarn2nix.nix +++ b/yarn2nix.nix @@ -37,7 +37,7 @@ let electronPath = "https://github.com/electron/electron/releases/download/v${electronVersion}"; windowsElectron = fetchurl { url = "${electronPath}/electron-v${electronVersion}-win32-x64.zip"; - sha256 = "0gcshwmx0cy8146pcr0mavwl3rv86ma59ar6v4rgl5pl6pgmfifc"; + sha256 = "18085a2509447fef8896daeee96a12f48f8e60a4d5ec4cfab44d8d59b9d89a72"; }; electronPathHash = builtins.hashString "sha256" electronPath; electron-cache = runCommand "electron-cache" {} '' @@ -49,7 +49,7 @@ let ''; electron-node-headers = fetchurl { url = "https://www.electronjs.org/headers/v${electronVersion}/node-v${electronVersion}-headers.tar.gz"; - sha256 = "1qkzqv0k7hxc0kzbri69caabhwzwccl415kg41iksryawsbmciiq"; + sha256 = "f8567511857ab62659505ba5158b6ad69afceb512105a3251d180fe47f44366c"; }; electron-node-headers-unpacked = runCommand "electron-node-headers-${electronVersion}-unpacked" {} '' tar -xf ${electron-node-headers} From b58ceba71c019c38688830249ca68c187583de28 Mon Sep 17 00:00:00 2001 From: Michal Rus Date: Mon, 13 Jun 2022 15:22:49 +0200 Subject: [PATCH 09/40] =?UTF-8?q?[DDW-1109]=20Try=20to=20fix=20`aarch64-da?= =?UTF-8?q?rwin`=20segfaults=20=E2=80=93=20once=20more?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/with-nix-2.5.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/with-nix-2.5.sh b/scripts/with-nix-2.5.sh index 8efc520a62..3d4b9228f9 100755 --- a/scripts/with-nix-2.5.sh +++ b/scripts/with-nix-2.5.sh @@ -13,8 +13,8 @@ nixUnstable=$(nix-build "$myDir"/../default.nix -A pkgs.nixUnstable) PATH="$nixUnstable/bin:$PATH" -# *Maybe* prevent segfaults on `aarch64-darwin`: -export NIX_DONT_GC=1 +# *Maybe* prevent segfaults on `aarch64-darwin` in `GC_*` code: +export GC_DONT_GC=1 # export NIX_CONFIG=' experimental-features = nix-command flakes From d7a7fee9de8f0e974681edf355ede479e6884a6e Mon Sep 17 00:00:00 2001 From: Michal Rus Date: Wed, 22 Jun 2022 16:21:17 +0200 Subject: [PATCH 10/40] [DDW-1109] Prevent segfaults on Darwin in `GC_*` code when launching `nix-shell` --- nix/yarn-nix-shell.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nix/yarn-nix-shell.sh b/nix/yarn-nix-shell.sh index bccb6bf67e..7f0d1b70b5 100755 --- a/nix/yarn-nix-shell.sh +++ b/nix/yarn-nix-shell.sh @@ -29,5 +29,9 @@ if [ -z "$command" ] ; then fi export NETWORK + +# Prevent segfaults on Darwin in `GC_*` code: +export GC_DONT_GC=1 + # `return` will make the user stay in `nix-shell` after the initial command finishes: exec nix-shell --argstr nodeImplementation cardano --argstr cluster "$cluster" --command "$command ; return" From c77135a28cd49eb2f6766b045ccdd3886d6c35e9 Mon Sep 17 00:00:00 2001 From: Marcin Mazurek Date: Thu, 30 Jun 2022 23:04:04 +0200 Subject: [PATCH 11/40] [DDW-1111] Use 0 as default value for asset decimal user setting --- source/common/types/logging.types.ts | 2 +- source/renderer/app/api/api.ts | 5 +- source/renderer/app/api/utils/localStorage.ts | 54 +++++++------------ .../containers/wallet/WalletReceivePage.tsx | 2 +- .../app/stores/HardwareWalletsStore.ts | 10 ++-- .../app/stores/WalletSettingsStore.ts | 2 +- .../renderer/app/stores/WalletsLocalStore.ts | 2 +- source/renderer/app/types/localDataTypes.ts | 43 +++++++++++++++ 8 files changed, 75 insertions(+), 45 deletions(-) create mode 100644 source/renderer/app/types/localDataTypes.ts diff --git a/source/common/types/logging.types.ts b/source/common/types/logging.types.ts index e8d93af11e..eaf3c2930e 100644 --- a/source/common/types/logging.types.ts +++ b/source/common/types/logging.types.ts @@ -14,8 +14,8 @@ import type { } from '../../renderer/app/api/wallets/types'; import type { Address } from '../../renderer/app/api/addresses/types'; import type { GetTransactionsRequest } from '../../renderer/app/api/transactions/types'; -import type { HardwareWalletLocalData } from '../../renderer/app/api/utils/localStorage'; import type { AdaApiStakePool } from '../../renderer/app/api/staking/types'; +import { HardwareWalletLocalData } from '../../renderer/app/types/localDataTypes'; export type LoggingLevel = 'debug' | 'info' | 'error' | 'warn'; export type Logger = { diff --git a/source/renderer/app/api/api.ts b/source/renderer/app/api/api.ts index 340dabc1fa..db8bf1cd7e 100644 --- a/source/renderer/app/api/api.ts +++ b/source/renderer/app/api/api.ts @@ -223,11 +223,11 @@ import type { ApiAsset, StoredAssetMetadata, } from './assets/types'; -import type { AssetLocalData } from './utils/localStorage'; import Asset from '../domains/Asset'; import { getAssets } from './assets/requests/getAssets'; import { getAccountPublicKey } from './wallets/requests/getAccountPublicKey'; import { doesWalletRequireAdaToRemainToSupportTokens } from './utils/apiHelpers'; +import { AssetLocalData, defaultAssetLocalData } from '../types/localDataTypes'; export default class AdaApi { config: RequestConfig; @@ -670,7 +670,8 @@ export default class AdaApi { const assets = response.map((asset) => _createAssetFromServerData( asset, - assetsLocaldata[asset.policy_id + asset.asset_name] || {}, + assetsLocaldata[asset.policy_id + asset.asset_name] || + defaultAssetLocalData, this.storedAssetMetadata ) ); diff --git a/source/renderer/app/api/utils/localStorage.ts b/source/renderer/app/api/utils/localStorage.ts index f9974c70a6..08d1b7e378 100644 --- a/source/renderer/app/api/utils/localStorage.ts +++ b/source/renderer/app/api/utils/localStorage.ts @@ -1,33 +1,34 @@ /* eslint-disable consistent-return */ -import { includes, without, get } from 'lodash'; +import { get, includes, without } from 'lodash'; import { toJS } from '../../../../common/utils/helper'; import { electronStoreConversation } from '../../ipc/electronStoreConversation'; +import type { WalletMigrationStatus } from '../../stores/WalletMigrationStore'; import { WalletMigrationStatuses } from '../../stores/WalletMigrationStore'; import { - STORAGE_TYPES as types, STORAGE_KEYS as keys, + STORAGE_TYPES as types, } from '../../../../common/config/electron-store.config'; import type { NewsTimestamp } from '../news/types'; -import type { WalletMigrationStatus } from '../../stores/WalletMigrationStore'; import type { - TransportDevice, HardwareWalletExtendedPublicKeyResponse, - DeviceType, + TransportDevice, } from '../../../../common/types/hardware-wallets.types'; import type { StorageKey } from '../../../../common/types/electron-store.types'; import type { Currency, DeprecatedCurrency } from '../../types/currencyTypes'; import { - CURRENCY_IS_ACTIVE_BY_DEFAULT, CURRENCY_DEFAULT_SELECTED, + CURRENCY_IS_ACTIVE_BY_DEFAULT, } from '../../config/currencyConfig'; +import { + AssetLocalData, + HardwareWalletDevicesType, + HardwareWalletLocalData, + HardwareWalletsLocalData, + UnpairedHardwareWalletData, + WalletLocalData, + defaultAssetLocalData, +} from '../../types/localDataTypes'; -export type WalletLocalData = { - id: string; - recoveryPhraseVerificationDate?: Date | null | undefined; - creationDate: Date; - showUsedAddresses: boolean; -}; -export type WalletsLocalData = Record; export type SetHardwareWalletLocalDataRequestType = { walletId: string; data: { @@ -42,27 +43,6 @@ export type SetHardwareWalletDeviceRequestType = { data: UnpairedHardwareWalletData; }; -export type UnpairedHardwareWalletData = { - deviceType?: DeviceType; - deviceModel?: string; - deviceName?: string; - path?: string | null | undefined; - paired?: string | null | undefined; - disconnected?: boolean; -}; - -export type HardwareWalletLocalData = { - id: string; - deviceType: DeviceType; - device: TransportDevice; - extendedPublicKey: HardwareWalletExtendedPublicKeyResponse; - disconnected: boolean; -}; -export type HardwareWalletsLocalData = Record; -export type HardwareWalletDevicesType = Record; -export type AssetLocalData = { - decimals: number; -}; /** * This api layer provides access to the electron local storage * for user settings that are not synced with any coin backend. @@ -298,7 +278,11 @@ export default class LocalStorageApi { policyId: string, assetName: string ): Promise => - LocalStorageApi.get(keys.ASSET_DATA, {}, `${policyId}${assetName}`); + LocalStorageApi.get( + keys.ASSET_DATA, + defaultAssetLocalData, + `${policyId}${assetName}` + ); setAssetLocalData = ( policyId: string, assetName: string, diff --git a/source/renderer/app/containers/wallet/WalletReceivePage.tsx b/source/renderer/app/containers/wallet/WalletReceivePage.tsx index 7726961231..b518de6a21 100755 --- a/source/renderer/app/containers/wallet/WalletReceivePage.tsx +++ b/source/renderer/app/containers/wallet/WalletReceivePage.tsx @@ -12,7 +12,7 @@ import WalletAddress from '../../domains/WalletAddress'; import { generateFileNameWithTimestamp } from '../../../../common/utils/files'; import { ellipsis } from '../../utils/strings'; import { generateSupportRequestLink } from '../../../../common/utils/reporting'; -import type { WalletLocalData } from '../../api/utils/localStorage'; +import { WalletLocalData } from '../../types/localDataTypes'; const messages = defineMessages({ address: { diff --git a/source/renderer/app/stores/HardwareWalletsStore.ts b/source/renderer/app/stores/HardwareWalletsStore.ts index 521b0b2be4..03b5fc007b 100644 --- a/source/renderer/app/stores/HardwareWalletsStore.ts +++ b/source/renderer/app/stores/HardwareWalletsStore.ts @@ -84,12 +84,8 @@ import type { VotingDataType, } from '../api/transactions/types'; import type { - HardwareWalletLocalData, - HardwareWalletsLocalData, - HardwareWalletDevicesType, SetHardwareWalletLocalDataRequestType, SetHardwareWalletDeviceRequestType, - UnpairedHardwareWalletData, } from '../api/utils/localStorage'; import type { TransportDevice, @@ -101,6 +97,12 @@ import type { TrezorWitness, } from '../../../common/types/hardware-wallets.types'; import { logger } from '../utils/logging'; +import { + HardwareWalletDevicesType, + HardwareWalletLocalData, + HardwareWalletsLocalData, + UnpairedHardwareWalletData, +} from '../types/localDataTypes'; export type TxSignRequestTypes = { coinSelection: CoinSelectionsResponse; diff --git a/source/renderer/app/stores/WalletSettingsStore.ts b/source/renderer/app/stores/WalletSettingsStore.ts index 7a0c407278..10ab29743b 100644 --- a/source/renderer/app/stores/WalletSettingsStore.ts +++ b/source/renderer/app/stores/WalletSettingsStore.ts @@ -9,8 +9,8 @@ import { getStatusFromWalletData } from '../utils/walletRecoveryPhraseVerificati import { getRawWalletId } from '../api/utils'; import type { WalletExportToFileParams } from '../actions/wallet-settings-actions'; import type { WalletUtxos } from '../api/wallets/types'; -import type { WalletLocalData } from '../api/utils/localStorage'; import { RECOVERY_PHRASE_VERIFICATION_STATUSES } from '../config/walletRecoveryPhraseVerificationConfig'; +import { WalletLocalData } from '../types/localDataTypes'; export default class WalletSettingsStore extends Store { @observable diff --git a/source/renderer/app/stores/WalletsLocalStore.ts b/source/renderer/app/stores/WalletsLocalStore.ts index 09cc77495a..dc6ea6df2f 100644 --- a/source/renderer/app/stores/WalletsLocalStore.ts +++ b/source/renderer/app/stores/WalletsLocalStore.ts @@ -2,7 +2,7 @@ import { observable, computed } from 'mobx'; import Store from './lib/Store'; import Request from './lib/LocalizedRequest'; import { asyncForEach } from '../utils/asyncForEach'; -import type { WalletsLocalData } from '../api/utils/localStorage'; +import { WalletsLocalData } from '../types/localDataTypes'; export default class WalletsLocalStore extends Store { @observable diff --git a/source/renderer/app/types/localDataTypes.ts b/source/renderer/app/types/localDataTypes.ts new file mode 100644 index 0000000000..9befcb0f90 --- /dev/null +++ b/source/renderer/app/types/localDataTypes.ts @@ -0,0 +1,43 @@ +import { StorageKey } from '../../../common/types/electron-store.types'; +import { + DeviceType, + HardwareWalletExtendedPublicKeyResponse, + TransportDevice, +} from '../../../common/types/hardware-wallets.types'; + +export type WalletLocalData = { + id: string; + recoveryPhraseVerificationDate?: Date | null | undefined; + creationDate: Date; + showUsedAddresses: boolean; +}; + +export type WalletsLocalData = Record; + +export type UnpairedHardwareWalletData = { + deviceType?: DeviceType; + deviceModel?: string; + deviceName?: string; + path?: string | null | undefined; + paired?: string | null | undefined; + disconnected?: boolean; +}; + +export type HardwareWalletLocalData = { + id: string; + deviceType: DeviceType; + device: TransportDevice; + extendedPublicKey: HardwareWalletExtendedPublicKeyResponse; + disconnected: boolean; +}; + +export type HardwareWalletsLocalData = Record; +export type HardwareWalletDevicesType = Record; + +export type AssetLocalData = { + decimals: number; +}; + +export const defaultAssetLocalData: AssetLocalData = { + decimals: 0, +}; From bbd6a73d59c20bf122e45fcc630869fc2de7af6d Mon Sep 17 00:00:00 2001 From: Daniel Main Date: Mon, 4 Jul 2022 13:34:28 +0200 Subject: [PATCH 12/40] Bump version to 4.12.0 --- CHANGELOG.md | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a53df9b594..afbe217601 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## vNext +## 4.12.0 ### Fixes @@ -9,6 +9,7 @@ ### Chores - Added Vasil-supported cardano-wallet ([PR 3001](https://github.com/input-output-hk/daedalus/pull/3001)) +- Upgraded webpack to version 5 ([PR 2772](https://github.com/input-output-hk/daedalus/pull/2772)) ## 4.11.0 @@ -25,7 +26,6 @@ ### Chores -- Upgraded webpack to version 5 ([PR 2772](https://github.com/input-output-hk/daedalus/pull/2772)) - Bumped vulnerable dependencies versions ([PR 2943](https://github.com/input-output-hk/daedalus/pull/2943)) - Added support for Trezor firmware 2.5.1 ([PR 2991](https://github.com/input-output-hk/daedalus/pull/2991)) - 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)) diff --git a/package.json b/package.json index ed8831f452..71ee5e1033 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "daedalus", "productName": "Daedalus", - "version": "4.11.0", + "version": "4.12.0", "description": "Cryptocurrency Wallet", "main": "./dist/main/index.js", "scripts": { From 1fb3f9bd04c939d77baf8b1ec267507db915cff9 Mon Sep 17 00:00:00 2001 From: Marcin Mazurek Date: Mon, 4 Jul 2022 21:07:28 +0200 Subject: [PATCH 13/40] [DDW-1111] Use recommended decimal value as initial form value --- .../app/components/assets/AssetSettingsDialog.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/renderer/app/components/assets/AssetSettingsDialog.tsx b/source/renderer/app/components/assets/AssetSettingsDialog.tsx index 00e56c4a3e..350366fab3 100644 --- a/source/renderer/app/components/assets/AssetSettingsDialog.tsx +++ b/source/renderer/app/components/assets/AssetSettingsDialog.tsx @@ -88,11 +88,11 @@ class AssetSettingsDialog extends Component { super(props); const { asset } = props; const { decimals: savedDecimals, recommendedDecimals } = asset; - const hasSavedDecimals = typeof savedDecimals === 'number'; + const hasRecommendedDecimals = typeof recommendedDecimals === 'number'; this.state = { - decimals: hasSavedDecimals - ? savedDecimals - : recommendedDecimals || DEFAULT_DECIMAL_PRECISION, + decimals: hasRecommendedDecimals + ? recommendedDecimals + : savedDecimals || DEFAULT_DECIMAL_PRECISION, }; } From f4c34f36ea5fc96adc9aca4ffa8bef5aad4a5e38 Mon Sep 17 00:00:00 2001 From: Marcin Mazurek Date: Mon, 4 Jul 2022 21:13:17 +0200 Subject: [PATCH 14/40] [DDW-1111] Fill in changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b1da137b7..b0fcb6204d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Fixed downloaded installer being left in Downloads after latest update installs ([PR 2941](https://github.com/input-output-hk/daedalus/pull/2941)) - Fixed incorrect amount of token sent ([PR 2962](https://github.com/input-output-hk/daedalus/pull/2962)) +- Ensured non-recommended decimal place setting alert is correctly shown ([PR 3007](https://github.com/input-output-hk/daedalus/pull/3007)) ### Chores From 2b9ab4aa30e0e50c7bff1d6a1cbac894d2595c54 Mon Sep 17 00:00:00 2001 From: Marcin Mazurek Date: Mon, 4 Jul 2022 21:18:47 +0200 Subject: [PATCH 15/40] [DDW-1111] Improve variable naming --- source/renderer/app/api/api.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/renderer/app/api/api.ts b/source/renderer/app/api/api.ts index db8bf1cd7e..f8dfc36e9b 100644 --- a/source/renderer/app/api/api.ts +++ b/source/renderer/app/api/api.ts @@ -663,14 +663,14 @@ export default class AdaApi { logger.debug('AdaApi::getAssets success', { assets: response, }); - const assetsLocaldata = await global.daedalus.api.localStorage.getAssetsLocalData(); + const assetsLocalData = await global.daedalus.api.localStorage.getAssetsLocalData(); logger.debug('AdaApi::getAssetsLocalData success', { - assetsLocaldata, + assetsLocalData, }); const assets = response.map((asset) => _createAssetFromServerData( asset, - assetsLocaldata[asset.policy_id + asset.asset_name] || + assetsLocalData[asset.policy_id + asset.asset_name] || defaultAssetLocalData, this.storedAssetMetadata ) From bb427aafcd00b05931157889afa776da00e70684 Mon Sep 17 00:00:00 2001 From: Marcin Mazurek Date: Mon, 4 Jul 2022 21:21:13 +0200 Subject: [PATCH 16/40] [DDW-1111] Revert unrelated changes --- source/renderer/app/api/utils/localStorage.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/renderer/app/api/utils/localStorage.ts b/source/renderer/app/api/utils/localStorage.ts index 08d1b7e378..b024568559 100644 --- a/source/renderer/app/api/utils/localStorage.ts +++ b/source/renderer/app/api/utils/localStorage.ts @@ -1,23 +1,23 @@ /* eslint-disable consistent-return */ -import { get, includes, without } from 'lodash'; +import { includes, without, get } from 'lodash'; import { toJS } from '../../../../common/utils/helper'; import { electronStoreConversation } from '../../ipc/electronStoreConversation'; import type { WalletMigrationStatus } from '../../stores/WalletMigrationStore'; import { WalletMigrationStatuses } from '../../stores/WalletMigrationStore'; import { - STORAGE_KEYS as keys, STORAGE_TYPES as types, + STORAGE_KEYS as keys, } from '../../../../common/config/electron-store.config'; import type { NewsTimestamp } from '../news/types'; import type { - HardwareWalletExtendedPublicKeyResponse, TransportDevice, + HardwareWalletExtendedPublicKeyResponse, } from '../../../../common/types/hardware-wallets.types'; import type { StorageKey } from '../../../../common/types/electron-store.types'; import type { Currency, DeprecatedCurrency } from '../../types/currencyTypes'; import { - CURRENCY_DEFAULT_SELECTED, CURRENCY_IS_ACTIVE_BY_DEFAULT, + CURRENCY_DEFAULT_SELECTED, } from '../../config/currencyConfig'; import { AssetLocalData, From 4569d1699b8ee46f371f67f23742e1ab2d3c96e6 Mon Sep 17 00:00:00 2001 From: Marcin Mazurek Date: Mon, 4 Jul 2022 21:35:37 +0200 Subject: [PATCH 17/40] [DDW-1111] Trigger build From 299a8c9ab119e8093b3fb49775df855fd2bca66d Mon Sep 17 00:00:00 2001 From: Marcin Mazurek Date: Tue, 5 Jul 2022 21:03:38 +0200 Subject: [PATCH 18/40] [DDW-1111] Address PR feedback --- .../app/components/assets/AssetSettingsDialog.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/renderer/app/components/assets/AssetSettingsDialog.tsx b/source/renderer/app/components/assets/AssetSettingsDialog.tsx index 350366fab3..00e56c4a3e 100644 --- a/source/renderer/app/components/assets/AssetSettingsDialog.tsx +++ b/source/renderer/app/components/assets/AssetSettingsDialog.tsx @@ -88,11 +88,11 @@ class AssetSettingsDialog extends Component { super(props); const { asset } = props; const { decimals: savedDecimals, recommendedDecimals } = asset; - const hasRecommendedDecimals = typeof recommendedDecimals === 'number'; + const hasSavedDecimals = typeof savedDecimals === 'number'; this.state = { - decimals: hasRecommendedDecimals - ? recommendedDecimals - : savedDecimals || DEFAULT_DECIMAL_PRECISION, + decimals: hasSavedDecimals + ? savedDecimals + : recommendedDecimals || DEFAULT_DECIMAL_PRECISION, }; } From 4431282d3d2641e57a8b60265885e3ee128456a7 Mon Sep 17 00:00:00 2001 From: Marcin Mazurek Date: Tue, 5 Jul 2022 21:25:39 +0200 Subject: [PATCH 19/40] [DDW-1111] Address PR feedback --- source/renderer/app/api/api.ts | 5 +- source/renderer/app/api/utils/localStorage.ts | 7 +- .../components/assets/AssetSettingsDialog.tsx | 4 +- .../tokens/wallet-token/WalletToken.tsx | 4 +- .../tokens/wallet-token/helpers.spec.ts | 69 +++++++++++++++++++ .../wallet/tokens/wallet-token/helpers.ts | 25 ++++--- source/renderer/app/types/localDataTypes.ts | 6 +- 7 files changed, 94 insertions(+), 26 deletions(-) create mode 100644 source/renderer/app/components/wallet/tokens/wallet-token/helpers.spec.ts diff --git a/source/renderer/app/api/api.ts b/source/renderer/app/api/api.ts index f8dfc36e9b..5089e19e10 100644 --- a/source/renderer/app/api/api.ts +++ b/source/renderer/app/api/api.ts @@ -227,7 +227,7 @@ import Asset from '../domains/Asset'; import { getAssets } from './assets/requests/getAssets'; import { getAccountPublicKey } from './wallets/requests/getAccountPublicKey'; import { doesWalletRequireAdaToRemainToSupportTokens } from './utils/apiHelpers'; -import { AssetLocalData, defaultAssetLocalData } from '../types/localDataTypes'; +import { AssetLocalData } from '../types/localDataTypes'; export default class AdaApi { config: RequestConfig; @@ -670,8 +670,7 @@ export default class AdaApi { const assets = response.map((asset) => _createAssetFromServerData( asset, - assetsLocalData[asset.policy_id + asset.asset_name] || - defaultAssetLocalData, + assetsLocalData[asset.policy_id + asset.asset_name] || {}, this.storedAssetMetadata ) ); diff --git a/source/renderer/app/api/utils/localStorage.ts b/source/renderer/app/api/utils/localStorage.ts index b024568559..53755cd9ab 100644 --- a/source/renderer/app/api/utils/localStorage.ts +++ b/source/renderer/app/api/utils/localStorage.ts @@ -26,7 +26,6 @@ import { HardwareWalletsLocalData, UnpairedHardwareWalletData, WalletLocalData, - defaultAssetLocalData, } from '../../types/localDataTypes'; export type SetHardwareWalletLocalDataRequestType = { @@ -278,11 +277,7 @@ export default class LocalStorageApi { policyId: string, assetName: string ): Promise => - LocalStorageApi.get( - keys.ASSET_DATA, - defaultAssetLocalData, - `${policyId}${assetName}` - ); + LocalStorageApi.get(keys.ASSET_DATA, {}, `${policyId}${assetName}`); setAssetLocalData = ( policyId: string, assetName: string, diff --git a/source/renderer/app/components/assets/AssetSettingsDialog.tsx b/source/renderer/app/components/assets/AssetSettingsDialog.tsx index 00e56c4a3e..eb61232d62 100644 --- a/source/renderer/app/components/assets/AssetSettingsDialog.tsx +++ b/source/renderer/app/components/assets/AssetSettingsDialog.tsx @@ -17,7 +17,7 @@ import { MAX_DECIMAL_PRECISION, } from '../../config/assetsConfig'; import { DiscreetTokenWalletAmount } from '../../features/discreet-mode'; -import { isRecommendedDecimal } from '../wallet/tokens/wallet-token/helpers'; +import { isNonRecommendedDecimalSettingUsed } from '../wallet/tokens/wallet-token/helpers'; const messages = defineMessages({ title: { @@ -154,7 +154,7 @@ class AssetSettingsDialog extends Component { }, ]; - const hasWarning = isRecommendedDecimal({ + const hasWarning = isNonRecommendedDecimalSettingUsed({ recommendedDecimals, decimals: savedDecimals, }); diff --git a/source/renderer/app/components/wallet/tokens/wallet-token/WalletToken.tsx b/source/renderer/app/components/wallet/tokens/wallet-token/WalletToken.tsx index 5b75b82848..d4450d07c9 100644 --- a/source/renderer/app/components/wallet/tokens/wallet-token/WalletToken.tsx +++ b/source/renderer/app/components/wallet/tokens/wallet-token/WalletToken.tsx @@ -6,7 +6,7 @@ import AssetContent from '../../../assets/AssetContent'; import type { AssetToken } from '../../../../api/assets/types'; import WalletTokenFooter from './WalletTokenFooter'; import WalletTokenHeader from './WalletTokenHeader'; -import { isRecommendedDecimal } from './helpers'; +import { isNonRecommendedDecimalSettingUsed } from './helpers'; type Props = { anyAssetWasHovered: boolean; @@ -49,7 +49,7 @@ const WalletToken = observer((props: Props) => { setIsExpanded(!isExpanded); }, [setIsExpanded, isExpanded]); - const hasWarning = isRecommendedDecimal({ + const hasWarning = isNonRecommendedDecimalSettingUsed({ decimals: asset.decimals, recommendedDecimals: asset.recommendedDecimals, }); diff --git a/source/renderer/app/components/wallet/tokens/wallet-token/helpers.spec.ts b/source/renderer/app/components/wallet/tokens/wallet-token/helpers.spec.ts new file mode 100644 index 0000000000..9ba67f6f45 --- /dev/null +++ b/source/renderer/app/components/wallet/tokens/wallet-token/helpers.spec.ts @@ -0,0 +1,69 @@ +import { isNonRecommendedDecimalSettingUsed } from './helpers'; + +describe('isNonRecommendedDecimalSettingUsed', () => { + it('returns false if asset does not have recommended decimals', async () => { + expect( + isNonRecommendedDecimalSettingUsed({ + decimals: 0, + recommendedDecimals: undefined, + }) + ).toEqual(false); + + expect( + isNonRecommendedDecimalSettingUsed({ + decimals: 5, + recommendedDecimals: undefined, + }) + ).toEqual(false); + }); + + it('returns false if recommended decimal settings are applied by user', async () => { + expect( + isNonRecommendedDecimalSettingUsed({ + decimals: 0, + recommendedDecimals: 0, + }) + ).toEqual(false); + + expect( + isNonRecommendedDecimalSettingUsed({ + decimals: 5, + recommendedDecimals: 5, + }) + ).toEqual(false); + }); + + it('returns false if 0 (default value) is recommended and user never changed settings', async () => { + expect( + isNonRecommendedDecimalSettingUsed({ + decimals: undefined, + recommendedDecimals: 0, + }) + ).toEqual(false); + }); + + it('returns true if non-zero decimals are recommended but user never changed settings', async () => { + expect( + isNonRecommendedDecimalSettingUsed({ + decimals: undefined, + recommendedDecimals: 3, + }) + ).toEqual(true); + }); + + it('returns true if user applied non-recommended decimal settings', async () => { + expect( + isNonRecommendedDecimalSettingUsed({ + decimals: 3, + recommendedDecimals: 0, + }) + ).toEqual(true); + + expect( + isNonRecommendedDecimalSettingUsed({ + decimals: 0, + recommendedDecimals: 3, + }) + ).toEqual(true); + }); +}); diff --git a/source/renderer/app/components/wallet/tokens/wallet-token/helpers.ts b/source/renderer/app/components/wallet/tokens/wallet-token/helpers.ts index 1a93bd77fc..f8cf633d76 100644 --- a/source/renderer/app/components/wallet/tokens/wallet-token/helpers.ts +++ b/source/renderer/app/components/wallet/tokens/wallet-token/helpers.ts @@ -1,15 +1,24 @@ -type IsRecommendedDecimal = { +type IsNonRecommendedDecimalSettingUsedArgs = { decimals: number | null | undefined; recommendedDecimals: number | null | undefined; }; -export const isRecommendedDecimal = ({ +export const isNonRecommendedDecimalSettingUsed = ({ recommendedDecimals, decimals, -}: IsRecommendedDecimal) => { - return ( - typeof recommendedDecimals === 'number' && - typeof decimals === 'number' && - decimals !== recommendedDecimals - ); +}: IsNonRecommendedDecimalSettingUsedArgs) => { + const hasRecommendedDecimals = typeof recommendedDecimals === 'number'; + const hasConfiguredDecimals = typeof decimals === 'number'; + + if (!hasRecommendedDecimals) { + return false; + } + if (hasConfiguredDecimals) { + return decimals !== recommendedDecimals; + } + if (!hasConfiguredDecimals && recommendedDecimals === 0) { + return false; + } + + return true; }; diff --git a/source/renderer/app/types/localDataTypes.ts b/source/renderer/app/types/localDataTypes.ts index 9befcb0f90..63a9e5906a 100644 --- a/source/renderer/app/types/localDataTypes.ts +++ b/source/renderer/app/types/localDataTypes.ts @@ -35,9 +35,5 @@ export type HardwareWalletsLocalData = Record; export type HardwareWalletDevicesType = Record; export type AssetLocalData = { - decimals: number; -}; - -export const defaultAssetLocalData: AssetLocalData = { - decimals: 0, + decimals?: number; }; From ce50ae013ef5052136f750629d8d91340b5c8433 Mon Sep 17 00:00:00 2001 From: Marcin Mazurek Date: Tue, 5 Jul 2022 21:31:31 +0200 Subject: [PATCH 20/40] [DDW-1111] Revert unrelated changes --- source/common/types/logging.types.ts | 2 +- source/renderer/app/stores/WalletSettingsStore.ts | 2 +- source/renderer/app/stores/WalletsLocalStore.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/common/types/logging.types.ts b/source/common/types/logging.types.ts index eaf3c2930e..e8d93af11e 100644 --- a/source/common/types/logging.types.ts +++ b/source/common/types/logging.types.ts @@ -14,8 +14,8 @@ import type { } from '../../renderer/app/api/wallets/types'; import type { Address } from '../../renderer/app/api/addresses/types'; import type { GetTransactionsRequest } from '../../renderer/app/api/transactions/types'; +import type { HardwareWalletLocalData } from '../../renderer/app/api/utils/localStorage'; import type { AdaApiStakePool } from '../../renderer/app/api/staking/types'; -import { HardwareWalletLocalData } from '../../renderer/app/types/localDataTypes'; export type LoggingLevel = 'debug' | 'info' | 'error' | 'warn'; export type Logger = { diff --git a/source/renderer/app/stores/WalletSettingsStore.ts b/source/renderer/app/stores/WalletSettingsStore.ts index 10ab29743b..7a0c407278 100644 --- a/source/renderer/app/stores/WalletSettingsStore.ts +++ b/source/renderer/app/stores/WalletSettingsStore.ts @@ -9,8 +9,8 @@ import { getStatusFromWalletData } from '../utils/walletRecoveryPhraseVerificati import { getRawWalletId } from '../api/utils'; import type { WalletExportToFileParams } from '../actions/wallet-settings-actions'; import type { WalletUtxos } from '../api/wallets/types'; +import type { WalletLocalData } from '../api/utils/localStorage'; import { RECOVERY_PHRASE_VERIFICATION_STATUSES } from '../config/walletRecoveryPhraseVerificationConfig'; -import { WalletLocalData } from '../types/localDataTypes'; export default class WalletSettingsStore extends Store { @observable diff --git a/source/renderer/app/stores/WalletsLocalStore.ts b/source/renderer/app/stores/WalletsLocalStore.ts index dc6ea6df2f..09cc77495a 100644 --- a/source/renderer/app/stores/WalletsLocalStore.ts +++ b/source/renderer/app/stores/WalletsLocalStore.ts @@ -2,7 +2,7 @@ import { observable, computed } from 'mobx'; import Store from './lib/Store'; import Request from './lib/LocalizedRequest'; import { asyncForEach } from '../utils/asyncForEach'; -import { WalletsLocalData } from '../types/localDataTypes'; +import type { WalletsLocalData } from '../api/utils/localStorage'; export default class WalletsLocalStore extends Store { @observable From 2cedd23eee68ce6a5099b8be00ce48a4409cc948 Mon Sep 17 00:00:00 2001 From: Marcin Mazurek Date: Tue, 5 Jul 2022 21:34:03 +0200 Subject: [PATCH 21/40] Revert "[DDW-1111] Revert unrelated changes" This reverts commit ce50ae013ef5052136f750629d8d91340b5c8433. --- source/common/types/logging.types.ts | 2 +- source/renderer/app/stores/WalletSettingsStore.ts | 2 +- source/renderer/app/stores/WalletsLocalStore.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/common/types/logging.types.ts b/source/common/types/logging.types.ts index e8d93af11e..eaf3c2930e 100644 --- a/source/common/types/logging.types.ts +++ b/source/common/types/logging.types.ts @@ -14,8 +14,8 @@ import type { } from '../../renderer/app/api/wallets/types'; import type { Address } from '../../renderer/app/api/addresses/types'; import type { GetTransactionsRequest } from '../../renderer/app/api/transactions/types'; -import type { HardwareWalletLocalData } from '../../renderer/app/api/utils/localStorage'; import type { AdaApiStakePool } from '../../renderer/app/api/staking/types'; +import { HardwareWalletLocalData } from '../../renderer/app/types/localDataTypes'; export type LoggingLevel = 'debug' | 'info' | 'error' | 'warn'; export type Logger = { diff --git a/source/renderer/app/stores/WalletSettingsStore.ts b/source/renderer/app/stores/WalletSettingsStore.ts index 7a0c407278..10ab29743b 100644 --- a/source/renderer/app/stores/WalletSettingsStore.ts +++ b/source/renderer/app/stores/WalletSettingsStore.ts @@ -9,8 +9,8 @@ import { getStatusFromWalletData } from '../utils/walletRecoveryPhraseVerificati import { getRawWalletId } from '../api/utils'; import type { WalletExportToFileParams } from '../actions/wallet-settings-actions'; import type { WalletUtxos } from '../api/wallets/types'; -import type { WalletLocalData } from '../api/utils/localStorage'; import { RECOVERY_PHRASE_VERIFICATION_STATUSES } from '../config/walletRecoveryPhraseVerificationConfig'; +import { WalletLocalData } from '../types/localDataTypes'; export default class WalletSettingsStore extends Store { @observable diff --git a/source/renderer/app/stores/WalletsLocalStore.ts b/source/renderer/app/stores/WalletsLocalStore.ts index 09cc77495a..dc6ea6df2f 100644 --- a/source/renderer/app/stores/WalletsLocalStore.ts +++ b/source/renderer/app/stores/WalletsLocalStore.ts @@ -2,7 +2,7 @@ import { observable, computed } from 'mobx'; import Store from './lib/Store'; import Request from './lib/LocalizedRequest'; import { asyncForEach } from '../utils/asyncForEach'; -import type { WalletsLocalData } from '../api/utils/localStorage'; +import { WalletsLocalData } from '../types/localDataTypes'; export default class WalletsLocalStore extends Store { @observable From ff29416eb8c50106c698d01bc0756c8d54b95636 Mon Sep 17 00:00:00 2001 From: Marcin Mazurek Date: Thu, 19 May 2022 11:45:03 +0200 Subject: [PATCH 22/40] [DDW-1095] Update Terms of Service --- .../app/i18n/locales/terms-of-use/en-US.md | 18 +++++++++--------- .../app/i18n/locales/terms-of-use/ja-JP.md | 12 ++++++------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/source/renderer/app/i18n/locales/terms-of-use/en-US.md b/source/renderer/app/i18n/locales/terms-of-use/en-US.md index 8e1f73b0d9..0b2cc990fa 100644 --- a/source/renderer/app/i18n/locales/terms-of-use/en-US.md +++ b/source/renderer/app/i18n/locales/terms-of-use/en-US.md @@ -1,6 +1,6 @@ # IOHK Terms of Service Agreement -THIS TERMS OF SERVICE AGREEMENT ("Agreement") is made between Input Output HK Limited ("Company") and any person ("User") who completes the process to download, utilize, or operate any software or application created or offered by Company, including, but not limited to, the Daedalus Wallet application and the IOHK Incentivised Testnet ("Product"). You agree that this Agreement is a separate and independent agreement for each such Product. +THIS TERMS OF SERVICE AGREEMENT ("Agreement") is made between IOG Singapore Pte. Ltd. ("Company") and any person ("User") who completes the process to download, utilize, or operate any software or application created or offered by Company, including, but not limited to, the Daedalus Wallet application and the Incentivised Testnet (collectively, the "Product"). You agree that this Agreement is a separate and independent agreement for each such Product. **By confirming your acceptance of this Agreement, you agree to be bound by these terms on your own behalf. If you are duly authorized by a corporate entity, you agree on behalf of your corporate entity that it will be bound by the Agreement.** @@ -12,19 +12,19 @@ Company and User are collectively referred to as the "parties." **1.2 User Representations.** User represents and warrants to Company that: (a) User is over the age of eighteen (18) and has the power and authority to enter into and perform User's obligations under this Agreement; (b) all information provided by User to Company is truthful, accurate and complete; (c) User will comply with all laws and regulations of any applicable jurisdiction with regard to the User's access, use or installation of the Product; (d) User shall comply with all terms and conditions of this Agreement, including, without limitation, the provisions set forth at Section 1.7 (Prohibited Uses); and (e) User has provided and will provide accurate and complete information as required for access, use or installation of the Product. -**1.3 Reservation of Rights.** The Company retains all intellectual property rights, title, and interest in and to all of the Company's work, the Product, brands, logos, and trademarks, including but not limited to, Input Output HK Limited, IOHK, Daedalus, Daedalus Cryptocurrency Wallet, Daedalus Wallet, Daedalus App, and variations of the wording of the aforementioned brands, logos, and trademarks. User acknowledges and agrees that this Agreement conveys no title or ownership rights and User does not acquire any rights over the Company’s intellectual property law, express or implied, other than those expressly granted in this Agreement. All rights not expressly granted to User are reserved by the Company. +**1.3 Reservation of Rights.** The Company retains all intellectual property rights, title, and interest in and to all of the Company's work, the Product, brands, logos, and trademarks, including but not limited to, IOG Singapore Pte. Ltd., Input Output HK Limited, IOG, IOHK, Daedalus, Daedalus Cryptocurrency Wallet, Daedalus Wallet, Daedalus App, and variations of the wording of the aforementioned brands, logos, and trademarks. User acknowledges and agrees that this Agreement conveys no title or ownership rights and User does not acquire any rights over the Company's intellectual property law, express or implied, other than those expressly granted in this Agreement. All rights not expressly granted to User are reserved by the Company. **1.4 Grant of a License.** The Product is licensed to User under the terms of the Apache License, Version 2.0 (the "License"). The Product may not be used except in compliance with the License. User may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0). User acknowledges and agrees that the Company shall not be responsible for any aspect of the information, content, or services contained in any third-party materials or on any third party sites accessible or linked to the Product and/or the Company. **1.5 User Obligations.** User is solely responsible for (a) providing, maintaining and ensuring compatibility with the Product, all hardware, software, electrical and other physical requirements for User's use of the Product, including, without limitation, telecommunications and internet access connections and links, web browsers or other equipment, programs and services required to access and use the Product; (b) the security, confidentiality and integrity of all information and content that User receives, transmits through or stores on the Product; and (c) any authorized or unauthorized access to any account of User by any person. -**1.6 Privacy.** When reasonably practicable, Company will endeavor to respect User's privacy. Company will not monitor, edit, or disclose any personal information about User or User's account, including its contents or User's use of the Product, without User's prior consent unless Company has a good faith belief that such action is necessary to: (i) comply with legal process or other legal requirements of any governmental authority; (ii) protect and defend the rights or property of Company; (iii) enforce this Agreement; (iv) protect the interests of users of the Product other than User or any other person; or (v) operate or conduct maintenance and repair of Company's services or equipment, including the Product as authorized by law. User has no expectation of privacy with respect to the Internet generally. User acknowledges that IP addresses are transmitted and recorded with each message or other information User sends from the Product. +**1.6 Privacy.** By accepting the terms of this Agreement, User also agrees to the terms of Company's [Privacy Policy](https://static.iohk.io/terms/iog-privacy-policy.pdf), attached and incorporated herein. Upon User's consent, which may be retracted at any time by the User by modifying User's settings within the Daedalus software, Company may also track certain aspects of User's behavior and device information for product development and improvement purposes. Such User behavior and device information includes the following: clicks, page visits, page scrolling, number of wallets, number of native assets, session duration, type of wallets (soft vs hardware wallets), geolocation (country of location), page performance, operating system, RAM and disk space. **1.7 Prohibited Uses.** User is solely responsible for any and all acts and omissions that occur under User's account, security information, keys or password, and User agrees not to engage in unacceptable use of the Product, which includes, without limitation, use of the Product to: (a) disseminate, store or transmit unsolicited messages, chain letters or unsolicited commercial email; (b) disseminate or transmit material that, to a reasonable person may be abusive, obscene, pornographic, defamatory, harassing, grossly offensive, vulgar, threatening or malicious; (c) disseminate, store or transmit files, graphics, software or other material that actually or potentially infringes the copyright, trademark, patent, trade secret or other intellectual property right of any person; (d) create a false identity or to otherwise attempt to mislead any person as to the identity or origin of any communication; (e) export, re-export or permit downloading of any message or content in violation of any export or import law, regulation or restriction of any applicable jurisdiction, or without all required approvals, licenses or exemptions; (f) interfere, disrupt or attempt to gain unauthorized access to other accounts on the Product or any other computer network; or (g) disseminate, store or transmit viruses, trojan horses or any other malicious code or program. **1.8 Warranties.** While the Product has undergone beta testing and continues to be improved by feedback from the developers community, open-source contributors and beta-testers, the Company cannot guarantee there will not be bugs in the Product. Unless required by applicable law or agreed to in writing, the Product is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. User agrees that from time to time the Product may be inaccessible or inoperable for any reason, including, without limitation: (i) equipment malfunctions; (ii) periodic maintenance procedures or repairs which Company may undertake from time to time; or (iii) causes beyond the control of Company or which are not reasonably foreseeable by Company. User acknowledges that User's use of this Product is at User's risk and discretion. -**1.9 Liability.** IN NO EVENT WILL IOHK OR ITS SHAREHOLDERS, DIRECTORS, OFFICERS, EMPLOYEES, CONTRACTORS OR SERVICE PROVIDERS, BE LIABLE TO USER OR ANY THIRD PARTY FOR ANY USE, INTERRUPTION, DELAY OR INABILITY TO USE THE SOFTWARE, LOST REVENUE OR PROFITS, LOST REWARDS, DELAYS, INTERRUPTION OR LOSS OF SERVICE, BUSINESS OR GOODWILL, LOSS OR CORRUPTION OF DATA, LOSS OF CRYPTOCURRENCY LOSS RESULTING FROM SYSTEM OR SYSTEM SERVICE FAILURE, MALFUNCTION OR SHUTDOWN, FAILURE TO ACCURATELY TRANSFER, READ OR TRANSMIT INFORMATION, FAILURE TO UPDATE OR PROVIDE CORRECT INFORMATION, SYSTEM INCOMPATIBILITY OR PROVISION OF INCORRECT COMPATIBILITY INFORMATION OR BREACHES IN SYSTEM SECURITY, OR FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, INCIDENTAL, EXEMPLARY, SPECIAL OR PUNITIVE DAMAGES, WHETHER ARISING OUT OF OR IN CONNECTION WITH THIS AGREEMENT, BREACH OF CONTRACT, TORT (INCLUDING NEGLIGENCE) OR OTHERWISE, AND REGARDLESS OF WHETHER SUCH DAMAGES WERE FORESEEABLE AND WHETHER OR NOT COMPANY WAS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO EVENT SHALL THE COMPANY OR ITS SHAREHOLDERS, DIRECTORS, OFFICERS, EMPLOYEES, AFFILIATES OR AGENTS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM OR IN ANY WAY RELATED TO USER'S ACCESS, USE OR INSTALLATION OF THE SOFTWARE. SOME JURISDICTIONS PROHIBIT THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, THUS THIS LIMITATION OF LIABILITY MAY NOT APPLY TO USER. IF USER IS DISSATISFIED WITH THE SOFTWARE, USER'S SOLE AND EXCLUSIVE REMEDY SHALL BE FOR USER TO DISCONTINUE USE OF THE SOFTWARE. +**1.9 Liability.** IN NO EVENT WILL COMPANY OR ITS SHAREHOLDERS, AFFILIATES, DIRECTORS, OFFICERS, EMPLOYEES, CONTRACTORS OR SERVICE PROVIDERS, BE LIABLE TO USER OR ANY THIRD PARTY FOR ANY USE, INTERRUPTION, DELAY OR INABILITY TO USE THE SOFTWARE, LOST REVENUE OR PROFITS, LOST REWARDS, DELAYS, INTERRUPTION OR LOSS OF SERVICE, BUSINESS OR GOODWILL, LOSS OR CORRUPTION OF DATA, LOSS OF CRYPTOCURRENCY LOSS RESULTING FROM SYSTEM OR SYSTEM SERVICE FAILURE, MALFUNCTION OR SHUTDOWN, FAILURE TO ACCURATELY TRANSFER, READ OR TRANSMIT INFORMATION, FAILURE TO UPDATE OR PROVIDE CORRECT INFORMATION, SYSTEM INCOMPATIBILITY OR PROVISION OF INCORRECT COMPATIBILITY INFORMATION OR BREACHES IN SYSTEM SECURITY, OR FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, INCIDENTAL, EXEMPLARY, SPECIAL OR PUNITIVE DAMAGES, WHETHER ARISING OUT OF OR IN CONNECTION WITH THIS AGREEMENT, BREACH OF CONTRACT, TORT (INCLUDING NEGLIGENCE) OR OTHERWISE, AND REGARDLESS OF WHETHER SUCH DAMAGES WERE FORESEEABLE AND WHETHER OR NOT COMPANY WAS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN NO EVENT SHALL THE COMPANY OR ITS SHAREHOLDERS, DIRECTORS, OFFICERS, EMPLOYEES, AFFILIATES OR AGENTS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM OR IN ANY WAY RELATED TO USER'S ACCESS, USE OR INSTALLATION OF THE SOFTWARE. SOME JURISDICTIONS PROHIBIT THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, THUS THIS LIMITATION OF LIABILITY MAY NOT APPLY TO USER. IF USER IS DISSATISFIED WITH THE SOFTWARE, USER'S SOLE AND EXCLUSIVE REMEDY SHALL BE FOR USER TO DISCONTINUE USE OF THE SOFTWARE. **1.10 Indemnification.** User agrees to indemnify, hold harmless and defend Company, its shareholders, directors, officers, employees, affiliates and agents ("Indemnified Parties") from and against any action, cause, claim, damage, debt, demand or liability, including reasonable costs and attorney's fees, asserted by any person, arising out of or relating to: (a) this Agreement; (b) User's access, use or installation of the Product, including any data or work transmitted or received by User; and (c) any unacceptable use of the Product by any person, including, without limitation, any statement, data or content made, transmitted or republished by User or any person which is prohibited as unacceptable under Section 1.7. THIS INDEMNIFICATION INCLUDES THE EXPRESS INDEMNIFICATION OF COMPANY AND ALL INDEMNIFIED PARTIES FOR ANY ALLEGED NEGLIGENCE, ALLEGED GROSS NEGLIGENCE, OR OTHER ALLEGED MISCONDUCT OF COMPANY OR ANY INDEMNIFIED PARTIES. @@ -58,21 +58,21 @@ Company and User are collectively referred to as the "parties." **3.1 Incentivised Testnet.** Company is testing and making available to Users a test rewards and incentivization mechanism which is intended to mimic the rewards and incentivization mechanism in the upcoming Shelley release (the "Incentivized Testnet"). Users may participate in the Incentivized Testnet by delegating their ada stake to their own stake pool or to a third party stake pool in exchange for a reward equivalent to a percentage of the proceeds generated by the stake pool ("Reward"). -**3.2 Rewards.** The amount of Rewards a User may earn from delegation depends on various factors including, but not limited to, user participation, stakepool profit margins and the volume of ada being delegated. It is possible that delegation generates no Reward for a User due to the above-mentioned factors. Rewards are earned as of the start of the 3rd epoch on the Cardano blockchain. When the Incentivized Testnet is discontinued, any Rewards earned can be transferred back to the User’s Daedalus or Yoroi wallet. +**3.2 Rewards.** The amount of Rewards a User may earn from delegation depends on various factors including, but not limited to, user participation, stakepool profit margins and the volume of ada being delegated. It is possible that delegation generates no Reward for a User due to the above-mentioned factors. Rewards are earned as of the start of the 3rd epoch on the Cardano blockchain. When the Incentivized Testnet is discontinued, any Rewards earned can be transferred back to the User's Daedalus or Yoroi wallet. **3.3 Delegation.** Users may delegate their stake to one of the various stake pools of the Company or to a third party stake pool. User will have the sole right to determine the volume to be delegated to a stake pool and may increase or decrease its level of participation at any time. Any information Company shares regarding stakepools, including performance metrics and Rewards, will be for indicative purposes only and may not be accurate. Users may only delegate their stake to a stake pool if their ada is in an updated Daedalus or an updated Yoroi wallet at the time of the setup process. User does not acquire any automatic right to Rewards as a result of delegating its stake. -**3.4 Company Stake-Pools.** The Company will operate various stake pools which will be visible in Daedalus or the explorer tool. The cost and network and server requirements to reliably operate such stake pools shall be determined by the Company in its sole discretion. Company will communicate the percentage amount of Reward to be shared with Users through the User’s Testnet Daedalus wallet. Rewards will accrue at the end of each epoch and will automatically appear in the User’s Testnet Deadalus wallet. Company will provide a dashboard detailing the Company’s staking performance to User. +**3.4 Company Stake-Pools.** The Company will operate various stake pools which will be visible in Daedalus or the explorer tool. The cost and network and server requirements to reliably operate such stake pools shall be determined by the Company in its sole discretion. Company will communicate the percentage amount of Reward to be shared with Users through the User's Testnet Daedalus wallet. Rewards will accrue at the end of each epoch and will automatically appear in the User's Testnet Deadalus wallet. Company will provide a dashboard detailing the Company's staking performance to User. **3.5 Redeeming Rewards.** User acknowledges and agrees that by redeeming Rewards in the Incentivised Testnet, User redeems TEST-ADA only, and that in order to redeem actual ada, User must repeat the procedure in the mainnet, once released. User shall be responsible for payment of all applicable taxes, if any, to which the Rewards might be subject and any and all other taxes which may apply to User once Rewards are redeemed. **3.6 Tools.** Company will provide Users and stake pool operators certain tools designed to estimate the amount of Rewards a User may earn on the Incentivized Testnet ("Rewards Calculator"). User understands that the Rewards Calculator is provided for illustrative purposes only and may not be accurate. Company does not promise that the Reward received will correspond to the amount indicated by the Rewards Calculator or by the stake pools. -**3.7 Prohibited Use.** User will not, and will not permit any other third party to use any device, software or routine to interfere with the proper function of the Incentivised Testnet. If there is a complaint or notice of violation, a User’s participation may be suspended without notice until resolved, and terminated if not resolved promptly. +**3.7 Prohibited Use.** User will not, and will not permit any other third party to use any device, software or routine to interfere with the proper function of the Incentivised Testnet. If there is a complaint or notice of violation, a User's participation may be suspended without notice until resolved, and terminated if not resolved promptly. -**3.8 Warranty.** The Service are provided to User on an "as is" and "as available" basis and all warranties, express, implied, statutory or otherwise, with respect to the Service are hereby excluded. User acknowledges that the Incentivized Testnet may not operate properly and that it may contain errors, design flaws or other issues. User’s use of the Incentivized Testnet remains at User’s risk and discretion. IOHK reserves the right to restart the Incentivised Testnet and reverse all or some Rewards in the case of errors and/or malicious behaviour in the system. +**3.8 Warranty.** The Product are provided to User on an "as is" and "as available" basis and all warranties, express, implied, statutory or otherwise, with respect to the Service are hereby excluded. User acknowledges that the Incentivized Testnet may not operate properly and that it may contain errors, design flaws or other issues. User's use of the Incentivized Testnet remains at User's risk and discretion. Company reserves the right to restart the Incentivised Testnet and reverse all or some Rewards in the case of errors and/or malicious behavior in the system. -**3.9 Termination of the Incentivised Testnet.** User understands and agrees that Company may change, withdraw, terminate access to and/or discontinue the Incentivized Testnet (or any portion thereof) at any time and in its sole discretion. User may end participation in the Incentivized Testnet at any time and any Rewards gained up to that time will still be transferred to User’s Daedalus or Yoroi mainnet wallet once the Incentivized Testnet is discontinued. +**3.9 Termination of the Incentivised Testnet.** User understands and agrees that Company may change, withdraw, terminate access to and/or discontinue the Incentivized Testnet (or any portion thereof) at any time and in its sole discretion. User may end participation in the Incentivized Testnet at any time and any Rewards gained up to that time will still be transferred to User's Daedalus or Yoroi mainnet wallet once the Incentivized Testnet is discontinued. **3.10 Feedback.** Users may provide suggestions, comments or ideas and report issues or problems related to their use of the Incentivized Testnet at any time by using any of the official feedback channels. diff --git a/source/renderer/app/i18n/locales/terms-of-use/ja-JP.md b/source/renderer/app/i18n/locales/terms-of-use/ja-JP.md index b2df0a4872..fc63c37bc9 100644 --- a/source/renderer/app/i18n/locales/terms-of-use/ja-JP.md +++ b/source/renderer/app/i18n/locales/terms-of-use/ja-JP.md @@ -1,6 +1,6 @@ # IOHKサービス利用規約 -本サービス利用規約(「規約」)は、Input Output HK Limited(「当社」)が作成または提供するDaedalusウォレットアプリケーションおよびIOHKインセンティブ付きテストネットなどのソフトウェアまたはアプリケーション(「製品」)のダウンロード、利用または操作するための処理を完了したあらゆる人物(「ユーザー」)に適用されます。ユーザーは、本規約がかかる製品の各規約とは個別の独立したものであることに同意します。 +本サービス利用規約(「規約」)は、IOG Singapore Pte. Ltd.(「当社」)が作成または提供するDaedalusウォレットアプリケーションおよびインセンティブ付きテストネットなどのソフトウェアまたはアプリケーション(総称として「製品」)のダウンロード、利用または操作するための処理を完了したあらゆる人物(「ユーザー」)に適用されます。ユーザーは、本規約がかかる製品の各規約とは個別の独立したものであることに同意します。 **本規約の承諾を確認することにより、ユーザーは自己の利益のためにかかる条件に拘束されることに同意するものとします。法人から正当に権限を与えられたユーザーは、その法人を代表して本規約に拘束されることに同意するものとします。** @@ -12,19 +12,19 @@ **1.2 ユーザーの表明:** ユーザーは、当社に対し(a)ユーザーが十八(18)歳以上であり、本規約に合意し、本規約におけるユーザーの義務を履行するための権能、および権限を有していること、(b)当社に提供したユーザーのすべての情報が真実、正確、かつ完全であること、(c) ユーザーが、それによる本製品へのアクセス、その使用もしくはインストールにつき、該当する管轄区域におけるすべての法律、および規則に準拠すること、(d)ユーザーが、第1.7項に記載の条項など本規約のすべての条件に準拠すること、ならびに(e)ユーザーが、本製品へのアクセス、その使用またはインストールに必要な正確かつ完全な情報を提供していることもしくはこれから提供することを表明し、保証します。 -**1.3 権利の留保:** 当社は、その作品、本製品、ブランド、ロゴ、および商標に関するすべての知的財産権、権原、および権益を留保します。当該ブランド、ロゴ、および商標は、Input Output HK Limited、IOHK、Daedalus、Daedalus暗号通貨ウォレット、Daedalusウォレット、Daedalusアプリケーション、および前述のブランド、ロゴ、および商標の多様な表現などを含みます。ユーザーは、本規約が権原および所有権を付与するものではなく、ユーザーはサービスにおいて明示、黙示を問わず、本規約で明示的に供与されたものを除く当社の知的財産法に関するいかなる権利も獲得しないことを確認し、これに合意します。ユーザーに明示的に供与されないすべての権利は、当社が留保します。 +**1.3 権利の留保:** 当社は、その作品、本製品、ブランド、ロゴ、および商標に関するすべての知的財産権、権原、および権益を留保します。当該ブランド、ロゴ、および商標は、IOG Singapore Pte. Ltd.、Input Output HK Limited、IOG、IOHK、Daedalus、Daedalus暗号通貨ウォレット、Daedalusウォレット、Daedalusアプリケーション、および前述のブランド、ロゴ、および商標の多様な表現などを含みます。ユーザーは、本規約が権原および所有権を付与するものではなく、ユーザーはサービスにおいて明示、黙示を問わず、本規約で明示的に供与されたものを除く当社の知的財産法に関するいかなる権利も獲得しないことを確認し、これに合意します。ユーザーに明示的に供与されないすべての権利は、当社が留保します。 **1.4 ライセンスの供与:** ユーザーには、Apacheライセンス、バージョン2.0(「ライセンス」)の条件に基づく本製品使用許諾ライセンスが供与されます。本製品は、本ライセンスに準拠する以外の使用はできません。ユーザーは、[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)でライセンスの複製を得ることができます。ユーザーは、当社が第三者の資料または製品もしくは当社にアクセス可能なもしくはこれにリンクされた第三者のサイトに含まれる情報、コンテンツまたはサービスのあらゆる側面について責任を負わないことを認めこれに合意します。 **1.5 ユーザーの義務:** ユーザーは、(a)ユーザーが本製品を使用するにあたり必要となる本製品との互換性、すべてのハードウェア、ソフトウェア、電力、ならびに本製品へアクセスし使用するための電気通信およびインターネットアクセス用回線およびリンク、ウェブブラウザもしくはその他の機器、プログラムおよびサービスといった物理的要件を提供、管理、ならびに確保すること、(b)ユーザーが受信する、本製品を介して送信する、または本製品に保管するすべての情報およびコンテンツの安全性、機密性、および整合性、ならびに(c)いかなる人物によるユーザーアカウントへのアクセスについて、それが正当であるか不正であるかを問わず、すべてに単独で責任を負います。 -**1.6 プライバシー:** 合理的に実行可能な場合、当社は、ユーザーのプライバシーを尊重するよう努めます。当社は、ユーザーからの事前の合意なくして、ユーザーまたはユーザーのアカウントに関する個人情報(アカウントの内容またはユーザーによる本製品の使用など)を監視、編集または開示しません。ただし、(i)政府当局による法的手続きまたはその他の法的要件への準拠、(ii)当社の権利または財産の保護および擁護、(iii)本規約の条項の履行、(iv)ユーザーもしくはその他の人物以外の本製品のユーザーの権益の保護、または(v)法律で許可される、当社のサービスもしくは機器(本製品を含む)の運用またはメンテナンスおよび修理を行う上で当社が当該行為の必要性を確信する場合を除きます。ユーザーは、一般的にインターネットに関してプライバシーを期待しないものとします。ユーザーは、ユーザーが本製品から送信する各メッセージその他の情報と共にIPアドレスが伝送、記録されることを認めるものとします。 +**1.6 プライバシー:** 本規約を承諾することにより、ユーザーは、本規約に添付および組み込まれた当社の[プライバシーポリシー](https://static.iohk.io/terms/iog-privacy-policy.pdf)にも同意するものとします。Daedalusソフトウェア内のユーザー設定を変更することにより適宜撤回可能であるユーザーの同意に基づき、当社はユーザーの行動およびデバイス情報の一部を製品の開発および改良目的で追跡することができます。かかるユーザーの行動およびデバイス情報は、以下を含みます。クリック数、ページへのアクセス、ページのスクロール、ウォレットの数、ネイティブ資産の数、セッションの期間、ウォレットの種類(ソフトウォレット、ハードウェアウォレット)、位置情報(国)、ページのパフォーマンス、オペレーティングシステム、RAM、ディスクの空き容量。 **1.7 禁止事項:** ユーザーは、そのアカウント、セキュリティ情報、鍵またははパスワードに生じる作為および不作為の一切につき全責任を負い、以下のような許可されていない目的に本製品を使用しないことに合意します。(a)一方的なメッセージ、チェーンレターまたは一方的な商用電子メールを広める、保管する、または送信すること、(b)虐待的な、卑猥な、猥褻な、中傷的な、迷惑な、極めて攻撃的な、下品な、脅迫的な、または悪質な資料を広めるか、それを合理的な人物に対し送信すること、(c)いずれかの人物の著作権、商標、特許、企業秘密またはその他の知的財産権を実際に侵害する、または侵害する可能性があるファイル、図形、ソフトウェアその他の資料を広める、保管する、または送信すること、(d)虚偽のアイデンティティを作成すること、またはいずれかの情報の同一性もしくは起源に関し、いずれかの人物に誤解を与えようとすること、(e)該当する管轄区域におけるエクスポートまたはインポートに関する法律、規則または制限に違反するか、必要な承認、ライセンスもしくは免責のないメッセージまたはコンテンツをエクスポート、再エクスポートすることまたはそれらのダウンロードを許可すること、(f)本製品のその他のアカウントもしくはその他のコンピューターネットワークを妨害する、混乱させる、またはそれらへの不正アクセスを試みること、または(g) ウィルス、トロイの木馬その他の悪質なコードもしくはプログラムを広める、保管する、または送信することなど。 **1.8 保証:** 本製品は、ベータテストを受け、開発コミュニティ、オープンソースコミュニティにおけるコントリビューター、およびベータテスターからのフィードバックによって継続的に改良されていますが、当社は、本製品にバグがないことを保証しません。適用法により必要とされるまたは書面で合意した場合を除き、明示的、黙示的を問わず本製品はいかなる保証も条件もなくして「現状有姿」ベースで配信されます。本ライセンスに基づく特定の言語による許可および制限はライセンスを参照してください。ユーザーは、本製品が以下の理由などによりアクセス不能または作動不能になる場合があることに合意します。(i)機器の不具合、(ii)会社が随時行う定期的なメンテナンスまたは修理、または(iii)会社が制御できない、もしくは合理的に予測できない要因。ユーザーは、その責任または自由裁量により本製品を使用することに合意します。 -**1.9 責任:** いかなる場合も、IOHKまたはその株主、取締役、役員、従業員、契約社員またはサービスプロバイダーは、ユーザーまたは第三者に対し、本ソフトウェアの使用、動作の中断、遅延、使用不能、収益もしくは利益の損失、報酬の損失、サービス、ビジネスもしくは営業権の遅延、中断もしくは損失、データの損失もしくは破損、暗号通貨の損失、システムもしくはシステムサービスの不具合、故障もしくは停止から生じる損失、情報の的確な転送、通読もしくは送信の失敗、情報の更新もしくは正確な情報の提供の失敗、システムの非互換性もしくは不正確な互換性情報の提供、システムセキュリティに対する違反、または直接的、間接的、派生的、付随的、懲罰的もしくは特別な損害について、これらが本規約、規約の違反、不法行為(過失を含む)その他の事象から生じるか、もしくはそれらに関連するかを問わず、当該損害が予見可能であった場合でも、当該損害が生じる可能性を事前に通知されていた場合でも責任を負いません。いかなる場合も、当社またはその株主、取締役、役員、従業員、関連会社もしくは代理人は、法的主張、損害賠償またはその他の法的責任につき、それらが契約上の行為であるか、不法行為であるか、ユーザーによる本ソフトウェアへのアクセス、その使用もしくはインストールに起因する、またはいずれかの方法でそれに関連するその他の事象によるかを問わず、責任を負いません。付随的または派生的損害の免責または制限を禁止する管轄区域があるため、この責任制限をユーザーに適用することはできません。ユーザーが本ソフトウェアに満足しない場合、ユーザーの唯一かつ排他的な救済方法は、ユーザーが本ソフトウェアの使用を中止することです。 +**1.9 責任:** いかなる場合も、当社またはその株主、関連会社、取締役、役員、従業員、契約社員またはサービスプロバイダーは、ユーザーまたは第三者に対し、本ソフトウェアの使用、動作の中断、遅延、使用不能、収益もしくは利益の損失、報酬の損失、サービス、ビジネスもしくは営業権の遅延、中断もしくは損失、データの損失もしくは破損、暗号通貨の損失、システムもしくはシステムサービスの不具合、故障もしくは停止から生じる損失、情報の的確な転送、通読もしくは送信の失敗、情報の更新もしくは正確な情報の提供の失敗、システムの非互換性もしくは不正確な互換性情報の提供、システムセキュリティに対する違反、または直接的、間接的、派生的、付随的、懲罰的もしくは特別な損害について、これらが本規約、規約の違反、不法行為(過失を含む)その他の事象から生じるか、もしくはそれらに関連するかを問わず、当該損害が予見可能であった場合でも、当該損害が生じる可能性を事前に通知されていた場合でも責任を負いません。いかなる場合も、当社またはその株主、取締役、役員、従業員、関連会社もしくは代理人は、法的主張、損害賠償またはその他の法的責任につき、それらが契約上の行為であるか、不法行為であるか、ユーザーによる本ソフトウェアへのアクセス、その使用もしくはインストールに起因する、またはいずれかの方法でそれに関連するその他の事象によるかを問わず、責任を負いません。付随的または派生的損害の免責または制限を禁止する管轄区域があるため、この責任制限をユーザーに適用することはできません。ユーザーが本ソフトウェアに満足しない場合、ユーザーの唯一かつ排他的な救済方法は、ユーザーが本ソフトウェアの使用を中止することです。 **1.10 補償:** ユーザーは、(a)本契約、(b)ユーザーによる本製品へのアクセス、その使用またはインストール(ユーザーが伝送または受信したデータまたは作業を含む)、および(c)ユーザーまたはいずれかの人物が作成、送信または再発行する、声明、データまたはコンテンツ(第1.7項で未承認として禁止される)など、いずれかの人物による本製品の未承認の使用に起因するか、これらに関連する、いかなる行為、原因、法的主張、損害、負債、要求またはいかなる人物によって主張された合理的な費用、および弁護士費用を含む法的責任からも、当社、その株主、取締役、役員、従業員、関連会社および代理人(「被免責当事者」)を免責、無害に保ち、これらを保護します。この免責には、過失の疑い、重大な過失の疑いまたは当社もしくは被免責当事者の不正行為の疑いに対する当社およびすべての被免責当事者の明示的な免責が含まれます。 @@ -38,7 +38,7 @@ **1.15 完全条項 – 依存の否定:** 本規約は、すべてのユーザーに適用される一般条件、および当社が作成または提供する特定の製品またはサービスをダウンロード、利用、操作するユーザーに適用される特別条件で構成されます。本規約は、その主題事項に関する両当事者の完全な合意を構成し、従前のすべての合意または了解事項に優先します。各当事者は、本規約に明示的に記載されるもの以外の声明、了解事項、表明、期待または合意に依存していないことを明示的に保証し、表明します。 -**1.16 紛争の解決:** 本規約は拘束力のある仲裁が適用されます。ユーザーは、本契約またはユーザーもしくはその他の人物による本製品へのアクセス、その使用もしくはインストールに起因する、またはいずれかの方法でこれらに関連する、いずれかの人物に対する紛争または法的主張の一切は、国際商業会議所の仲裁規則による拘束力のある仲裁に基づいて、当該規則に従って指名された1名以上の仲裁人によって解決されることに合意します。仲裁地は香港とし、仲裁手続きの使用言語は英語とします。 +**1.16 紛争の解決:** 本規約は拘束力のある仲裁が適用されます。ユーザーは、本契約またはユーザーもしくはその他の人物による本製品へのアクセス、その使用もしくはインストールに起因する、またはいずれかの方法でこれらに関連する、いずれかの人物に対する紛争または法的主張の一切は、国際商業会議所の仲裁規則による拘束力のある仲裁に基づいて、当該規則に従って指名された1名以上の仲裁人によって解決されることに合意します。仲裁地は香港とし、仲裁手続きの使用言語は英語とする。 **1.17 言語:** 本規約は英語で作成されています。英語版と多言語版で矛盾がある場合は、英語版が優先されます。 @@ -70,7 +70,7 @@ **3.7 禁止事項:** ユーザーは、いかなるデバイス、ソフトウェア、またはルーティンをインセンティブ付きテストネットの正常な機能に干渉するために使用する、および第三者にその使用を許可することはありません。違反行為の告発または通告があった場合、ユーザーの参加は通知なしに解決まで一時中断され、速やかに解決しない場合は終了されます。 -**3.8 保証:** サービスは、ユーザーに「現状有姿」および「利用可能な範囲」ベースで提供され、サービスに関するすべての保証は明示、黙示、法律上の如何を問わず本規約により免責となります。ユーザーは、インセンティブ付きテストネットが正常に動作しない場合があり、エラー、設計上の欠陥その他の不具合が発生し得ることを認識するものとします。ユーザーによるインセンティブ付きテストネットの使用は、ユーザーの責任および裁量で行うものとします。IOHKは、システムにエラーや悪意のある行為が生じた場合、インセンティブ付きテストネットを再起動する、または報酬の全部もしくは一部を取り消す権利を留保します。 +**3.8 保証:** 製品は、ユーザーに「現状有姿」および「利用可能な範囲」ベースで提供され、製品に関するすべての保証は明示、黙示、法律上の如何を問わず本規約により免責となります。ユーザーは、インセンティブ付きテストネットが正常に動作しない場合があり、エラー、設計上の欠陥その他の不具合が発生し得ることを認識するものとします。ユーザーによるインセンティブ付きテストネットの使用は、ユーザーの責任および裁量で行うものとします。当社は、システムにエラーや悪意のある行為が生じた場合、インセンティブ付きテストネットを再起動する、または報酬の全部もしくは一部を取り消す権利を留保します。 **3.9 インセンティブ付きテストネットの終了:** ユーザーは、当社がいつでもその単独の裁量でインセンティブ付きテストネット(またはそのいずれの部分)を変更、撤回、もしくは終了する、またはこれへのアクセスを終了することができることを理解し、これに合意します。ユーザーは、インセンティブ付きテストネットへの参加をいつでも終了することがき、その時点までに得た報酬はインセンティブ付きテストネットが終了するとユーザーのDaedalusまたはYoroiメインネットウォレットに移されます。 From 614a76d4e5acf6d8e10299c5e905b9c6d1a8f6b7 Mon Sep 17 00:00:00 2001 From: Marcin Mazurek Date: Thu, 7 Jul 2022 15:18:08 +0200 Subject: [PATCH 23/40] [DDW-1095] Fill in changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b1da137b7..a308973db3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ - Added Vasil-supported cardano-wallet ([PR 3001](https://github.com/input-output-hk/daedalus/pull/3001)) - Upgraded webpack to version 5 ([PR 2772](https://github.com/input-output-hk/daedalus/pull/2772)) +### Features + +- Updated Terms of Service ([PR 3009](https://github.com/input-output-hk/daedalus/pull/3009)) + ## 4.11.0 ### Fixes From 39e69e42dd683a9e5dc01d27d0be84fd1061eda4 Mon Sep 17 00:00:00 2001 From: Michal Rus Date: Fri, 8 Jul 2022 16:45:36 +0200 Subject: [PATCH 24/40] Update `cardano-node` to 1.35.1 --- default.nix | 1 + nix/cardano-wallet--node-1.35.1.patch | 15 +++++++++++++++ nix/sources.json | 8 ++++---- source/main/environment.ts | 2 +- 4 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 nix/cardano-wallet--node-1.35.1.patch diff --git a/default.nix b/default.nix index 3185155066..f19d053e31 100644 --- a/default.nix +++ b/default.nix @@ -37,6 +37,7 @@ let chmod -R +w $out cd $out patch -p1 -i ${./nix/cardano-wallet--enable-aarch64-darwin.patch} + patch -p1 -i ${./nix/cardano-wallet--node-1.35.1.patch} ''; }; haskellNix = import sources."haskell.nix" {}; diff --git a/nix/cardano-wallet--node-1.35.1.patch b/nix/cardano-wallet--node-1.35.1.patch new file mode 100644 index 0000000000..352e8a5f42 --- /dev/null +++ b/nix/cardano-wallet--node-1.35.1.patch @@ -0,0 +1,15 @@ +diff --git a/cabal.project b/cabal.project +index 40f1ec889..9eb3a27fd 100644 +--- a/cabal.project ++++ b/cabal.project +@@ -213,8 +213,8 @@ source-repository-package + source-repository-package + type: git + location: https://github.com/input-output-hk/cardano-node +- tag: 9f1d7dc163ee66410d912e48509d6a2300cfa68a +- --sha256: 06arx9hv7dn3qxfy83f0b6018rxbsvh841nvfyg5w6qclm1hddj7 ++ tag: c75451f0ffd7a60b5ad6c4263891e6c8acac105a ++ --sha256: 1z0zv1i58ikmbqg878f9z573jkwp4lzhmmswshm6c96rq6lprzh8 + subdir: + cardano-api + cardano-git-rev diff --git a/nix/sources.json b/nix/sources.json index 4880b080af..05ece78938 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -1,14 +1,14 @@ { "cardano-node": { - "branch": "tags/1.35.0", + "branch": "tags/1.35.1", "description": null, "homepage": null, "owner": "input-output-hk", "repo": "cardano-node", - "rev": "9f1d7dc163ee66410d912e48509d6a2300cfa68a", - "sha256": "06arx9hv7dn3qxfy83f0b6018rxbsvh841nvfyg5w6qclm1hddj7", + "rev": "c75451f0ffd7a60b5ad6c4263891e6c8acac105a", + "sha256": "1z0zv1i58ikmbqg878f9z573jkwp4lzhmmswshm6c96rq6lprzh8", "type": "tarball", - "url": "https://github.com/input-output-hk/cardano-node/archive/9f1d7dc163ee66410d912e48509d6a2300cfa68a.tar.gz", + "url": "https://github.com/input-output-hk/cardano-node/archive/c75451f0ffd7a60b5ad6c4263891e6c8acac105a.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "cardano-shell": { diff --git a/source/main/environment.ts b/source/main/environment.ts index 534bf8cbb7..c0921a5cc2 100644 --- a/source/main/environment.ts +++ b/source/main/environment.ts @@ -46,7 +46,7 @@ const isSelfnode = checkIsSelfnode(NETWORK); const isDevelopment = checkIsDevelopment(NETWORK); const keepLocalClusterRunning = process.env.KEEP_LOCAL_CLUSTER_RUNNING; const API_VERSION = process.env.API_VERSION || 'dev'; -const NODE_VERSION = '1.35.0'; // TODO: pick up this value from process.env +const NODE_VERSION = '1.35.1'; // TODO: pick up this value from process.env const mainProcessID = get(process, 'ppid', '-'); const rendererProcessID = process.pid; From 963f9a6f8f9a9ad8f7256ca8e68c19081e24b429 Mon Sep 17 00:00:00 2001 From: Michal Rus Date: Mon, 11 Jul 2022 10:48:07 +0200 Subject: [PATCH 25/40] Update `cardano-node` to 1.35.1 via `cardano-wallet` PR `.patch` Which also includes `cardano-ledger` update --- default.nix | 5 ++++- nix/cardano-wallet--node-1.35.1.patch | 15 --------------- 2 files changed, 4 insertions(+), 16 deletions(-) delete mode 100644 nix/cardano-wallet--node-1.35.1.patch diff --git a/default.nix b/default.nix index f19d053e31..f07637af9a 100644 --- a/default.nix +++ b/default.nix @@ -37,7 +37,10 @@ let chmod -R +w $out cd $out patch -p1 -i ${./nix/cardano-wallet--enable-aarch64-darwin.patch} - patch -p1 -i ${./nix/cardano-wallet--node-1.35.1.patch} + patch -p1 -i ${pkgs.fetchurl { + url = "https://github.com/input-output-hk/cardano-wallet/pull/3382.patch"; + sha256 = "1ii12g2zikv4197c7bsh4v5dc1jzygn1jap8xvnr7mvh3a09pdgn"; + }} ''; }; haskellNix = import sources."haskell.nix" {}; diff --git a/nix/cardano-wallet--node-1.35.1.patch b/nix/cardano-wallet--node-1.35.1.patch deleted file mode 100644 index 352e8a5f42..0000000000 --- a/nix/cardano-wallet--node-1.35.1.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/cabal.project b/cabal.project -index 40f1ec889..9eb3a27fd 100644 ---- a/cabal.project -+++ b/cabal.project -@@ -213,8 +213,8 @@ source-repository-package - source-repository-package - type: git - location: https://github.com/input-output-hk/cardano-node -- tag: 9f1d7dc163ee66410d912e48509d6a2300cfa68a -- --sha256: 06arx9hv7dn3qxfy83f0b6018rxbsvh841nvfyg5w6qclm1hddj7 -+ tag: c75451f0ffd7a60b5ad6c4263891e6c8acac105a -+ --sha256: 1z0zv1i58ikmbqg878f9z573jkwp4lzhmmswshm6c96rq6lprzh8 - subdir: - cardano-api - cardano-git-rev From a93156006df4326b8424f82e389b51cb1023388d Mon Sep 17 00:00:00 2001 From: Michal Rus Date: Fri, 8 Jul 2022 16:45:36 +0200 Subject: [PATCH 26/40] Update `cardano-node` to 1.35.1 via `cardano-wallet` PR `.patch` Which also includes `cardano-ledger` update --- default.nix | 4 ++++ nix/sources.json | 8 ++++---- source/main/environment.ts | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/default.nix b/default.nix index 8b078e9578..415ecf7697 100644 --- a/default.nix +++ b/default.nix @@ -37,6 +37,10 @@ let chmod -R +w $out cd $out patch -p1 -i ${./nix/cardano-wallet--enable-aarch64-darwin.patch} + patch -p1 -i ${pkgs.fetchurl { + url = "https://github.com/input-output-hk/cardano-wallet/pull/3382.patch"; + sha256 = "1ii12g2zikv4197c7bsh4v5dc1jzygn1jap8xvnr7mvh3a09pdgn"; + }} ''; }; haskellNix = import sources."haskell.nix" {}; diff --git a/nix/sources.json b/nix/sources.json index 4880b080af..05ece78938 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -1,14 +1,14 @@ { "cardano-node": { - "branch": "tags/1.35.0", + "branch": "tags/1.35.1", "description": null, "homepage": null, "owner": "input-output-hk", "repo": "cardano-node", - "rev": "9f1d7dc163ee66410d912e48509d6a2300cfa68a", - "sha256": "06arx9hv7dn3qxfy83f0b6018rxbsvh841nvfyg5w6qclm1hddj7", + "rev": "c75451f0ffd7a60b5ad6c4263891e6c8acac105a", + "sha256": "1z0zv1i58ikmbqg878f9z573jkwp4lzhmmswshm6c96rq6lprzh8", "type": "tarball", - "url": "https://github.com/input-output-hk/cardano-node/archive/9f1d7dc163ee66410d912e48509d6a2300cfa68a.tar.gz", + "url": "https://github.com/input-output-hk/cardano-node/archive/c75451f0ffd7a60b5ad6c4263891e6c8acac105a.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "cardano-shell": { diff --git a/source/main/environment.ts b/source/main/environment.ts index 534bf8cbb7..c0921a5cc2 100644 --- a/source/main/environment.ts +++ b/source/main/environment.ts @@ -46,7 +46,7 @@ const isSelfnode = checkIsSelfnode(NETWORK); const isDevelopment = checkIsDevelopment(NETWORK); const keepLocalClusterRunning = process.env.KEEP_LOCAL_CLUSTER_RUNNING; const API_VERSION = process.env.API_VERSION || 'dev'; -const NODE_VERSION = '1.35.0'; // TODO: pick up this value from process.env +const NODE_VERSION = '1.35.1'; // TODO: pick up this value from process.env const mainProcessID = get(process, 'ppid', '-'); const rendererProcessID = process.pid; From 526506e6e8282fa5455498d80dd9d37afc0eba35 Mon Sep 17 00:00:00 2001 From: Michal Rus Date: Fri, 8 Jul 2022 16:45:36 +0200 Subject: [PATCH 27/40] Update `cardano-node` to 1.35.1 via `cardano-wallet` PR `.patch` Which also includes `cardano-ledger` update --- default.nix | 4 ++++ nix/sources.json | 8 ++++---- source/main/environment.ts | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/default.nix b/default.nix index 8b078e9578..415ecf7697 100644 --- a/default.nix +++ b/default.nix @@ -37,6 +37,10 @@ let chmod -R +w $out cd $out patch -p1 -i ${./nix/cardano-wallet--enable-aarch64-darwin.patch} + patch -p1 -i ${pkgs.fetchurl { + url = "https://github.com/input-output-hk/cardano-wallet/pull/3382.patch"; + sha256 = "1ii12g2zikv4197c7bsh4v5dc1jzygn1jap8xvnr7mvh3a09pdgn"; + }} ''; }; haskellNix = import sources."haskell.nix" {}; diff --git a/nix/sources.json b/nix/sources.json index 4880b080af..05ece78938 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -1,14 +1,14 @@ { "cardano-node": { - "branch": "tags/1.35.0", + "branch": "tags/1.35.1", "description": null, "homepage": null, "owner": "input-output-hk", "repo": "cardano-node", - "rev": "9f1d7dc163ee66410d912e48509d6a2300cfa68a", - "sha256": "06arx9hv7dn3qxfy83f0b6018rxbsvh841nvfyg5w6qclm1hddj7", + "rev": "c75451f0ffd7a60b5ad6c4263891e6c8acac105a", + "sha256": "1z0zv1i58ikmbqg878f9z573jkwp4lzhmmswshm6c96rq6lprzh8", "type": "tarball", - "url": "https://github.com/input-output-hk/cardano-node/archive/9f1d7dc163ee66410d912e48509d6a2300cfa68a.tar.gz", + "url": "https://github.com/input-output-hk/cardano-node/archive/c75451f0ffd7a60b5ad6c4263891e6c8acac105a.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "cardano-shell": { diff --git a/source/main/environment.ts b/source/main/environment.ts index 534bf8cbb7..c0921a5cc2 100644 --- a/source/main/environment.ts +++ b/source/main/environment.ts @@ -46,7 +46,7 @@ const isSelfnode = checkIsSelfnode(NETWORK); const isDevelopment = checkIsDevelopment(NETWORK); const keepLocalClusterRunning = process.env.KEEP_LOCAL_CLUSTER_RUNNING; const API_VERSION = process.env.API_VERSION || 'dev'; -const NODE_VERSION = '1.35.0'; // TODO: pick up this value from process.env +const NODE_VERSION = '1.35.1'; // TODO: pick up this value from process.env const mainProcessID = get(process, 'ppid', '-'); const rendererProcessID = process.pid; From 5c4be4cbdce0e459e29c195e55a3d54e6673d3b2 Mon Sep 17 00:00:00 2001 From: Marcin Mazurek Date: Mon, 11 Jul 2022 23:09:06 +0200 Subject: [PATCH 28/40] [DDW-1108] Fix issue where no error was shown when syncing wallet was selected on redeem ITN rewards screen --- .../Step1ConfigurationContainer.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/source/renderer/app/containers/staking/dialogs/redeem-itn-rewards/Step1ConfigurationContainer.tsx b/source/renderer/app/containers/staking/dialogs/redeem-itn-rewards/Step1ConfigurationContainer.tsx index 3a41d7f117..31b03858a4 100644 --- a/source/renderer/app/containers/staking/dialogs/redeem-itn-rewards/Step1ConfigurationContainer.tsx +++ b/source/renderer/app/containers/staking/dialogs/redeem-itn-rewards/Step1ConfigurationContainer.tsx @@ -34,7 +34,7 @@ const messages = defineMessages({ @observer class Step1ConfigurationContainer extends Component { static defaultProps = DefaultProps; - onWalletAcceptable = (walletAmount?: BigNumber) => { + hasEnoughAdaToCoverFees = (walletAmount?: BigNumber) => { const minRewardsFunds = new BigNumber( MIN_REWARDS_REDEMPTION_RECEIVER_BALANCE ); @@ -62,11 +62,10 @@ class Step1ConfigurationContainer extends Component { const { amount, isRestoring } = selectedWallet || {}; let errorMessage = null; - if (selectedWallet && !this.onWalletAcceptable(amount)) { - // Wallet is restoring - if (isRestoring) errorMessage = messages.errorRestoringWallet; - // Wallet balance < min rewards redemption funds - else errorMessage = messages.errorMinRewardFunds; + if (selectedWallet && isRestoring) { + errorMessage = messages.errorRestoringWallet; + } else if (selectedWallet && !this.hasEnoughAdaToCoverFees(amount)) { + errorMessage = messages.errorMinRewardFunds; } return ( From 2f3bcc013424e56028b92ffc13537cd592873f12 Mon Sep 17 00:00:00 2001 From: Marcin Mazurek Date: Mon, 11 Jul 2022 23:38:22 +0200 Subject: [PATCH 29/40] [DDW-1108] Fix issue where user was allowed to delegate to syncing wallet --- .../DelegationStepsChooseWalletDialog.tsx | 39 ++++++++++++------- .../Step1ConfigurationContainer.tsx | 31 +++++++++------ 2 files changed, 46 insertions(+), 24 deletions(-) diff --git a/source/renderer/app/components/staking/delegation-setup-wizard/DelegationStepsChooseWalletDialog.tsx b/source/renderer/app/components/staking/delegation-setup-wizard/DelegationStepsChooseWalletDialog.tsx index 35790418a4..b046e558e2 100644 --- a/source/renderer/app/components/staking/delegation-setup-wizard/DelegationStepsChooseWalletDialog.tsx +++ b/source/renderer/app/components/staking/delegation-setup-wizard/DelegationStepsChooseWalletDialog.tsx @@ -16,6 +16,7 @@ import DialogBackButton from '../../widgets/DialogBackButton'; import Dialog from '../../widgets/Dialog'; import WalletsDropdown from '../../widgets/forms/WalletsDropdown'; import Wallet from '../../../domains/Wallet'; +import LocalizableError from '../../../i18n/LocalizableError'; const messages = defineMessages({ title: { @@ -116,6 +117,30 @@ export default class DelegationStepsChooseWalletDialog extends Component< this.props.onSelectWallet(selectedWalletId); }; + getErrorMessage = (wallet?: Wallet): LocalizableError | null => { + if (!wallet) { + return null; + } + + const { amount, reward, isRestoring } = wallet; + + if (isRestoring) { + return messages.errorRestoringWallet; + } + + if (!this.props.isWalletAcceptable(amount, reward)) { + // Wallet only has Reward balance + if (!amount.isZero() && amount.isEqualTo(reward)) { + return messages.errorMinDelegationFundsRewardsOnly; + } + + // Wallet balance < min delegation funds + return messages.errorMinDelegationFunds; + } + + return null; + }; + render() { const { intl } = this.context; const { selectedWalletId } = this.state; @@ -125,25 +150,13 @@ export default class DelegationStepsChooseWalletDialog extends Component< minDelegationFunds, onClose, onBack, - isWalletAcceptable, numberOfStakePools, getStakePoolById, } = this.props; const selectedWallet: Wallet | null | undefined = wallets.find( (wallet: Wallet) => wallet && wallet.id === selectedWalletId ); - const { amount, reward, isRestoring } = selectedWallet || {}; - let errorMessage; - - if (selectedWallet && !isWalletAcceptable(amount, reward)) { - // Wallet is restoring - if (isRestoring) errorMessage = messages.errorRestoringWallet; - // Wallet only has Reward balance - else if (!amount.isZero() && amount.isEqualTo(reward)) - errorMessage = messages.errorMinDelegationFundsRewardsOnly; - // Wallet balance < min delegation funds - else errorMessage = messages.errorMinDelegationFunds; - } + const errorMessage = this.getErrorMessage(selectedWallet); const error = errorMessage && (

diff --git a/source/renderer/app/containers/staking/dialogs/redeem-itn-rewards/Step1ConfigurationContainer.tsx b/source/renderer/app/containers/staking/dialogs/redeem-itn-rewards/Step1ConfigurationContainer.tsx index 31b03858a4..9dd4faa992 100644 --- a/source/renderer/app/containers/staking/dialogs/redeem-itn-rewards/Step1ConfigurationContainer.tsx +++ b/source/renderer/app/containers/staking/dialogs/redeem-itn-rewards/Step1ConfigurationContainer.tsx @@ -10,6 +10,7 @@ import validWords from '../../../../../../common/config/crypto/valid-words.en'; import { isValidMnemonic } from '../../../../../../common/config/crypto/decrypt'; import { MIN_REWARDS_REDEMPTION_RECEIVER_BALANCE } from '../../../../config/stakingConfig'; import Wallet from '../../../../domains/Wallet'; +import LocalizableError from '../../../../i18n/LocalizableError'; type Props = InjectedDialogContainerStepProps; const DefaultProps = InjectedDialogContainerStepDefaultProps; @@ -41,8 +42,25 @@ class Step1ConfigurationContainer extends Component { return walletAmount && walletAmount.gte(minRewardsFunds); }; + getErrorMessage = (wallet?: Wallet): LocalizableError | null => { + if (!wallet) { + return null; + } + + const { amount, isRestoring } = wallet; + + if (isRestoring) { + return messages.errorRestoringWallet; + } + if (!this.hasEnoughAdaToCoverFees(amount)) { + return messages.errorMinRewardFunds; + } + + return null; + }; + render() { - const { actions, stores, onBack, onClose } = this.props; + const { actions, stores, onClose } = this.props; const { app, staking, wallets } = stores; const { allWallets } = wallets; const { @@ -59,22 +77,13 @@ class Step1ConfigurationContainer extends Component { const selectedWallet: Wallet | null | undefined = allWallets.find( (current: Wallet) => current && current.id === selectedWalletId ); - const { amount, isRestoring } = selectedWallet || {}; - let errorMessage = null; - - if (selectedWallet && isRestoring) { - errorMessage = messages.errorRestoringWallet; - } else if (selectedWallet && !this.hasEnoughAdaToCoverFees(amount)) { - errorMessage = messages.errorMinRewardFunds; - } + const errorMessage = this.getErrorMessage(selectedWallet); return ( From bb3b93fa0473504db53b5fc135ea855a2e8946d5 Mon Sep 17 00:00:00 2001 From: Marcin Mazurek Date: Mon, 11 Jul 2022 23:43:04 +0200 Subject: [PATCH 30/40] [DDW-1108] Stop re-throwing Trezor initialization errors --- source/main/trezor/connection.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/source/main/trezor/connection.ts b/source/main/trezor/connection.ts index ac5bc8d1b3..49fcda15ef 100644 --- a/source/main/trezor/connection.ts +++ b/source/main/trezor/connection.ts @@ -14,7 +14,6 @@ export const initTrezorConnect = async () => { logger.info('[TREZOR-CONNECT] Called TrezorConnect.init()'); } catch (error) { logger.info('[TREZOR-CONNECT] Failed to call TrezorConnect.init()'); - throw error; } }; From 0c34270a10e94e6a90ec00531ffe47c557255108 Mon Sep 17 00:00:00 2001 From: Marcin Mazurek Date: Tue, 12 Jul 2022 12:09:52 +0200 Subject: [PATCH 31/40] [DDW-1108] Fill in changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 544a980f4c..531f854f11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Fixed downloaded installer being left in Downloads after latest update installs ([PR 2941](https://github.com/input-output-hk/daedalus/pull/2941)) - Fixed incorrect amount of token sent ([PR 2962](https://github.com/input-output-hk/daedalus/pull/2962)) - Ensured non-recommended decimal place setting alert is correctly shown ([PR 3007](https://github.com/input-output-hk/daedalus/pull/3007)) +- Disabled the possibility to choose a syncing wallet for ITN rewards and delegation ([PR 3015](https://github.com/input-output-hk/daedalus/pull/3015)) ### Chores From 07ae127dce356f6eeae35fca15efa4ab33c6a482 Mon Sep 17 00:00:00 2001 From: Michal Rus Date: Tue, 12 Jul 2022 13:00:42 +0200 Subject: [PATCH 32/40] Update `CHANGELOG.md` --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 544a980f4c..8708fc4805 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ### Chores +- Updated cardano-node to 1.35.1 ([PR 3012](https://github.com/input-output-hk/daedalus/pull/3012)) - Added Vasil-supported cardano-wallet ([PR 3001](https://github.com/input-output-hk/daedalus/pull/3001)) - Upgraded webpack to version 5 ([PR 2772](https://github.com/input-output-hk/daedalus/pull/2772)) From 93b026d1276b2f4156632e413f4ba61d8a1b04c1 Mon Sep 17 00:00:00 2001 From: Michal Rus Date: Tue, 12 Jul 2022 13:54:49 +0200 Subject: [PATCH 33/40] Add OS+architecture tuple to installer file names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Having the same name for both Intel and Silicon macOS is problematic during release. Also, it’s possible we’ll have `aarch64-linux` in the future. /cc @danielmain --- CHANGELOG.md | 1 + default.nix | 4 ++-- installers/common/Types.hs | 10 +++++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d73ee5625a..4c98b2503b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Fixes +- Added OS-architecture tuple to installer file names to help with releases ([PR 3016](https://github.com/input-output-hk/daedalus/pull/3016)) - Fixed downloaded installer being left in Downloads after latest update installs ([PR 2941](https://github.com/input-output-hk/daedalus/pull/2941)) - Fixed incorrect amount of token sent ([PR 2962](https://github.com/input-output-hk/daedalus/pull/2962)) diff --git a/default.nix b/default.nix index f07637af9a..d566357a3a 100644 --- a/default.nix +++ b/default.nix @@ -306,7 +306,7 @@ let signed-windows-installer = let backend_version = self.daedalus-bridge.wallet-version; frontend_version = (builtins.fromJSON (builtins.readFile ./package.json)).version; - fullName = "daedalus-${frontend_version}-${cluster}${buildNumSuffix}.exe"; # must match to packageFileName in make-installer + fullName = "daedalus-${frontend_version}-${cluster}${buildNumSuffix}-x86_64-windows.exe"; # must match to packageFileName in make-installer in pkgs.runCommand "signed-windows-installer-${cluster}" {} '' mkdir $out cp -v ${self.signFile "${self.unsigned-windows-installer}/${fullName}"} $out/${fullName} @@ -423,7 +423,7 @@ let version = (builtins.fromJSON (builtins.readFile ./package.json)).version; backend = "cardano-wallet-${nodeImplementation}"; suffix = if buildNum == null then "" else "-${toString buildNum}"; - fn = "daedalus-${version}-${self.linuxClusterBinName}${suffix}.bin"; + fn = "daedalus-${version}-${self.linuxClusterBinName}${suffix}-x86_64-linux.bin"; in pkgs.runCommand fn {} '' mkdir -p $out cp ${self.newBundle} $out/${fn} diff --git a/installers/common/Types.hs b/installers/common/Types.hs index 1f7283569f..e1a8921ee4 100644 --- a/installers/common/Types.hs +++ b/installers/common/Types.hs @@ -42,6 +42,7 @@ import Turtle (pwd, cd) import Turtle.Format (format, fp) import Data.Aeson (FromJSON(..), withObject, eitherDecode, (.:), genericParseJSON, defaultOptions) import qualified Data.ByteString.Lazy.Char8 as L8 +import qualified System.Info data OS = Linux64 @@ -113,7 +114,7 @@ packageFileName :: OS -> Cluster -> Version -> Backend -> Text -> Maybe BuildJob packageFileName _os cluster ver backend _backendVer build = fromText name <.> ext where name = T.intercalate "-" parts - parts = ["daedalus", fromVer ver, lshowText cluster] ++ build' + parts = ["daedalus", fromVer ver, lshowText cluster] ++ build' ++ [archOS] _backend' = case backend of Cardano _ -> "cardano-wallet" ext = case _os of @@ -124,6 +125,13 @@ packageFileName _os cluster ver backend _backendVer build = fromText name <.> ex Win64 -> "windows" Macos64 -> "macos" Linux64 -> "linux" + archOS = case _os of + Win64 -> "x86_64-windows" + Macos64 -> + if System.Info.arch == "aarch64" + then "aarch64-darwin" + else "x86_64-darwin" + Linux64 -> "x86_64-linux" build' = maybe [] (\b -> [fromBuildJob b]) build instance FromJSON Version where From c37109433d4027ad922aed9eec3108f56213ac64 Mon Sep 17 00:00:00 2001 From: Daniel Main Date: Wed, 13 Jul 2022 09:44:19 +0200 Subject: [PATCH 34/40] Update CHANGELOG.md Moved PR 3016 in the `Chore` section --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c98b2503b..6480e28a62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,12 @@ ### Fixes -- Added OS-architecture tuple to installer file names to help with releases ([PR 3016](https://github.com/input-output-hk/daedalus/pull/3016)) - Fixed downloaded installer being left in Downloads after latest update installs ([PR 2941](https://github.com/input-output-hk/daedalus/pull/2941)) - Fixed incorrect amount of token sent ([PR 2962](https://github.com/input-output-hk/daedalus/pull/2962)) ### Chores +- Added OS-architecture tuple to installer file names to help with releases ([PR 3016](https://github.com/input-output-hk/daedalus/pull/3016)) - Added Vasil-supported cardano-wallet ([PR 3001](https://github.com/input-output-hk/daedalus/pull/3001)) - Upgraded webpack to version 5 ([PR 2772](https://github.com/input-output-hk/daedalus/pull/2772)) From 92ecac21533ea759e3a0764b1778eef40d41d183 Mon Sep 17 00:00:00 2001 From: Michal Rus Date: Wed, 13 Jul 2022 15:36:45 +0200 Subject: [PATCH 35/40] Wait 30 s for the `daedalus_lockfile` to unlock in the Windows installer For auto-update, wait a bit longer for previous Daedalus to exit, before failing the installer. --- installers/common/WindowsInstaller.hs | 30 +++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/installers/common/WindowsInstaller.hs b/installers/common/WindowsInstaller.hs index acf605fda2..c59a2a1706 100644 --- a/installers/common/WindowsInstaller.hs +++ b/installers/common/WindowsInstaller.hs @@ -20,7 +20,8 @@ import Development.NSIS (Attrib (IconFile, IconIndex, RebootOK, Recurs name, nsis, onPagePre, onError, outFile, page, readRegStr, requestExecutionLevel, rmdir, section, setOutPath, str, strLength, uninstall, unsafeInject, unsafeInjectGlobal, - loadLanguage, + loadLanguage, sleep, (@=), detailPrint, (%<), (%&&), + not_, mutableInt_, mutable_, while, false, true, strShow, (&), writeRegDWORD, writeRegStr, (%/=), fileExists) import Prelude ((!!)) import qualified System.IO as IO @@ -185,9 +186,30 @@ writeInstallerNSIS outName (Version fullVersion') InstallerConfig{installDirecto createDirectory "$APPDATA\\$InstallDir\\Secrets-1.0" createDirectory "$APPDATA\\$InstallDir\\Logs" createDirectory "$APPDATA\\$InstallDir\\Logs\\pub" - onError (delete [] "$APPDATA\\$InstallDir\\daedalus_lockfile") $ - --abort "$SpacedName $(AlreadyRunning)" - unsafeInject $ T.unpack $ "Abort \" " <> installDirectory <> "$(AlreadyRunning)\"" + + -- XXX: sometimes during auto-update, it takes longer for Daedalus to exit, + -- and cardano-launcher.exe’s lockfile to be unlocked (deletable), so + -- let’s loop waiting for this to happen: + let waitSeconds = 30 + lockfileCounter <- mutableInt_ 0 + lockfileDeleted <- mutable_ false + while ((lockfileCounter %< waitSeconds) %&& (not_ lockfileDeleted)) $ do + detailPrint ( + "Checking if Daedalus is not running (" + Development.NSIS.& strShow (lockfileCounter + 1) + Development.NSIS.& "/" + Development.NSIS.& strShow waitSeconds + Development.NSIS.& ")..." + ) + lockfileDeleted @= true + onError (delete [] "$APPDATA\\$InstallDir\\daedalus_lockfile") $ do + lockfileDeleted @= false + iff_ (not_ lockfileDeleted) $ do + sleep 1000 -- milliseconds + lockfileCounter @= lockfileCounter + 1 + iff_ (not_ (lockfileDeleted)) $ do + unsafeInject $ T.unpack $ "Abort \"" <> installDirectory <> " $(AlreadyRunning)\"" + iff_ (fileExists "$APPDATA\\$InstallDir\\Wallet-1.0\\open\\*.*") $ rmdir [] "$APPDATA\\$InstallDir\\Wallet-1.0\\open" case oBackend of From 4bda8feaf7838eec62e2871ecd8be5d4351056d9 Mon Sep 17 00:00:00 2001 From: Michal Rus Date: Thu, 14 Jul 2022 14:06:33 +0200 Subject: [PATCH 36/40] =?UTF-8?q?Keep=20`cardano-wallet`=E2=80=99s=20`3382?= =?UTF-8?q?.patch`=20inside=20our=20repository?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- default.nix | 8 ++- nix/cardano-wallet--pr-3382--ledger-bug.patch | 63 +++++++++++++++++++ 2 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 nix/cardano-wallet--pr-3382--ledger-bug.patch diff --git a/default.nix b/default.nix index d566357a3a..7e4a229ff6 100644 --- a/default.nix +++ b/default.nix @@ -37,8 +37,12 @@ let chmod -R +w $out cd $out patch -p1 -i ${./nix/cardano-wallet--enable-aarch64-darwin.patch} - patch -p1 -i ${pkgs.fetchurl { - url = "https://github.com/input-output-hk/cardano-wallet/pull/3382.patch"; + patch -p1 -i ${builtins.path { + # XXX: unfortunately, GitHub changed lengths of hashes in patches it returns for PRs, + # that’s why we’re providing this patch inside our repo, with the same exact SHA-256, + # to the one released in 4.12.0: + path = ./nix/cardano-wallet--pr-3382--ledger-bug.patch; + recursive = false; sha256 = "1ii12g2zikv4197c7bsh4v5dc1jzygn1jap8xvnr7mvh3a09pdgn"; }} ''; diff --git a/nix/cardano-wallet--pr-3382--ledger-bug.patch b/nix/cardano-wallet--pr-3382--ledger-bug.patch new file mode 100644 index 0000000000..7e05a1c666 --- /dev/null +++ b/nix/cardano-wallet--pr-3382--ledger-bug.patch @@ -0,0 +1,63 @@ +From 3f0186bdc9231b0bc3523294d4b6ead52b0e1419 Mon Sep 17 00:00:00 2001 +From: Samuel Evans-Powell +Date: Mon, 11 Jul 2022 10:14:31 +0800 +Subject: [PATCH 1/2] Bump to cardano-node 1.35.1 + +--- + cabal.project | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/cabal.project b/cabal.project +index 40f1ec8899..9eb3a27fd4 100644 +--- a/cabal.project ++++ b/cabal.project +@@ -213,8 +213,8 @@ source-repository-package + source-repository-package + type: git + location: https://github.com/input-output-hk/cardano-node +- tag: 9f1d7dc163ee66410d912e48509d6a2300cfa68a +- --sha256: 06arx9hv7dn3qxfy83f0b6018rxbsvh841nvfyg5w6qclm1hddj7 ++ tag: c75451f0ffd7a60b5ad6c4263891e6c8acac105a ++ --sha256: 1z0zv1i58ikmbqg878f9z573jkwp4lzhmmswshm6c96rq6lprzh8 + subdir: + cardano-api + cardano-git-rev + +From a4d31a3e3d4dbd3b713dff5d911edd3869a3b343 Mon Sep 17 00:00:00 2001 +From: Samuel Evans-Powell +Date: Mon, 11 Jul 2022 10:21:02 +0800 +Subject: [PATCH 2/2] Bump version of cardano-node in compatibility matrix + +--- + README.md | 2 +- + cabal.project | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/README.md b/README.md +index d10239eec3..b0c8c7ceec 100644 +--- a/README.md ++++ b/README.md +@@ -73,7 +73,7 @@ See **Installation Instructions** for each available [release](https://github.co + > + > | cardano-wallet | cardano-node (compatible versions) | SMASH (compatible versions) + > | --- | --- | --- +-> | `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) ++> | `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) + > | [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) + > | [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) + > | [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) +diff --git a/cabal.project b/cabal.project +index 9eb3a27fd4..c83a3e282c 100644 +--- a/cabal.project ++++ b/cabal.project +@@ -183,8 +183,8 @@ source-repository-package + source-repository-package + type: git + location: https://github.com/input-output-hk/cardano-ledger +- tag: ce3057e0863304ccb3f79d78c77136219dc786c6 +- --sha256: 19ijcy1sl1iqa7diy5nsydnjsn3281kp75i2i42qv0fpn58238s9 ++ tag: 3be8a19083fc13d9261b1640e27dd389b51bb08e ++ --sha256: 0dvm9l43mp1i34bcywmznd0660hhcfxwgawypk9q1hjkml1i41z3 + subdir: + eras/alonzo/impl + eras/alonzo/test-suite From a5f9a8013a39006818a1f8fa60ebdf7155b10549 Mon Sep 17 00:00:00 2001 From: shawnbusuttil Date: Mon, 18 Jul 2022 16:55:51 +0100 Subject: [PATCH 37/40] Update errors.ts --- source/renderer/app/api/errors.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/renderer/app/api/errors.ts b/source/renderer/app/api/errors.ts index c9a86afd1a..5ab6a0caea 100644 --- a/source/renderer/app/api/errors.ts +++ b/source/renderer/app/api/errors.ts @@ -1,6 +1,6 @@ import BigNumber from 'bignumber.js'; import { defineMessages } from 'react-intl'; - +import get from 'lodash/get'; import ApiError, { ErrorType } from '../domains/ApiError'; export const messages = defineMessages({ From a5aee21db149b143aba061b6278006448b506518 Mon Sep 17 00:00:00 2001 From: shawnbusuttil Date: Fri, 22 Jul 2022 11:19:00 +0100 Subject: [PATCH 38/40] rerun build --- source/renderer/app/api/errors.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/renderer/app/api/errors.ts b/source/renderer/app/api/errors.ts index 5ab6a0caea..acac84ba15 100644 --- a/source/renderer/app/api/errors.ts +++ b/source/renderer/app/api/errors.ts @@ -1,6 +1,6 @@ import BigNumber from 'bignumber.js'; -import { defineMessages } from 'react-intl'; import get from 'lodash/get'; +import { defineMessages } from 'react-intl'; import ApiError, { ErrorType } from '../domains/ApiError'; export const messages = defineMessages({ From 8954b5824218d3fa38fa04201f1d6bd11e2b404e Mon Sep 17 00:00:00 2001 From: Michal Rus Date: Wed, 27 Jul 2022 14:42:48 +0200 Subject: [PATCH 39/40] Fix `darwin-launcher.go` to replace its process with `cardano-launcher` (binary) --- nix/darwin-launcher.go | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/nix/darwin-launcher.go b/nix/darwin-launcher.go index 1fb0ec7642..82fb29f3c8 100644 --- a/nix/darwin-launcher.go +++ b/nix/darwin-launcher.go @@ -5,9 +5,12 @@ import ( "os" "os/exec" "path/filepath" + "syscall" ) func main() { + fmt.Fprintf(os.Stderr, "darwin-launcher: PID = %d\n", os.Getpid()) + ex, err := os.Executable() if err != nil { panic(err) @@ -17,14 +20,23 @@ func main() { os.Setenv("PATH", fmt.Sprintf("%s:%s", installDir, os.Getenv("PATH"))) - launcherConfig := filepath.Join(installDir, "../Resources/launcher-config.yaml") - helper := filepath.Join(installDir, "../Resources/helper") - + launcherConfigPath := filepath.Join(installDir, "../Resources/launcher-config.yaml") + helperPath := filepath.Join(installDir, "../Resources/helper") - if err = exec.Command(helper).Run(); err != nil { + helperCmd := exec.Command(helperPath) + helperCmd.Stdout = os.Stdout + helperCmd.Stderr = os.Stderr + if err := helperCmd.Run(); err != nil { panic(err) } - if err = exec.Command("cardano-launcher", "--config", launcherConfig).Run(); err != nil { - panic(err) + + // Replace the current process (otherwise WDIO complains in end-to-end tests): + img := filepath.Join(installDir, "cardano-launcher") + argv := []string{"cardano-launcher", "--config", launcherConfigPath} + env := os.Environ() + if err := syscall.Exec(img, argv, env); err != nil { + fmt.Println(err) } + + fmt.Fprintf(os.Stderr, "this won’t happen\n") } From 24991f6daf0dfb62d2e59c5557b8f2a4af9080a1 Mon Sep 17 00:00:00 2001 From: Michal Rus Date: Thu, 28 Jul 2022 12:21:56 +0200 Subject: [PATCH 40/40] [DDW-1122] Add a CHANGELOG entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 34854949e4..4d5c2fc6d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Chores +- 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)) - Updated cardano-node to 1.35.1 ([PR 3012](https://github.com/input-output-hk/daedalus/pull/3012)) ### Features