Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/fix/ddw-431-newsfeed-shadow' int…
Browse files Browse the repository at this point in the history
…o fix/ddw-431-newsfeed-shadow
  • Loading branch information
DeeJayElly committed Nov 19, 2020
2 parents 9cb02ee + aa330e2 commit 0375fed
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 35 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,7 @@ Changelog

### Chores

- Updated `cardano-wallet` to version `2020-11-17` ([PR 2246](https://github.com/input-output-hk/daedalus/pull/2246))
- Implemented a tool for quickly copying css properties on theme files ([PR 2196](https://github.com/input-output-hk/daedalus/pull/2196))
- Hid hardware wallet restoration support ([PR 2237](https://github.com/input-output-hk/daedalus/pull/2237))

Expand Down
7 changes: 4 additions & 3 deletions README.md
Expand Up @@ -112,9 +112,10 @@ Daedalus - Cryptocurrency Wallet
`Niv` is used to manage the version of upstream dependencies. The versions of these dependencies can be seen in `nix/sources.json`.

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"`
- Update cardano-wallet to the latest master: `nix-shell -A devops --arg nivOnly true --run "niv update cardano-wallet"`
- Update cardano-wallet to a specific revision: `nix-shell -A devops --arg nivOnly true --run "niv update cardano-wallet -a rev=91db88f9195de49d4fb4299c68fc3f6de09856ab"`
- Update cardano-node to a specific tag: `nix-shell -A devops --arg nivOnly true --run "niv update cardano-node -b tags/1.20.0"`
- Update iohk-nix to the latest master: `nix-shell -A devops --arg nivOnly true --run "niv update iohk-nix -b master"`

#### Notes

Expand Down
3 changes: 1 addition & 2 deletions installers/common/Config.hs
Expand Up @@ -25,11 +25,10 @@ import qualified Data.Text as T
import Filesystem.Path (FilePath)
import qualified Filesystem.Path.Rules as FP

import Turtle (optional, (<|>), format, (%), s, Format, makeFormat)
import Turtle (format, (%), s, Format, makeFormat)
import Turtle.Options

import Universum hiding (FilePath, unlines, writeFile)
import GHC.Base (id)
import Types

-- | Enum-instanced sum types as case-insensitive option values.
Expand Down
6 changes: 0 additions & 6 deletions installers/common/MacInstaller.hs
Expand Up @@ -18,22 +18,16 @@ module MacInstaller
import Universum hiding (FilePath, toText, (<>))

import Control.Exception (handle)
import Control.Monad (unless)
import Data.Text (Text)
import qualified Data.Text as T
import Data.Aeson (FromJSON(parseJSON), genericParseJSON, defaultOptions, decodeFileStrict')
import Data.Yaml (decodeFileThrow)
import Text.RawString.QQ
import Filesystem.Path (FilePath, dropExtension, (<.>),
(</>))
import Filesystem.Path.CurrentOS (encodeString)
import System.IO (BufferMode (NoBuffering),
hSetBuffering)
import System.IO.Error (IOError, isDoesNotExistError)
import System.Environment (getEnv)
import System.Posix.Files
import Turtle hiding (e, prefix, stdout)
import Turtle.Line (unsafeTextToLine)


import Config
Expand Down
1 change: 0 additions & 1 deletion installers/common/Types.hs
Expand Up @@ -36,7 +36,6 @@ where

import Universum hiding (FilePath)
import qualified Data.Text as T
import Data.String (IsString)
import Filesystem.Path
import Filesystem.Path.CurrentOS (fromText, encodeString)
import Turtle (pwd, cd)
Expand Down
1 change: 0 additions & 1 deletion installers/common/Util.hs
Expand Up @@ -2,7 +2,6 @@

module Util where

import Control.Monad (mapM_)
import Data.Text (Text)
import System.Directory (listDirectory, withCurrentDirectory, removeDirectory, removeFile, doesDirectoryExist)
import Turtle (export)
Expand Down
24 changes: 11 additions & 13 deletions installers/common/WindowsInstaller.hs
Expand Up @@ -10,9 +10,7 @@ module WindowsInstaller

import Universum hiding (pass, writeFile, stdout, FilePath, die, view)

import Control.Monad (unless)
import qualified Data.List as L
import Data.Text (Text, unpack)
import qualified Data.Text as T
import Data.Yaml (decodeFileThrow)
import Development.NSIS (Attrib (IconFile, IconIndex, RebootOK, Recursive, Required, StartOptions, Target),
Expand Down Expand Up @@ -40,7 +38,7 @@ import Util
daedalusShortcut :: Text -> [Attrib]
daedalusShortcut installDir =
[ Target "$INSTDIR\\cardano-launcher.exe"
, IconFile $ fromString $ unpack $ "$INSTDIR\\" <> installDir <> ".exe"
, IconFile $ fromString $ T.unpack $ "$INSTDIR\\" <> installDir <> ".exe"
, StartOptions "SW_SHOWMINIMIZED"
, IconIndex 0
]
Expand All @@ -50,9 +48,9 @@ writeUninstallerNSIS :: Version -> InstallerConfig -> IO ()
writeUninstallerNSIS (Version fullVersion) installerConfig = do
tempDir <- getTempDir
IO.writeFile "uninstaller.nsi" $ nsis $ do
_ <- constantStr "Version" (str $ unpack fullVersion)
_ <- constantStr "InstallDir" (str $ unpack $ installDirectory installerConfig)
_ <- constantStr "SpacedName" (str $ unpack $ spacedName installerConfig)
_ <- constantStr "Version" (str $ T.unpack fullVersion)
_ <- constantStr "InstallDir" (str $ T.unpack $ installDirectory installerConfig)
_ <- constantStr "SpacedName" (str $ T.unpack $ spacedName installerConfig)
unsafeInjectGlobal "Unicode true"

loadLanguage "English"
Expand All @@ -66,7 +64,7 @@ writeUninstallerNSIS (Version fullVersion) installerConfig = do
name "$SpacedName Uninstaller $Version"
-- TODO, the nsis library doesn't support translation vars
-- name "$InstallDir $(UninstallName) $Version"
--unsafeInjectGlobal $ unpack ( "Name \"" <> (installDirectory installerConfig) <> " $(UninstallName) " <> (fullVersion) <> "\"")
--unsafeInjectGlobal $ T.unpack ( "Name \"" <> (installDirectory installerConfig) <> " $(UninstallName) " <> (fullVersion) <> "\"")
outFile . str . encodeString $ tempDir </> "tempinstaller.exe"
unsafeInjectGlobal "!addplugindir \"nsis_plugins\\liteFirewall\\bin\""
unsafeInjectGlobal "SetCompress off"
Expand Down Expand Up @@ -133,15 +131,15 @@ parseVersion ver =
writeInstallerNSIS :: FilePath -> Version -> InstallerConfig -> Options -> Cluster -> IO ()
writeInstallerNSIS outName (Version fullVersion') InstallerConfig{hasBlock0,installDirectory,spacedName} Options{oBackend} clusterName = do
tempDir <- getTempDir
let fullVersion = unpack fullVersion'
let fullVersion = T.unpack fullVersion'
viProductVersion = L.intercalate "." $ parseVersion fullVersion'
printf ("VIProductVersion: "%w%"\n") viProductVersion

IO.writeFile "daedalus.nsi" $ nsis $ do
_ <- constantStr "Version" (str fullVersion)
_ <- constantStr "Cluster" (str $ lshow clusterName)
_ <- constantStr "InstallDir" (str $ unpack installDirectory)
_ <- constantStr "SpacedName" (str $ unpack spacedName)
_ <- constantStr "InstallDir" (str $ T.unpack installDirectory)
_ <- constantStr "SpacedName" (str $ T.unpack spacedName)
name "$SpacedName ($Version)" -- The name of the installer
outFile $ str $ encodeString outName -- Where to produce the installer
unsafeInjectGlobal $ "!define MUI_ICON \"icons\\" ++ lshow clusterName ++ "\\" ++ lshow clusterName ++ ".ico\""
Expand Down Expand Up @@ -189,7 +187,7 @@ writeInstallerNSIS outName (Version fullVersion') InstallerConfig{hasBlock0,inst
createDirectory "$APPDATA\\$InstallDir\\Logs\\pub"
onError (delete [] "$APPDATA\\$InstallDir\\daedalus_lockfile") $
--abort "$SpacedName $(AlreadyRunning)"
unsafeInject $ unpack $ "Abort \" " <> installDirectory <> "$(AlreadyRunning)\""
unsafeInject $ T.unpack $ "Abort \" " <> installDirectory <> "$(AlreadyRunning)\""
iff_ (fileExists "$APPDATA\\$InstallDir\\Wallet-1.0\\open\\*.*") $
rmdir [] "$APPDATA\\$InstallDir\\Wallet-1.0\\open"
case oBackend of
Expand Down Expand Up @@ -276,7 +274,7 @@ packageFrontend cluster installerConfig = do
rewritePackageJson "../package.json" installDir
echo "running yarn"
shells ("yarn run package --icon " <> icon) empty
cp "../node_modules/ps-list/fastlist.exe" $ fromString $ unpack $ releaseDir <> "/resources/app/dist/main/fastlist.exe"
cp "../node_modules/ps-list/fastlist.exe" $ fromString $ T.unpack $ releaseDir <> "/resources/app/dist/main/fastlist.exe"

-- | The contract of `main` is not to produce unsigned installer binaries.
main :: Options -> IO ()
Expand Down Expand Up @@ -313,7 +311,7 @@ main opts@Options{..} = do
putStr rawnsi
IO.hFlush IO.stdout

windowsRemoveDirectoryRecursive $ unpack $ "../release/win32-x64/" <> (installDirectory installerConfig) <> "-win32-x64/resources/app/installers/.stack-work"
windowsRemoveDirectoryRecursive $ T.unpack $ "../release/win32-x64/" <> (installDirectory installerConfig) <> "-win32-x64/resources/app/installers/.stack-work"

echo "Generating NSIS installer"
procs "C:\\Program Files (x86)\\NSIS\\makensis" ["daedalus.nsi", "-V4"] mempty
Expand Down
2 changes: 0 additions & 2 deletions nix/jormungandr-bridge.nix
Expand Up @@ -11,9 +11,7 @@ in pkgs.runCommandCC "daedalus-bridge" {
} ''
mkdir -pv $out/bin
cd $out/bin
cp -f ${cardano-wallet.haskellPackages.cardano-wallet-jormungandr.components.exes.cardano-wallet-jormungandr}/bin/* .
cp -f ${cardano-shell.haskellPackages.cardano-launcher.components.exes.cardano-launcher}/bin/cardano-launcher* .
cp -f ${cardano-wallet.jormungandr}/bin/* .
cp -f ${cardano-address}/bin/cardano-address* .
echo ${cardano-wallet.version} > $out/version
Expand Down
12 changes: 6 additions & 6 deletions nix/sources.json
Expand Up @@ -29,10 +29,10 @@
"homepage": null,
"owner": "input-output-hk",
"repo": "cardano-wallet",
"rev": "77e04fc0f0c226f27ea2e293666bb8311ba0daa1",
"sha256": "0kc1ddidp1vip8rfnm7vp5avx46xr9nvyzn7q9r3yn50ylhx0i0j",
"rev": "7767f33b7fde5cadf35e7974c531a49cd2680aa5",
"sha256": "1y4sfykqkdijv2rx4758nc1b2f262cn89qfsv48xrv4irwi7x5mr",
"type": "tarball",
"url": "https://github.com/input-output-hk/cardano-wallet/archive/77e04fc0f0c226f27ea2e293666bb8311ba0daa1.tar.gz",
"url": "https://github.com/input-output-hk/cardano-wallet/archive/7767f33b7fde5cadf35e7974c531a49cd2680aa5.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz",
"version": "v2020-04-28"
},
Expand Down Expand Up @@ -66,10 +66,10 @@
"homepage": null,
"owner": "input-output-hk",
"repo": "iohk-nix",
"rev": "e3759db64f898ab8b33a4f73d2f864ff76fa6987",
"sha256": "14ah4r49mi8sxw5yc2vqgvqpyy4sp8swyp1xz71da1r8y3j902my",
"rev": "0e5128870dc9de4f603fb35e6c7f659e18c8b6d6",
"sha256": "0pbm85jpmi166wb3hahmg791ycqcy6iryvimk7r8d051sf4rkmvb",
"type": "tarball",
"url": "https://github.com/input-output-hk/iohk-nix/archive/e3759db64f898ab8b33a4f73d2f864ff76fa6987.tar.gz",
"url": "https://github.com/input-output-hk/iohk-nix/archive/0e5128870dc9de4f603fb35e6c7f659e18c8b6d6.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"js-chain-libs": {
Expand Down
4 changes: 3 additions & 1 deletion source/main/cardano/CardanoWalletLauncher.js
Expand Up @@ -134,7 +134,9 @@ export async function CardanoWalletLauncher(walletOpts: WalletOpts): Launcher {
logger.info('Launching Wallet with --pool-metadata-fetching flag', {
poolMetadataSource: { smashUrl },
});
merge(launcherConfig, { poolMetadataSource: { smashUrl } });
merge(launcherConfig, {
poolMetadataSource: { smashUrl },
});
}
merge(launcherConfig, { nodeConfig, tlsConfiguration });
break;
Expand Down

0 comments on commit 0375fed

Please sign in to comment.