Created
December 30, 2020 21:06
-
-
Save arturaz/ba251b7fa540c28f85dcff38c7b47c07 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (final kv in accounts.entries) { | |
kv.value.details.owner.iswitch( | |
me: () {}, | |
otherUser: (userId) { | |
otherUsers | |
.getE(userId) | |
.fold((err) => errors.add(StateUpdateError.withoutEvent(err)), | |
(events) { | |
final accountId = kv.key; | |
if (!events.share.rules.isShared(accountId)) { | |
final maybeError = moveAccountToNotShared(accountId); | |
if (maybeError.isSome) | |
errors.add( | |
StateUpdateError.withoutEvent(maybeError.getOrThrow)); | |
} | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment