From 75b568a74f3eed0a73730fe3e6d6ab77257d34b8 Mon Sep 17 00:00:00 2001 From: EA Date: Wed, 23 Oct 2024 16:55:41 +0600 Subject: [PATCH] Add TON blockchain to app status --- .../UnstoppableWallet/Core/Adapters/TonAdapter.swift | 6 +++++- .../Modules/AppStatus/AppStatusViewModel.swift | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/UnstoppableWallet/UnstoppableWallet/Core/Adapters/TonAdapter.swift b/UnstoppableWallet/UnstoppableWallet/Core/Adapters/TonAdapter.swift index 7e36f7db1c..617c2802a8 100644 --- a/UnstoppableWallet/UnstoppableWallet/Core/Adapters/TonAdapter.swift +++ b/UnstoppableWallet/UnstoppableWallet/Core/Adapters/TonAdapter.swift @@ -63,7 +63,11 @@ extension TonAdapter: IAdapter { } var statusInfo: [(String, Any)] { - [] + [ + ("Sync State", "\(tonKit.syncState)"), + ("Jetton Sync State", "\(tonKit.jettonSyncState)"), + ("Event Sync State", "\(tonKit.eventSyncState)"), + ] } var debugInfo: String { diff --git a/UnstoppableWallet/UnstoppableWallet/Modules/AppStatus/AppStatusViewModel.swift b/UnstoppableWallet/UnstoppableWallet/Modules/AppStatus/AppStatusViewModel.swift index 43185107bf..991851f9f4 100644 --- a/UnstoppableWallet/UnstoppableWallet/Modules/AppStatus/AppStatusViewModel.swift +++ b/UnstoppableWallet/UnstoppableWallet/Modules/AppStatus/AppStatusViewModel.swift @@ -69,7 +69,7 @@ class AppStatusViewModel { let blockchain = wallet.token.blockchain switch blockchain.type { - case .bitcoin, .bitcoinCash, .ecash, .litecoin, .dash, .zcash: + case .bitcoin, .bitcoinCash, .ecash, .litecoin, .dash, .zcash, .ton: if let adapter = adapterManager.adapter(for: wallet) { blockchainBlocks.append(block(blockchain: blockchain.name, statusInfo: adapter.statusInfo)) }