Hi
on my frontend code i have a choice that i need to exercise that has one argument that is of a type Map.
I am making use of @daml/types at version 2.8.0
My code is similar to the following short example:
import * as damlTypes from "@daml/types"
const ledger = useLedger();
function handleExercise(value: string) {
let myMap = damlTypes.emptyMap<string, string>()
myMap.set("myKey", value);
ledger.exercise(MyChoice, contractId, { config:myMap })
}
This code works - by this i mean that the Typescript doesnβt complain of the type check on the argument- , but the set property of empytMap is not setting the key or the value on the Map created. The type of the config property on the argument is the following Map<string, string>
Any help on how to create a Map<string, string>
would be appreciated.
Thank you in advance.