mirror of
https://github.com/pezkuwichain/pezkuwi-wallet-android.git
synced 2026-07-22 13:45:48 +00:00
fix: avoid suspend call inside non-inline removeAll(predicate)
removeAll { assetDao.getAsset(...) } failed to compile ("Suspension
functions can only be called within coroutine body"). filter{} is
unambiguously inline and safe for a suspend call inside a suspend
function; pair it with the plain Collection-based removeAll(elements)
overload instead, which takes no lambda at all.
This commit is contained in:
+2
-1
@@ -68,9 +68,10 @@ class PezkuwiFullArchitectureBalancesTest {
|
||||
val stillMissing = fixture.assets.toMutableList()
|
||||
withTimeoutOrNull(120.seconds) {
|
||||
while (stillMissing.isNotEmpty()) {
|
||||
stillMissing.removeAll { asset ->
|
||||
val found = stillMissing.filter { asset ->
|
||||
assetDao.getAsset(metaId, asset.chainId, asset.assetId) != null
|
||||
}
|
||||
stillMissing.removeAll(found)
|
||||
if (stillMissing.isNotEmpty()) delay(2.seconds)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user