--- a/TalerWallet1/Views/Settings/Exchange/ExchangeListView.swift +++ b/TalerWallet1/Views/Settings/Exchange/ExchangeListView.swift @@ -150,7 +150,11 @@ } #endif let balanceList = List { - ForEachWithIndex(array: controller.balances) { index, balance in + // A section is identified by its balance's `id` (the payment service, or the currency), + // not by the whole balance. With the amounts in the identity every change of the + // balance replaced the section by a new one: its rows were gone until listExchanges + // had answered again, and its state ("don't run twice") was forgotten. + ForEach(Array(zip(controller.balances.indices, controller.balances)), id: \.1.id) { index, balance in ExchangeSectionView(stack: stack.push(), balance: balance, thousand: index * MAXEXCHANGES, // unique ID