scripts: Fix wasmd/generate_addresses.js

This commit is contained in:
willclarktech 2021-04-20 16:01:50 +02:00
parent 47568bbe41
commit 69f996a1f1
No known key found for this signature in database
GPG Key ID: 551A86E2E398ADF7

View File

@ -35,18 +35,11 @@ const accountsToCreate = [
async function main() {
for (const { mnemonic, accountNumbers } of accountsToCreate) {
const wallets = await Promise.all(
accountNumbers.map((accountNumber) =>
Secp256k1HdWallet.fromMnemonic(mnemonic, {
hdPath: makeCosmoshubPath(accountNumber),
prefix: prefix,
}),
),
);
const accounts = (await Promise.all(wallets.map((wallet) => wallet.getAccounts()))).map(
(accountsForWallet) => accountsForWallet[0],
);
const wallet = await Secp256k1HdWallet.fromMnemonic(mnemonic, {
prefix: prefix,
hdPaths: accountNumbers.map(makeCosmoshubPath),
});
const accounts = await wallet.getAccounts();
console.info("=".repeat(process.stdout.columns));
console.info("mnemonic:", mnemonic);
for (const { address, pubkey } of accounts) {