From 6ace51decd75b3b6f68ae157140b9c9622fab475 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 6 Apr 2021 17:27:46 +0200 Subject: [PATCH] cli: Update for hd wallet change --- packages/cli/examples/faucet_addresses.ts | 2 +- packages/cli/src/cli.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cli/examples/faucet_addresses.ts b/packages/cli/examples/faucet_addresses.ts index acd235c976..af88efb045 100644 --- a/packages/cli/examples/faucet_addresses.ts +++ b/packages/cli/examples/faucet_addresses.ts @@ -5,7 +5,7 @@ const mnemonic = "economy stock theory fatal elder harbor betray wasp final emotion task crumble siren bottom lizard educate guess current outdoor pair theory focus wife stone"; for (let i of [0, 1, 2, 3, 4]) { - const wallet = await Secp256k1HdWallet.fromMnemonic(mnemonic, makeCosmoshubPath(i), "cosmos"); + const wallet = await Secp256k1HdWallet.fromMnemonic(mnemonic, { hdPath: makeCosmoshubPath(i) }); const [{ address, pubkey }] = await wallet.getAccounts(); console.info(`Address ${i}: ${address}`); console.info(`Pubkey ${i}: ${toBase64(pubkey)}`); diff --git a/packages/cli/src/cli.ts b/packages/cli/src/cli.ts index 4ba313f451..be5d5fe1d1 100644 --- a/packages/cli/src/cli.ts +++ b/packages/cli/src/cli.ts @@ -111,7 +111,7 @@ export async function main(originalArgs: readonly string[]): Promise { assert(accounts[0].address == "cosmos1kxt5x5q2l57ma2d434pqpafxdm0mgeg9c8cvtx"); const mnemonic = Bip39.encode(Random.getBytes(16)).toString(); - const wallet = await Secp256k1HdWallet.fromMnemonic(mnemonic, makeCosmoshubPath(0)); + const wallet = await Secp256k1HdWallet.fromMnemonic(mnemonic, { hdPath: makeCosmoshubPath(0) }); const [{ address }] = await wallet.getAccounts(); const data = toAscii("foo bar"); const fee: StdFee = {