Skip to content

Commit

Permalink
docs: improve hints about cli commands that don't submit offers
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris-Hibbert committed Dec 15, 2023
1 parent d61be8d commit 55741e7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
5 changes: 3 additions & 2 deletions packages/agoric-cli/src/commands/oracle.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
makeWalletUtils,
outputAction,
sendAction,
sendHint,
} from '../lib/wallet.js';
import { bigintReplacer } from '../lib/format.js';

Expand Down Expand Up @@ -128,7 +129,7 @@ export const makeOracleCommand = (logger, io = {}) => {
offer,
});

console.warn('Now execute the prepared offer');
console.warn(sendHint);
});

oracle
Expand Down Expand Up @@ -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) => {
Expand Down
4 changes: 0 additions & 4 deletions packages/agoric-cli/src/commands/psm.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,6 @@ export const makePsmCommand = logger => {
};

outputExecuteOfferAction(offer);

console.warn('Now execute the prepared offer');
});

psm
Expand Down Expand Up @@ -272,8 +270,6 @@ export const makePsmCommand = logger => {
};

outputExecuteOfferAction(offer);

console.warn('Now execute the prepared offer');
});

return psm;
Expand Down
6 changes: 3 additions & 3 deletions packages/agoric-cli/src/commands/vaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <number>', 'Collateral to give', Number)
.requiredOption('--wantMinted <number>', 'Minted wants', Number)
.option('--offerId <string>', 'Offer id', String, `openVault-${Date.now()}`)
Expand All @@ -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 <address>',
'wallet address literal or name',
Expand Down Expand Up @@ -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 <address>',
'wallet address literal or name',
Expand Down
3 changes: 2 additions & 1 deletion packages/agoric-cli/src/lib/wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

/**
Expand All @@ -101,6 +101,7 @@ export const outputExecuteOfferAction = (offer, stdout = process.stdout) => {
offer,
};
outputAction(spendAction, stdout);
stdout.write(sendHint);
};

/**
Expand Down

0 comments on commit 55741e7

Please sign in to comment.