From 006c101c0605e6d63f15d7cbbd0ce9840e5b8cf3 Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Mon, 3 Jun 2024 12:18:18 -0500 Subject: [PATCH] Fix issue 010 --- CHANGELOG.md | 6 +++++- src/Zenith/CLI.hs | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8ddb47..8daee9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [0.5.3.0-beta] -## Fixed +### Changed + +- Improved formatting of sync progress + +### Fixed - Wallet sync when no new block has been detected on-chain. diff --git a/src/Zenith/CLI.hs b/src/Zenith/CLI.hs index 953b0a8..dcc2e7f 100644 --- a/src/Zenith/CLI.hs +++ b/src/Zenith/CLI.hs @@ -76,6 +76,7 @@ import Lens.Micro ((&), (.~), (^.), set) import Lens.Micro.Mtl import Lens.Micro.TH import System.Hclip +import Text.Printf import Text.Wrap (FillScope(..), FillStrategy(..), WrapSettings(..), wrapText) import ZcashHaskell.Keys (generateWalletSeedPhrase, getWalletSeed) import ZcashHaskell.Orchard (getSaplingFromUA, isValidUnifiedAddress) @@ -453,7 +454,7 @@ drawUI s = [splashDialog s, helpDialog s, displayDialog s, inputDialog s, ui s] , (barToDoAttr, P.progressIncompleteAttr) ]) (P.progressBar - (Just $ show (st ^. barValue * 100)) + (Just $ printf "%.2f%%" (st ^. barValue * 100)) (_barValue st)))) SendDisplay -> withBorderStyle unicodeBold $ -- 2.34.1