diff --git a/clients/bitwindow/lib/pages/root_page.dart b/clients/bitwindow/lib/pages/root_page.dart index 1d753996..20cb699c 100644 --- a/clients/bitwindow/lib/pages/root_page.dart +++ b/clients/bitwindow/lib/pages/root_page.dart @@ -209,6 +209,18 @@ class _StatusBarState extends State { child: SailText.primary12('Last block: ${_getTimeSinceLastBlock()}'), ), const DividerDot(), + if (blockchainProvider.blockchainInfo.initialBlockDownload && + blockchainProvider.blockchainInfo.blocks != blockchainProvider.blockchainInfo.headers) + Tooltip( + message: + 'Current height: ${blockchainProvider.blockchainInfo.blocks}\nHeader height: ${blockchainProvider.blockchainInfo.headers}', + child: SailText.primary12( + 'Downloading blocks (${blockchainProvider.verificationProgress}%)', + ), + ), + if (blockchainProvider.blockchainInfo.initialBlockDownload && + blockchainProvider.blockchainInfo.blocks != blockchainProvider.blockchainInfo.headers) + const DividerDot(), SailText.primary12( '${formatWithThousandSpacers(blockchainProvider.blockchainInfo.blocks)} blocks', ), diff --git a/clients/bitwindow/lib/providers/blockchain_provider.dart b/clients/bitwindow/lib/providers/blockchain_provider.dart index 6e67670f..7a29ae40 100644 --- a/clients/bitwindow/lib/providers/blockchain_provider.dart +++ b/clients/bitwindow/lib/providers/blockchain_provider.dart @@ -21,6 +21,7 @@ class BlockchainProvider extends ChangeNotifier { // computed field go here Timestamp? get lastBlockAt => recentBlocks.isNotEmpty ? recentBlocks.first.blockTime : null; + String get verificationProgress => ((blockchainInfo.blocks / blockchainInfo.headers) * 100).toStringAsFixed(2); bool _isFetching = false; Timer? _fetchTimer;