Skip to content

Commit 5c168fd

Browse files
committed
fix(flipcash/pools): don't distribute when no distributions
Signed-off-by: Brandon McAnsh <[email protected]>
1 parent a1bac93 commit 5c168fd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

apps/flipcash/shared/payments/src/main/kotlin/com/flipcash/app/payments/internal/InternalPoolResolveDelegate.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ class InternalPoolResolveDelegate @Inject constructor(
6262

6363
val poolAccount = userManager.poolAccountAt(pool.derivationIndex)
6464

65+
if (distributions.getOrNull().orEmpty().isEmpty()) {
66+
onSuccess(RandomId)
67+
return
68+
}
6569
transactionController.distributeFunds(
6670
owner = owner,
6771
from = poolAccount.cluster,

0 commit comments

Comments
 (0)