Skip to content

Commit

Permalink
refactor(agoric-cli): Thread solo home directory more generally
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal committed Sep 8, 2022
1 parent 6a9f533 commit 9ce8ab3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 3 additions & 3 deletions packages/agoric-cli/src/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export const makeHttpBundlePublisher = ({ jsonHttpCall, getAccessToken }) => {
};

/**
* @param {string} address - a host or URL
* @param {string} address - a domain name, IPv4 address, or URL
*/
const urlForRpcAddress = address => {
if (address.includes('://')) {
Expand All @@ -192,7 +192,7 @@ const urlForRpcAddress = address => {
* @param {typeof import('path').resolve} args.pathResolve
* @param {typeof import('fs').promises.writeFile} args.writeFile
* @param {typeof import('tmp').dirSync} args.tmpDirSync
* @param {() => number} args.random
* @param {() => number} args.random - a random number in the interval [0, 1)
*/
export const makeCosmosBundlePublisher = ({
pspawn,
Expand Down Expand Up @@ -227,7 +227,7 @@ export const makeCosmosBundlePublisher = ({
'--gas-adjustment',
'1.2',
'--home',
homeDirectory,
pathResolve(homeDirectory, 'ag-cosmos-helper-statedir'),
'--node',
urlForRpcAddress(rpcAddress),
'--keyring-backend',
Expand Down
5 changes: 1 addition & 4 deletions packages/solo/src/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,10 +427,7 @@ const start = async (basedir, argv) => {
Array.isArray(rawConnections),
`Invalid connections.json: must be a JSON array, at ${rawConnectionsPath}`,
);
const homeDirectory = path.resolve(
process.cwd(),
'ag-cosmos-helper-statedir',
);
const homeDirectory = process.cwd();
const connections = rawConnections.map(connection => {
if (['chain-cosmos-sdk', 'fake-chain'].includes(connection.type)) {
return { ...connection, homeDirectory };
Expand Down

0 comments on commit 9ce8ab3

Please sign in to comment.