Daml Finance Warning while using transfer choice of transferable

I am getting this warning in daml finance. The Buyer party has a holding and am trying to use the Transfer Choice on the holding’s Transferable Interface to transfer the holding to the seller

Tried to fetch or exercise cb031d99fc7c026d55f770378a6c7368584e53867b4134e476cc26a4b6afd42e:Daml.Finance.Holding.Fungible:Factory on contract 006c9392f74bc99c3bcb553ce0843cbebc2328f8baed97e79edda245ff45b22327 but none of the reading parties [Buyer] are contract stakeholders [Operator,Public]. Use of divulged contracts is deprecated and incompatible with pruning. To remedy, add one of the readers [Buyer] as an observer to the contract.

How can i fix this?

It looks like you are missing readAs = [public] here to read the holding factory contract.

1 Like

The script is a derivative of daml finance ref app script/scenario, i am submiting the command using the Buyer Party, the corresponding user has readas right as the public party. But am submitting the command as a party, Is there a way to submit the command as a user.

Daml Script has a submitUser function that you can use. Alternatively you can use submitMulti [buyer] [public] which will allow you to read data as the public party.