Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DDW-1210] Error is shown trying to delegate to the same wallet #1862

Merged
merged 5 commits into from
Feb 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Changelog
- Implemented acceptance tests for wallet delegation ([PR 1814](https://github.com/input-output-hk/daedalus/pull/1814))
- Improved loading state of the "Stake pools" screen ([PR 1814](https://github.com/input-output-hk/daedalus/pull/1814))
- Updated `cardano-wallet` to version `2020-02-17` ([PR 1856](https://github.com/input-output-hk/daedalus/pull/1856))
- Updated `cardano-wallet` to revision `573a7038` ([PR 1862](https://github.com/input-output-hk/daedalus/pull/1862))

## 2.1.0-ITN1

Expand Down
23 changes: 13 additions & 10 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,19 @@ let
systemTable = {
x86_64-windows = builtins.currentSystem;
};
crossSystemTable = {
crossSystemTable = lib: {
x86_64-windows = lib.systems.examples.mingwW64;
};
system = systemTable.${target} or target;
pkgs = localLib.iohkNix.getPkgsDefault { inherit system config; };
crossSystem = crossSystemTable.${target} or null;
sources = localLib.sources;
walletPkgs = import "${sources.cardano-wallet}/nix" {};
shellPkgs = (import "${sources.cardano-shell}/nix/iohk-common.nix").getPkgs {};
inherit (pkgs.lib) optionalString optional;
crossSystem = lib: (crossSystemTable lib).${target} or null;
# TODO, nsis cant cross-compile with the nixpkgs daedalus currently uses
nsisNixPkgs = import localLib.sources.nixpkgs-nsis {};
installPath = ".daedalus";
lib = pkgs.lib;
cardanoSL = localLib.cardanoSL { inherit target; };
needSignedBinaries = (signingKeys != null) || (HSMServer != null);
buildNumSuffix = if buildNum == null then "" else ("-${builtins.toString buildNum}");
Expand All @@ -43,8 +46,8 @@ let
bridgeTable = {
jormungandr = self.callPackage ./nix/jormungandr-bridge.nix {};
};
cardano-wallet = import self.sources.cardano-wallet { inherit system crossSystem; gitrev = self.sources.cardano-wallet.rev; };
cardano-shell = import self.sources.cardano-shell { inherit system crossSystem; };
cardano-wallet = import self.sources.cardano-wallet { inherit system; gitrev = self.sources.cardano-wallet.rev; crossSystem = crossSystem walletPkgs.lib; };
cardano-shell = import self.sources.cardano-shell { inherit system; crossSystem = crossSystem shellPkgs.lib; };

# a cross-compiled fastlist for the ps-list package
fastlist = pkgs.pkgsCross.mingwW64.callPackage ./nix/fastlist.nix {};
Expand Down Expand Up @@ -147,13 +150,13 @@ let

cp $installerConfigPath installer-config.json
export LANG=en_US.UTF-8
make-installer --os win64 -o $out --cluster ${cluster} ${lib.optionalString (buildNum != null) "--build-job ${buildNum}"} buildkite-cross
make-installer --os win64 -o $out --cluster ${cluster} ${optionalString (buildNum != null) "--build-job ${buildNum}"} buildkite-cross

mkdir $out
cp daedalus.nsi uninstaller.nsi $out/
cp $launcherConfigPath $out/launcher-config.yaml
${lib.optionalString self.launcherConfigs.installerConfig.hasBlock0 "cp ${self.launcherConfigs.installerConfig.block0} $out/block-0.bin"}
${lib.optionalString (cluster != "selfnode") "cp ${self.launcherConfigs.jormungandr-config} $out/jormungandr-config.yaml"}
${optionalString self.launcherConfigs.installerConfig.hasBlock0 "cp ${self.launcherConfigs.installerConfig.block0} $out/block-0.bin"}
${optionalString (cluster != "selfnode") "cp ${self.launcherConfigs.jormungandr-config} $out/jormungandr-config.yaml"}
'';

unsignedUninstaller = pkgs.runCommand "uninstaller" { buildInputs = [ self.nsis self.wine ]; } ''
Expand Down Expand Up @@ -189,7 +192,7 @@ let
in pkgs.runCommand "win64-installer-${cluster}" {
buildInputs = [
self.daedalus-installer self.nsis pkgs.unzip pkgs.jq self.yaml2json
] ++ lib.optional (fudgeConfig != null) self.configMutator;
] ++ optional (fudgeConfig != null) self.configMutator;
} ''
echo '~~~ Preparing files for installer'
mkdir home
Expand Down Expand Up @@ -223,7 +226,7 @@ let
fi
cp -v ${./utils/jormungandr/selfnode/genesis.yaml} genesis.yaml
chmod -R +w .
${lib.optionalString (fudgeConfig != null) ''
${optionalString (fudgeConfig != null) ''
set -x
KEY=$(yaml2json launcher-config.yaml | jq .configuration.key -r)
config-mutator configuration.yaml ''${KEY} ${toString fudgeConfig.applicationVersion} > temp
Expand Down
2 changes: 1 addition & 1 deletion nix/jormungandr-bridge.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

let
commonLib = import ../lib.nix {};
pkgsCross = import cardano-wallet.pkgs.path { crossSystem = pkgs.lib.systems.examples.mingwW64; config = {}; overlays = []; };
pkgsCross = import cardano-wallet.pkgs.path { crossSystem = cardano-wallet.pkgs.lib.systems.examples.mingwW64; config = {}; overlays = []; };
in pkgs.runCommandCC "daedalus-bridge" {
passthru = {
node-version = cardano-wallet.jormungandr.version;
Expand Down
6 changes: 3 additions & 3 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
"homepage": null,
"owner": "input-output-hk",
"repo": "cardano-wallet",
"rev": "fb516756e2429daa83542e6e0d95a61c0ff53dc4",
"sha256": "0qcw3a6fy5g6ai3xml6ngwi3vrsmyznpc0n36y94k3jm9ni2k1s2",
"rev": "573a7038c87fcd77b567ab021017622e9982a4a7",
"sha256": "1yfgjzfvw3ggkh9cg62a7xmb6zy8if149cx066b9vrla5rqk5mnm",
"type": "tarball",
"url": "https://github.com/input-output-hk/cardano-wallet/archive/fb516756e2429daa83542e6e0d95a61c0ff53dc4.tar.gz",
"url": "https://github.com/input-output-hk/cardano-wallet/archive/573a7038c87fcd77b567ab021017622e9982a4a7.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz",
"version": "v2020-02-17"
},
Expand Down