diff --git a/dev-cli/src/commands/bundler.js b/dev-cli/src/commands/bundler.js index 4dd071a0d..0004434b9 100644 --- a/dev-cli/src/commands/bundler.js +++ b/dev-cli/src/commands/bundler.js @@ -1,7 +1,7 @@ /* global Deno */ import { Command } from '../deps.js' -import { hostArgs, walletArgs } from '../utils.js' +import { bundlerArgs, walletArgs } from '../utils.js' import { VERSION } from '../versions.js' function amountArgs (amount) { @@ -14,7 +14,7 @@ function amountArgs (amount) { export async function balance ({ wallet, host }) { const cmdArgs = [ ...walletArgs(wallet), - ...hostArgs(host) + ...bundlerArgs(host) ] const p = Deno.run({ @@ -32,10 +32,10 @@ export async function balance ({ wallet, host }) { await p.status() } -export async function fund ({ wallet, host }, amount) { +export async function fund ({ wallet, bundler }, amount) { const cmdArgs = [ ...walletArgs(wallet), - ...hostArgs(host), + ...bundlerArgs(bundler), ...amountArgs(amount) ] diff --git a/dev-cli/src/commands/publish.js b/dev-cli/src/commands/publish.js index 0e9cdeb35..740091efe 100644 --- a/dev-cli/src/commands/publish.js +++ b/dev-cli/src/commands/publish.js @@ -1,7 +1,7 @@ /* global Deno */ import { Command, basename, resolve } from '../deps.js' -import { hostArgs, tagsArg } from '../utils.js' +import { bundlerArgs, tagsArg } from '../utils.js' import { VERSION } from '../versions.js' function walletArgs (wallet) { @@ -49,10 +49,10 @@ function contractSourceArgs (contractWasmPath) { * - allow using environment variables to set things like path to wallet * - require confirmation and bypass with --yes */ -export async function publish ({ wallet, host, tag, value }, contractWasmPath) { +export async function publish ({ wallet, bundler, tag, value }, contractWasmPath) { const cmdArgs = [ ...walletArgs(wallet), - ...hostArgs(host), + ...bundlerArgs(bundler), ...contractSourceArgs(contractWasmPath), ...tagsArg({ tags: tag, values: value }) ] diff --git a/dev-cli/src/utils.js b/dev-cli/src/utils.js index a711b6373..0a4e47900 100644 --- a/dev-cli/src/utils.js +++ b/dev-cli/src/utils.js @@ -33,11 +33,11 @@ export function tagsArg ({ tags, values }) { return ['-e', `TAGS=${JSON.stringify([tags, values])}`] } -export function hostArgs (host) { - return host +export function bundlerArgs (bundler) { + return bundler ? [ '-e', - `BUNDLER_HOST=${host}` + `BUNDLER_HOST=${bundler}` ] : [] }