diff options
author | Florian Dold <florian@dold.me> | 2021-06-14 11:21:29 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-06-14 11:21:29 +0200 |
commit | 6e11b69cf5beb25fec1dfdff281877a76bf195a4 (patch) | |
tree | 6c4f36c915ab99b9cc17cb141ea72967fe8a576a /packages/taler-wallet-cli/src/index.ts | |
parent | 9acd4a40602b16e230210dd508a2a8d6e86e6020 (diff) | |
download | wallet-core-6e11b69cf5beb25fec1dfdff281877a76bf195a4.tar.xz |
allow changing the wallet device ID
Diffstat (limited to 'packages/taler-wallet-cli/src/index.ts')
-rw-r--r-- | packages/taler-wallet-cli/src/index.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts index 0f4199d57..a6a3ec666 100644 --- a/packages/taler-wallet-cli/src/index.ts +++ b/packages/taler-wallet-cli/src/index.ts @@ -428,6 +428,18 @@ const backupCli = walletCli.subcommand("backupArgs", "backup", { help: "Subcommands for backups", }); +backupCli + .subcommand("setDeviceId", "set-device-id") + .requiredArgument("deviceId", clk.STRING, { + help: "new device ID", + }) + .action(async (args) => { + await withWallet(args, async (wallet) => { + const backup = await wallet.setDeviceId(args.setDeviceId.deviceId); + console.log(JSON.stringify(backup, undefined, 2)); + }); + }); + backupCli.subcommand("exportPlain", "export-plain").action(async (args) => { await withWallet(args, async (wallet) => { const backup = await wallet.exportBackupPlain(); |