mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-10 10:46:11 +03:00
daml-ledger.ts: Rename create argument to payload (#4198)
This is better in line with the field name of the `CreatedEvent` you'll receive as a result of calling this. CHANGELOG_BEGIN CHANGELOG_END
This commit is contained in:
parent
f3f7def5d2
commit
183df61805
@ -157,10 +157,10 @@ class Ledger {
|
||||
/**
|
||||
* Create a contract for a given template.
|
||||
*/
|
||||
async create<T extends object, K>(template: Template<T, K>, contractPayload: T): Promise<CreateEvent<T, K>> {
|
||||
async create<T extends object, K>(template: Template<T, K>, payload: T): Promise<CreateEvent<T, K>> {
|
||||
const command = {
|
||||
templateId: template.templateId,
|
||||
payload: contractPayload,
|
||||
payload,
|
||||
};
|
||||
const json = await this.submit('command/create', command);
|
||||
return jtv.Result.withException(decodeCreateEvent(template).run(json));
|
||||
|
Loading…
Reference in New Issue
Block a user