File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Adamant/Modules/Account/AccountViewController Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -91,9 +91,9 @@ final class AccountViewController: FormViewController {
9191
9292 private var walletViewControllers : [ WalletViewController ] = [ ]
9393
94- private lazy var currentSelectedWallet : AccountWalletCellState ? = { viewModel . state . wallets . first ( where : { wallet in
95- wallet . model. index == 0
96- } ) } ( )
94+ private lazy var currentSelectedWallet : AccountWalletCellState ? = {
95+ viewModel . state . wallets . first ( where : { $0 . model. index == 0 } )
96+ } ( )
9797
9898 private var initiated = false
9999
Original file line number Diff line number Diff line change @@ -46,11 +46,11 @@ extension AccountWalletsViewModel {
4646 let tokenID = coreService. tokenUniqueID
4747 if let index = state. wallets. firstIndex ( where: { $0. model. coinID == tokenID } ) {
4848 let cellState = state. wallets [ index]
49- var newModel = cellState. model
50- newModel . balance = coreService. wallet? . balance ?? 0
51- newModel . isBalanceInitialized = coreService. wallet? . isBalanceInitialized ?? false
52- newModel . notificationBadgeCount = coreService. wallet? . notifications ?? 0
53- cellState. model = newModel
49+ var currentModel = cellState. model
50+ currentModel . balance = coreService. wallet? . balance ?? 0
51+ currentModel . isBalanceInitialized = coreService. wallet? . isBalanceInitialized ?? false
52+ currentModel . notificationBadgeCount = coreService. wallet? . notifications ?? 0
53+ cellState. model = currentModel
5454 state. wallets [ index] = cellState
5555 } else {
5656 let network = type ( of: coreService) . tokenNetworkSymbol
You can’t perform that action at this time.
0 commit comments