I am experimenting with DAML model and React.js UI and ran into an issue.
I have the following DAML Model deployed in Dar file
template Network
with
operator : Party
where
signatory operator
controller operator can
nonconsuming InviteHealthClinic : ContractId HealthClinicInvitation
with
healthClinic : Party
do
create HealthClinicInvitation with healthClinic, operator
nonconsuming InviteCitizen : ContractId CitizenInvitation
with
citizen : Party
do
create CitizenInvitation with citizen, operator
I also adjusted the Template-UI Report,Js to the following React code:
If you have upgraded from a pre-1.0.0 version of the UI, I suggest to remove all generated code as well as your node_modules directories and do a fresh install of everything. Note that for installing the JS libraries in a particular version you can use yarn install @daml/ledger@1.0.1.
I updated the React code and updated the dependencies and the UI was now generated in my local environment but my Report or Default pages are blank.
Quick Questions:
Do you have sample React code to display all the Templates (like in the Navigator version)
Can a local environment be supported with a local database ?
Since I am using SDK 1.0.1 is my assumption correct this will not work (yet) with Project Dabble. For it to work in project Dabble I would have to downgrade back to SDK 0.13.55
Using the react hooks there is no way to get all contracts regardless of template. You always need to specify the template you want to fetch contracts for.
Today I’ve successfully deployed and run a v1.0.1 app (DAML + UI) on DABL. So it should already work although versions >0.13.55 are not officially supported there yet.