-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hlb, support: PartyManagementService #2300
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Thanks.
>>= \case | ||
Right LL.SubmitAndWaitForTransactionIdResponse{} -> return $ Right () | ||
Left details -> return $ Left $ show $ unStatusDetails details | ||
<&> fmap (\LL.SubmitAndWaitForTransactionIdResponse{} -> ()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, Data.Functor
and Contol.Monad
export
void :: Functor f => f a -> f ()
void = fmap (const ())
You might use that.
@@ -59,7 +53,7 @@ submitAndWaitForTransaction commands = | |||
Right response -> | |||
either (fail . show) (return . Right) $ raiseResponse response | |||
Left details -> | |||
return $ Left $ show $ unStatusDetails details | |||
return $ Left details |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have quite a few functions returning LedgerService (Either _ _)
. Would it make sense to move the error handling capabilities into the LedgerService
monad?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so.
Pull Request Checklist
NOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with
/AzurePipelines run
totrigger the build.