feat: add help command

This commit is contained in:
Vlad Stan
2022-08-03 13:50:01 +03:00
parent 01c81c1a83
commit 5f7537f600
3 changed files with 22 additions and 4 deletions
@@ -840,6 +840,23 @@ new Vue({
})
}
},
hwwHelp: async function () {
try {
await this.serial.writer.write(COMMAND_HELP + '\n')
this.$q.notify({
type: 'positive',
message: 'Check display or console for details!',
timeout: 5000
})
} catch (error) {
this.$q.notify({
type: 'warning',
message: 'Failed to ask for help!',
caption: `${error}`,
timeout: 10000
})
}
},
//################### UTXOs ###################
scanAllAddresses: async function () {
await this.refreshAddresses()
@@ -3,6 +3,7 @@ const COMMAND_PASSWORD = '/password'
const COMMAND_PASSWORD_CLEAR = '/password-clear'
const COMMAND_SEND_PSBT = '/psbt'
const COMMAND_SIGN_PSBT = '/sign'
const COMMAND_HELP = '/help'
const blockTimeToDate = blockTime =>
blockTime ? moment(blockTime * 1000).format('LLL') : ''