Skip to content

Commit

Permalink
feat: wallet reveal, autosave and ui fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
SlayerAnsh committed Sep 7, 2024
1 parent c4b735a commit d5e2573
Show file tree
Hide file tree
Showing 6 changed files with 448 additions and 369 deletions.
3 changes: 2 additions & 1 deletion packages/cli/src/cliBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import minimist from "minimist";
import {
ask,
baseCommands,
displaySpinnerAsync,
handle,
loadDefaultEnv,
migrateLegacyEnv,
Expand Down Expand Up @@ -34,7 +35,7 @@ inquirer.registerPrompt("command", inquirerCommandPrompt);
async function onStartup() {
try {
migrateLegacyEnv();
await loadDefaultEnv();
await displaySpinnerAsync("Loading env..", loadDefaultEnv);
} catch (error) {
console.error(error);
}
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/src/cmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export async function listCommands(commands: Commands, prefix?: string) {
const commandsArray = Object.keys(commands);
const commandTable = new Table({
...logTableConfig,
colWidths: [2],
// colWidths: [2],
});
//Commands are sorted alphabetically with `exit` being the last
const sortedCommands = commandsArray.sort((a, b) =>
Expand All @@ -249,15 +249,15 @@ export async function listCommands(commands: Commands, prefix?: string) {
try {
const disabled = cmd.disabled && (await cmd.disabled());
if (!disabled)
commandTable.push(["", cmd.color(cmdName), cmd.description ?? ""]);
commandTable.push(["", cmd.color(cmdName), pc.gray(cmd.description ?? "")]);
} catch (error) {
errors.push(error);
}
}

if (prefix) {
log(`Usage:`);
log(pc.green(`${prefix ? `${prefix} ` : ""}[cmd]`));
log(pc.green(`${prefix ? `${prefix} ` : ""}<cmd>`));
log();
}
log(`Valid commands:`);
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/handlers/bank.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const commands: Commands = {
return true;
return validateAddressInput(input);
},
default: async () => await State.wallets.currentWalletAddress() || ''
default: async () => await State.wallets.currentWalletAddressWithoutPassphrase() || ''
},
],
},
Expand Down
Loading

0 comments on commit d5e2573

Please sign in to comment.