launchpad: Update tests for new Secp256k1HdWallet options
This commit is contained in:
parent
308131f4a8
commit
27e8ff45a4
@ -548,13 +548,13 @@ describe("LcdClient", () => {
|
||||
it("can't send transaction with additional signatures", async () => {
|
||||
pendingWithoutLaunchpad();
|
||||
const account1 = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic, {
|
||||
hdPath: makeCosmoshubPath(0),
|
||||
hdPaths: [makeCosmoshubPath(0)],
|
||||
});
|
||||
const account2 = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic, {
|
||||
hdPath: makeCosmoshubPath(1),
|
||||
hdPaths: [makeCosmoshubPath(1)],
|
||||
});
|
||||
const account3 = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic, {
|
||||
hdPath: makeCosmoshubPath(2),
|
||||
hdPaths: [makeCosmoshubPath(2)],
|
||||
});
|
||||
const [address1, address2, address3] = await Promise.all(
|
||||
[account1, account2, account3].map(async (wallet) => {
|
||||
@ -611,7 +611,7 @@ describe("LcdClient", () => {
|
||||
|
||||
it("can send multiple messages with one signature", async () => {
|
||||
pendingWithoutLaunchpad();
|
||||
const wallet = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic, { hdPath: makeCosmoshubPath(0) });
|
||||
const wallet = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic);
|
||||
const accounts = await wallet.getAccounts();
|
||||
const [{ address: walletAddress }] = accounts;
|
||||
|
||||
@ -666,10 +666,10 @@ describe("LcdClient", () => {
|
||||
it("can send multiple messages with multiple signatures", async () => {
|
||||
pendingWithoutLaunchpad();
|
||||
const account1 = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic, {
|
||||
hdPath: makeCosmoshubPath(0),
|
||||
hdPaths: [makeCosmoshubPath(0)],
|
||||
});
|
||||
const account2 = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic, {
|
||||
hdPath: makeCosmoshubPath(1),
|
||||
hdPaths: [makeCosmoshubPath(1)],
|
||||
});
|
||||
const [address1, address2] = await Promise.all(
|
||||
[account1, account2].map(async (wallet) => {
|
||||
@ -741,10 +741,10 @@ describe("LcdClient", () => {
|
||||
it("can't send transaction with wrong signature order (1)", async () => {
|
||||
pendingWithoutLaunchpad();
|
||||
const account1 = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic, {
|
||||
hdPath: makeCosmoshubPath(0),
|
||||
hdPaths: [makeCosmoshubPath(0)],
|
||||
});
|
||||
const account2 = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic, {
|
||||
hdPath: makeCosmoshubPath(1),
|
||||
hdPaths: [makeCosmoshubPath(1)],
|
||||
});
|
||||
const [address1, address2] = await Promise.all(
|
||||
[account1, account2].map(async (wallet) => {
|
||||
@ -811,10 +811,10 @@ describe("LcdClient", () => {
|
||||
it("can't send transaction with wrong signature order (2)", async () => {
|
||||
pendingWithoutLaunchpad();
|
||||
const account1 = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic, {
|
||||
hdPath: makeCosmoshubPath(0),
|
||||
hdPaths: [makeCosmoshubPath(0)],
|
||||
});
|
||||
const account2 = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic, {
|
||||
hdPath: makeCosmoshubPath(1),
|
||||
hdPaths: [makeCosmoshubPath(1)],
|
||||
});
|
||||
const [address1, address2] = await Promise.all(
|
||||
[account1, account2].map(async (wallet) => {
|
||||
|
||||
@ -225,8 +225,12 @@ describe("SigningCosmosClient", () => {
|
||||
describe("appendSignature", () => {
|
||||
it("works", async () => {
|
||||
pendingWithoutLaunchpad();
|
||||
const wallet0 = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic, { hdPath: makeCosmoshubPath(0) });
|
||||
const wallet1 = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic, { hdPath: makeCosmoshubPath(1) });
|
||||
const wallet0 = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic, {
|
||||
hdPaths: [makeCosmoshubPath(0)],
|
||||
});
|
||||
const wallet1 = await Secp256k1HdWallet.fromMnemonic(faucet.mnemonic, {
|
||||
hdPaths: [makeCosmoshubPath(1)],
|
||||
});
|
||||
const client0 = new SigningCosmosClient(launchpad.endpoint, faucet.address0, wallet0);
|
||||
const client1 = new SigningCosmosClient(launchpad.endpoint, faucet.address1, wallet1);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user