From 55741e7e5b418187742023d813bc975bb2d10df2 Mon Sep 17 00:00:00 2001 From: Chris Hibbert Date: Thu, 14 Dec 2023 16:36:21 -0800 Subject: [PATCH] docs: improve hints about cli commands that don't submit offers --- packages/agoric-cli/src/commands/oracle.js | 5 +++-- packages/agoric-cli/src/commands/psm.js | 4 ---- packages/agoric-cli/src/commands/vaults.js | 6 +++--- packages/agoric-cli/src/lib/wallet.js | 3 ++- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/packages/agoric-cli/src/commands/oracle.js b/packages/agoric-cli/src/commands/oracle.js index 208be02e60c6..dcc4dcd88593 100644 --- a/packages/agoric-cli/src/commands/oracle.js +++ b/packages/agoric-cli/src/commands/oracle.js @@ -15,6 +15,7 @@ import { makeWalletUtils, outputAction, sendAction, + sendHint, } from '../lib/wallet.js'; import { bigintReplacer } from '../lib/format.js'; @@ -128,7 +129,7 @@ export const makeOracleCommand = (logger, io = {}) => { offer, }); - console.warn('Now execute the prepared offer'); + console.warn(sendHint); }); oracle @@ -163,7 +164,7 @@ export const makeOracleCommand = (logger, io = {}) => { offer, }); - console.warn('Now execute the prepared offer'); + console.warn(sendHint); }); const findOracleCap = async (instance, from, readLatestHead) => { diff --git a/packages/agoric-cli/src/commands/psm.js b/packages/agoric-cli/src/commands/psm.js index 61eaedffa465..1daaa99f5038 100644 --- a/packages/agoric-cli/src/commands/psm.js +++ b/packages/agoric-cli/src/commands/psm.js @@ -216,8 +216,6 @@ export const makePsmCommand = logger => { }; outputExecuteOfferAction(offer); - - console.warn('Now execute the prepared offer'); }); psm @@ -272,8 +270,6 @@ export const makePsmCommand = logger => { }; outputExecuteOfferAction(offer); - - console.warn('Now execute the prepared offer'); }); return psm; diff --git a/packages/agoric-cli/src/commands/vaults.js b/packages/agoric-cli/src/commands/vaults.js index 284f613f9cd2..b45c55ff9de9 100644 --- a/packages/agoric-cli/src/commands/vaults.js +++ b/packages/agoric-cli/src/commands/vaults.js @@ -54,7 +54,7 @@ export const makeVaultsCommand = logger => { vaults .command('open') - .description('open a new vault') + .description('Prepare an offer to open a new vault') .requiredOption('--giveCollateral ', 'Collateral to give', Number) .requiredOption('--wantMinted ', 'Minted wants', Number) .option('--offerId ', 'Offer id', String, `openVault-${Date.now()}`) @@ -76,7 +76,7 @@ export const makeVaultsCommand = logger => { vaults .command('adjust') - .description('adjust an existing vault') + .description('Prepare an offer to adjust an existing vault') .requiredOption( '--from
', 'wallet address literal or name', @@ -121,7 +121,7 @@ export const makeVaultsCommand = logger => { vaults .command('close') - .description('close an existing vault') + .description('Prepare an offer to close an existing vault') .requiredOption( '--from
', 'wallet address literal or name', diff --git a/packages/agoric-cli/src/lib/wallet.js b/packages/agoric-cli/src/lib/wallet.js index 2dcd0565cc1a..9d405fb21f5d 100644 --- a/packages/agoric-cli/src/lib/wallet.js +++ b/packages/agoric-cli/src/lib/wallet.js @@ -75,7 +75,7 @@ export const outputAction = (bridgeAction, stdout = process.stdout) => { stdout.write('\n'); }; -const sendHint = +export const sendHint = 'Now use `agoric wallet send ...` to sign and broadcast the offer.\n'; /** @@ -101,6 +101,7 @@ export const outputExecuteOfferAction = (offer, stdout = process.stdout) => { offer, }; outputAction(spendAction, stdout); + stdout.write(sendHint); }; /**