From b2f89db6f1cfa829ee81a0e0c4857b318470813c Mon Sep 17 00:00:00 2001 From: Mark Addis <35331926+nitro-marky@users.noreply.github.com> Date: Mon, 4 Sep 2023 12:42:15 +0100 Subject: [PATCH] add verbose to create --- src/lib/process/api.ts | 5 +++-- src/lib/process/index.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/process/api.ts b/src/lib/process/api.ts index 9d78bf4..ac223fd 100644 --- a/src/lib/process/api.ts +++ b/src/lib/process/api.ts @@ -19,7 +19,8 @@ export const createProcessTransaction = async ( polkadot: Polkadot.Polkadot, processId: string, program: Process.Program, - options: Polkadot.Options + options: Polkadot.Options, + verbose?: boolean ): Promise => { const sudo = polkadot.keyring.addFromUri(options.USER_URI) @@ -40,7 +41,7 @@ export const createProcessTransaction = async ( id: data[0].toHuman(), version: data[1].toNumber(), status: 'Enabled', - program, + ...verbose ? program : {}, } unsub() diff --git a/src/lib/process/index.ts b/src/lib/process/index.ts index 54b8e8f..fb9f2c4 100644 --- a/src/lib/process/index.ts +++ b/src/lib/process/index.ts @@ -129,7 +129,7 @@ export const createProcess = async ( return { message: `Transaction for new process ${name} has been successfully submitted`, - process: await createProcessTransaction(polkadot, processId, program, options), + process: await createProcessTransaction(polkadot, processId, program, options, verbose), } } catch (err) { // err is basically from errors.ts or any exception