Skip to content

Commit

Permalink
Merge branch 'develop' into chore/ddw-396-the-retirement-label-is-too…
Browse files Browse the repository at this point in the history
…-light-on-yellow-theme
  • Loading branch information
DeeJayElly committed Sep 25, 2020
2 parents c7b8cc9 + 7a14db1 commit e71cc26
Show file tree
Hide file tree
Showing 113 changed files with 3,377 additions and 2,056 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Expand Up @@ -17,6 +17,8 @@ Changelog

### Chores

- Updated `cardano-wallet` to version `2020-09-22` ([PR 2188](https://github.com/input-output-hk/daedalus/pull/2188))
- Updated `cardano-wallet` to revision `ffeca1d9` which includes `cardano-node` 1.20.0 ([PR 2187](https://github.com/input-output-hk/daedalus/pull/2187))
- Set "Delegation center" as default staking screen ([PR 2185](https://github.com/input-output-hk/daedalus/pull/2185))
- Changed the ordering of wallet addresses on the "Receive" screen so that the oldest one are on top and the newest one on the bottom of the list ([PR 2176](https://github.com/input-output-hk/daedalus/pull/2176))
- Fixed UI issues ([PR 2152](https://github.com/input-output-hk/daedalus/pull/2152))
Expand Down Expand Up @@ -91,6 +93,10 @@ Changelog

## 2.0.0-RC1

### Features

- Implemented Daedalus app automatic update ([PR 2056](https://github.com/input-output-hk/daedalus/pull/2056))

### Fixes

- Fixed the epoch duration copy ([PR 2107](https://github.com/input-output-hk/daedalus/pull/2107))
Expand Down
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -117,6 +117,7 @@ Daedalus - Cryptocurrency Wallet
Dependencies are updated with the follow nix commands:
- Update to the latest master: `nix-shell -A devops --arg nivOnly true --run "niv update cardano-wallet"`
- Update to a specific revision: `nix-shell -A devops --arg nivOnly true --run "niv update cardano-wallet -a rev=91db88f9195de49d4fb4299c68fc3f6de09856ab"`
- Update node to a specific tag: `nix-shell -A devops --arg nivOnly true --run "niv update cardano-node -b tags/1.20.0"`

#### Notes

Expand Down
11 changes: 3 additions & 8 deletions default.nix
Expand Up @@ -78,9 +78,9 @@ let
};
cardano-wallet = import self.sources.cardano-wallet { inherit system; gitrev = self.sources.cardano-wallet.rev; crossSystem = crossSystem walletPkgs.lib; };
cardano-wallet-native = import self.sources.cardano-wallet { inherit system; gitrev = self.sources.cardano-wallet.rev; };
cardano-address = (import self.sources.cardano-wallet { inherit system; gitrev = self.sources.cardano-wallet.rev; crossSystem = crossSystem walletPkgs.lib; }).haskellPackages.cardano-addresses.components.exes.cardano-address;
cardano-address = (import self.sources.cardano-wallet { inherit system; gitrev = self.sources.cardano-wallet.rev; crossSystem = crossSystem walletPkgs.lib; }).cardano-address;
cardano-shell = import self.sources.cardano-shell { inherit system; crossSystem = crossSystem shellPkgs.lib; };
cardano-cli = (import self.sources.cardano-node { inherit system; crossSystem = crossSystem nodePkgs.lib; }).haskellPackages.cardano-cli.components.exes.cardano-cli;
cardano-cli = (import self.sources.cardano-node { inherit system; crossSystem = crossSystem nodePkgs.lib; }).cardano-cli;
cardano-node-cluster = let
# Test wallets with known mnemonics
walletTestGenesisYaml = (self.sources.cardano-wallet + "/lib/shelley/test/data/cardano-node-shelley/genesis.yaml");
Expand Down Expand Up @@ -333,12 +333,7 @@ let
runLint = self.callPackage ./tests/lint.nix {};
runShellcheck = self.callPackage ./tests/shellcheck.nix { src = ./.;};
};
nix-bundle = import (pkgs.fetchFromGitHub {
owner = "matthewbauer";
repo = "nix-bundle";
rev = "7f12322399fd87d937355d0fc263d37d798496fc";
sha256 = "07wnmdadchf73p03wk51abzgd3zm2xz5khwadz1ypbvv3cqlzp5m";
}) { nixpkgs = pkgs; };
nix-bundle = import sources.nix-bundle { nixpkgs = pkgs; };
iconPath = self.launcherConfigs.installerConfig.iconPath;
# used for name of profile, binary and the desktop shortcut
linuxClusterBinName = cluster;
Expand Down
31 changes: 24 additions & 7 deletions installers/nix/nix-installer.nix
Expand Up @@ -8,6 +8,8 @@ let
target = "${installer}";
run = "/bin/installer";
nixUserChrootFlags = "-c -m /home:/home -p HOME";
rmStyle = "-rm_";
shared = false;
};
utils = pkgs.writeText "utils.sh" ''
function rmrf {
Expand All @@ -29,24 +31,38 @@ let
pwd
id
UNPACK=$(mktemp -d)
cd $UNPACK
echo "$@"
bash "$1" --extract
ls -ltrh dat/nix/store/*-tarball/tarball/tarball.tar.xz
UNPACK2=$(mktemp -d)
tar --delay-directory-restore -C $UNPACK2 -xf dat/nix/store/*-tarball/tarball/tarball.tar.xz
cd
pushd $UNPACK
echo "$@"
echo STATUS decompressing
echo PROG 1/6
bash "$1" --extract
ls -ltrh dat/nix/store/*-tarball/tarball/tarball.tar.xz
UNPACK2=$(mktemp -d)
echo STATUS unpacking
echo PROG 2/6
tar --delay-directory-restore -C $UNPACK2 -xf dat/nix/store/*-tarball/tarball/tarball.tar.xz
popd
echo STATUS removing temp files
echo PROG 3/6
rmrf $UNPACK
ls -ltrh $UNPACK2
echo STATUS copying files
echo PROG 3/6
NIX_REMOTE=local?root=$UNPACK2 nix-store --load-db < $UNPACK2/nix-path-registration
NIX_REMOTE=local?root=$UNPACK2 nix-store --verify --check-contents
nix copy --no-check-sigs --from local?root=$UNPACK2 $(readlink $UNPACK2/firstGeneration)
export NIX_PROFILE=/nix/var/nix/profiles/profile
nix-env --set $(readlink $UNPACK2/firstGeneration)
nix-env -p /nix/var/nix/profiles/profile-${linuxClusterBinName} --set $(readlink $UNPACK2/firstGeneration)
echo STATUS cleaning up
echo PROG 4/6
rmrf $UNPACK2
echo STATUS post-install
echo PROG 5/6
post-install || true
echo STATUS done
echo PROG 6/6
'';
enter = pkgs.writeScriptBin "enter-chroot" ''
#!/usr/bin/env bash
Expand Down Expand Up @@ -86,6 +102,7 @@ let
ln -svf ${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt /etc/ssl/certs/ca-certificates.crt
ln -svf ${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt /etc/ssl/certs/ca-bundle.crt
unset NIX_SSL_CERT_FILE
export USER=daedalus
if [ -z "$@" ]; then
exec bash
Expand Down
1 change: 1 addition & 0 deletions nix/launcher-config.nix
Expand Up @@ -151,6 +151,7 @@ let
inherit logsPrefix launcherLogsPrefix tlsConfig;
walletLogging = false;
daedalusBin = mkBinPath "frontend";
updateRunnerBin = mkBinPath "update-runner";
# TODO: set when update system is complete
updaterArgs = [];
updaterPath = "";
Expand Down
26 changes: 19 additions & 7 deletions nix/sources.json
@@ -1,14 +1,14 @@
{
"cardano-node": {
"branch": "master",
"branch": "tags/1.20.0",
"description": null,
"homepage": null,
"owner": "input-output-hk",
"repo": "cardano-node",
"rev": "9e06d6f9a293a9656bf6e31b7e5d0a9f498163d1",
"sha256": "1kh2rnis2r7g7a40pffnnkzj5mra25581a57b2fgq21jk0g42cby",
"rev": "1f2f51164b53b9b775c03ac9f1e23e7b70c74b05",
"sha256": "0ql57bhisnhs2dr2vdk8s4rwnff818lzvqw3l2780q16f20yypdg",
"type": "tarball",
"url": "https://github.com/input-output-hk/cardano-node/archive/9e06d6f9a293a9656bf6e31b7e5d0a9f498163d1.tar.gz",
"url": "https://github.com/input-output-hk/cardano-node/archive/1f2f51164b53b9b775c03ac9f1e23e7b70c74b05.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"cardano-shell": {
Expand All @@ -29,10 +29,10 @@
"homepage": null,
"owner": "input-output-hk",
"repo": "cardano-wallet",
"rev": "d7994e9c83ed00d798cf24f3101e50f0383ddc17",
"sha256": "00wzahmqm44hkxrcns1ig5zann057328y24xbv34jwjgllldmzhb",
"rev": "e3145b822d4ece10f98039e3b5b535d9e43d190a",
"sha256": "1nfzfdv03nz2bhin2jflxsmh597vkjifb76jsdg0384x89gi0a10",
"type": "tarball",
"url": "https://github.com/input-output-hk/cardano-wallet/archive/d7994e9c83ed00d798cf24f3101e50f0383ddc17.tar.gz",
"url": "https://github.com/input-output-hk/cardano-wallet/archive/e3145b822d4ece10f98039e3b5b535d9e43d190a.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz",
"version": "v2020-04-28"
},
Expand Down Expand Up @@ -96,6 +96,18 @@
"url": "https://github.com/input-output-hk/niv/archive/4229fbcf62997467c34283a2f353702359e78e5a.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nix-bundle": {
"branch": "rm-style",
"description": "Bundle Nix derivations to run anywhere!",
"homepage": "",
"owner": "input-output-hk",
"repo": "nix-bundle",
"rev": "acf3b142c1fa332d4f9050e7cdfb3c3f8091e78b",
"sha256": "0pcc8bh1x3shr6k2h8zw05n0apm5ppx6nk07xp89ljldah4mmc6c",
"type": "tarball",
"url": "https://github.com/input-output-hk/nix-bundle/archive/acf3b142c1fa332d4f9050e7cdfb3c3f8091e78b.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs-nsis": {
"branch": "nsis",
"description": "A read-only mirror of NixOS/nixpkgs tracking the released channels. Send issues and PRs to",
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -229,6 +229,7 @@
"rust-cardano-crypto": "0.2.0",
"safe-buffer": "5.2.0",
"semver": "7.1.3",
"shasum": "1.0.2",
"source-map-support": "0.5.16",
"spectron-fake-dialog": "0.0.1",
"unorm": "1.6.0",
Expand Down
12 changes: 12 additions & 0 deletions source/common/config/appUpdateConfig.js
@@ -0,0 +1,12 @@
// @flow
import type { UpdateInstallationStatus } from '../types/app-update.types';

export const APP_UPDATE_DOWNLOAD_ID = 'appUpdate';

export const UPDATE_INSTALLATION_STATUSES: {
[key: string]: UpdateInstallationStatus,
} = {
PROGRESS: 'progress',
ERROR: 'error',
SUCCESS: 'success',
};
6 changes: 5 additions & 1 deletion source/common/config/downloadManagerConfig.js
Expand Up @@ -38,6 +38,8 @@ export const DOWNLOAD_EVENT_TYPES: {
PROGRESS: 'progress',
END: 'end',
TIMEOUT: 'timeout',
STOP: 'stop',
PAUSE: 'pause',
ERROR: 'error',
};

Expand All @@ -49,7 +51,7 @@ export const TEMPORARY_FILENAME = {
extension: 'crdownload',
};

export const DOWNLOAD_PROGRESS_DEFAULT = {
export const DOWNLOAD_DATA_DEFAULT = {
state: DOWNLOAD_STATES.IDLE,
remainingSize: 0,
serverFileSize: 0,
Expand All @@ -60,3 +62,5 @@ export const DOWNLOAD_PROGRESS_DEFAULT = {
incomplete: false,
isResumed: false,
};

export const ERROR_TIME_AFTER_NO_END_EVENT = 10 * 1000; // 10 seconds | unit: milliseconds
2 changes: 2 additions & 0 deletions source/common/config/electron-store.config.js
Expand Up @@ -26,4 +26,6 @@ export const STORAGE_KEYS: {
WALLETS: 'WALLETS',
WALLET_MIGRATION_STATUS: 'WALLET-MIGRATION-STATUS',
DOWNLOAD_MANAGER: 'DOWNLOAD-MANAGER',
APP_AUTOMATIC_UPDATE_FAILED: 'APP-AUTOMATIC-UPDATE-FAILED',
APP_UPDATE_COMPLETED: 'APP-UPDATE-COMPLETED',
};
61 changes: 53 additions & 8 deletions source/common/ipc/api.js
Expand Up @@ -36,6 +36,11 @@ import type {
DownloadResponse,
ResumeDownloadRequest,
ResumeDownloadResponse,
ClearDownloadLocalDataRequest,
ClearDownloadLocalDataResponse,
DeleteDownloadedFileRequest,
DeleteDownloadedFileResponse,
CheckFileExistsRequest,
} from '../types/downloadManager.types';
import type { StoreMessage } from '../types/electron-store.types';
import type {
Expand Down Expand Up @@ -297,6 +302,27 @@ export type ShowSaveDialogMainResponse = SaveFileDialogResponseParams;
export const ELECTRON_STORE_CHANNEL = 'ELECTRON_STORE_CHANNEL';
export type ElectronStoreMessage = StoreMessage;

/**
* Channel for requesting a new download
*/
export const REQUEST_DOWNLOAD = 'REQUEST_DOWNLOAD';
export type DownloadRendererRequest = DownloadRequest;
export type DownloadMainResponse = DownloadResponse;

/**
* Channel for resuming an existing download
*/
export const RESUME_DOWNLOAD = 'RESUME_DOWNLOAD';
export type ResumeDownloadRendererRequest = ResumeDownloadRequest;
export type ResumeDownloadMainResponse = ResumeDownloadResponse | void;

/**
* Channel for resuming an existing download
*/
export const DELETE_DOWNLOADED_FILE = 'DELETE_DOWNLOADED_FILE';
export type DeleteDownloadedFileRendererRequest = DeleteDownloadedFileRequest;
export type DeleteDownloadedFileMainResponse = DeleteDownloadedFileResponse | void;

/**
* Channel for initiating the download manager
*/
Expand All @@ -312,18 +338,37 @@ export type DownloadsLocalDataRendererRequest = DownloadsLocalDataRequest | void
export type DownloadsLocalDataMainResponse = DownloadsLocalDataResponse | void;

/**
* Channel for requesting a new download
* Channel for initiating the download manager
*/
export const REQUEST_DOWNLOAD = 'REQUEST_DOWNLOAD';
export type DownloadRendererRequest = DownloadRequest;
export type DownloadMainResponse = DownloadResponse;
export const CLEAR_DOWNLOAD_LOCAL_DATA = 'CLEAR_DOWNLOAD_LOCAL_DATA';
export type ClearDownloadLocalDataRendererRequest = ClearDownloadLocalDataRequest;
export type ClearDownloadLocalDataMainResponse = ClearDownloadLocalDataResponse;

/**
* Channel for requesting a new download
* Channel for checking if the downloaded file still exists
*/
export const RESUME_DOWNLOAD = 'RESUME_DOWNLOAD';
export type ResumeDownloadRendererRequest = ResumeDownloadRequest;
export type ResumeDownloadMainResponse = ResumeDownloadResponse | void;
export const CHECK_FILE_EXISTS = 'CHECK_FILE_EXISTS';
export type CheckFileExistsRendererRequest = CheckFileExistsRequest;
export type CheckFileExistsMainResponse = boolean;

/**
* Channel for quitting Daedalus and installing update
*/
export const MANAGE_APP_UPDATE = 'MANAGE_APP_UPDATE';
export type ManageAppUpdateRendererRequest = {
filePath: string,
hash: string,
};
export type ManageAppUpdateMainResponse = {
status: 'progress' | 'success' | 'error',
data: {
message?: string,
progress?: number,
code?: number,
error?: Error,
info?: Object,
},
};

/**
* Channel for introspecting an address
Expand Down
3 changes: 3 additions & 0 deletions source/common/types/app-update.types.js
@@ -0,0 +1,3 @@
// @flow

export type UpdateInstallationStatus = 'progress' | 'error' | 'success';

0 comments on commit e71cc26

Please sign in to comment.