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

Create alias contracts in frontend in create-daml-app #12848

Merged
merged 2 commits into from
Feb 10, 2022

Conversation

cocreature
Copy link
Contributor

Creating them in the setup script is nice but it makes it much harder
to port this to Daml hub where we cannot rely on this.

This also requires figuring out the public party in the frontend.

I’ve chosen to infer it from the user rights which seems broadly
sensible.

For the backwards compat mode, I just hardcoded it because there isn’t
a great way to figure it out.

Pull Request Checklist

  • Read and understand the contribution guidelines
  • Include appropriate tests
  • Set a descriptive title and thorough description
  • Add a reference to the issue this PR will solve, if appropriate
  • Include changelog additions in one or more commit message bodies between the CHANGELOG_BEGIN and CHANGELOG_END tags
  • Normal production system change, include purpose of change in description
  • If you mean to change the status of a component, please make sure you keep the Component Status page up to date.

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.

@cocreature cocreature force-pushed the public-party-refactor branch 2 times, most recently from 4768a0d to e33612e Compare February 10, 2022 07:45
Creating them in the setup script is nice but it makes it much harder
to port this to Daml hub where we cannot rely on this.

This also requires figuring out the public party in the frontend.

I’ve chosen to infer it from the user rights which seems broadly
sensible.

For the backwards compat mode, I just hardcoded it because there isn’t
a great way to figure it out.

changelog_begin
changelog_end
@cocreature cocreature force-pushed the public-party-refactor branch from e33612e to fe5b8d4 Compare February 10, 2022 08:54
@cocreature cocreature requested review from a user and akrmn February 10, 2022 09:09
.
changelog_begin
changelog_end
@@ -100,7 +113,8 @@ const LoginScreen: React.FC<Props> = ({onLogin}) => {
<DamlHubLoginBtn
onLogin={creds => {
if (creds) {
login({party:creds.party, user: {userId: creds.partyName, primaryParty: creds.party}, token:creds.token});
// TODO (MK) Fix public party in Daml hub
Copy link
Contributor Author

Choose a reason for hiding this comment

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

both of these todos were already broken before, just breaking them slightly more. working on the daml hub one, #12849 tracks the auth0 part which the runtime team will work on.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Looks good!

@cocreature cocreature merged commit 5b4fdf0 into main Feb 10, 2022
@cocreature cocreature deleted the public-party-refactor branch February 10, 2022 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant