daml/templates/create-daml-app-test-resources
Moritz Kiefer a230de2f82
Support getting started guide on Daml Hub (#12878)
* Support getting started guide on Daml Hub

This is annoyingly complex so let me try to provide an explanation for
the changes:

1. On Daml hub, we need to use a separate token for the public party
   and the user party.
2. This means that we need separate contexts. I cannot get access to
   the default context (not exposed) so annoyingly even for the user context we need to
   use a custom context
3. The way to get access to the public party in Daml hub is via a
   hook that reads it from the context. However, we cannot call that
   within the login callback so the way things work now that we login
   immediately show a "Logging in..." loading screen while we run the
   background query. This is actually kinda nice since it means
   something happens immediately after clicking login.

I’m sure there are better ways of handling this, my react foo is very
weak but this is what I managed to get to work.

Tested locally as well as on Daml hub and both work fine.

changelog_begin
changelog_end

.

.

.

.

.

.

.

* s/any/void/

* fmt
2022-02-11 16:41:07 +00:00
..
index.test.ts Add autoformatting to ts bindings & navigator frontend (#12693) 2022-02-11 11:44:52 +00:00
messaging.patch Support getting started guide on Daml Hub (#12878) 2022-02-11 16:41:07 +00:00
testDeps.json Upgrade jest to the latest version (#10107) 2021-06-24 11:16:29 +00:00