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:
2026-07-09 12:34:02 -07:00
parent a16c9cc5e5
commit 593fedcdd4
@@ -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)
}
}