Skip to content

Commit

Permalink
daml-ledger.ts: Rename create argument to payload (digital-asset#4198)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hurryabit authored and mergify[bot] committed Jan 24, 2020
1 parent f3f7def commit 183df61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions language-support/ts/daml-ledger/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 183df61

Please sign in to comment.