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:
Martin Huschenbett 2020-01-24 13:55:56 +01:00 committed by mergify[bot]
parent f3f7def5d2
commit 183df61805

View File

@ -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));