Skip to content
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

Merged
merged 2 commits into from
Jul 26, 2019

Conversation

nickchapman-da
Copy link
Contributor

  • support haskell ledger bindings for the PartyManagementService & test
  • small code cleanups following previous PR comments

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 to
trigger the build.

@nickchapman-da nickchapman-da added the component/ledger Sandbox and Ledger API label Jul 26, 2019
Copy link
Contributor

@cocreature cocreature left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nickchapman-da nickchapman-da merged commit 7064953 into master Jul 26, 2019
@nickchapman-da nickchapman-da deleted the hlb-party-management-service branch July 26, 2019 15:47
Copy link
Contributor

@hurryabit hurryabit left a 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{} -> ())
Copy link
Contributor

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
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/ledger Sandbox and Ledger API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants