sdk38: Use nested destructuring syntax

This commit is contained in:
willclarktech 2020-07-09 13:35:58 +02:00
parent 6dcbf77d56
commit 0ab80be572
No known key found for this signature in database
GPG Key ID: 551A86E2E398ADF7
4 changed files with 6 additions and 6 deletions

View File

@ -34,7 +34,7 @@ describe("CosmosClient.searchTx", () => {
if (wasmdEnabled()) {
const wallet = await Secp256k1OfflineWallet.fromMnemonic(faucet.mnemonic);
const accounts = await wallet.getAccounts();
const { address: walletAddress } = accounts[0];
const [{ address: walletAddress }] = accounts;
const client = new SigningCosmosClient(wasmd.endpoint, faucet.address, wallet);
{

View File

@ -195,7 +195,7 @@ describe("CosmosClient", () => {
pendingWithoutWasmd();
const wallet = await Secp256k1OfflineWallet.fromMnemonic(faucet.mnemonic);
const accounts = await wallet.getAccounts();
const { address: walletAddress } = accounts[0];
const [{ address: walletAddress }] = accounts;
const client = new CosmosClient(wasmd.endpoint);
const memo = "My first contract on chain";

View File

@ -218,7 +218,7 @@ describe("LcdClient", () => {
if (wasmdEnabled()) {
const wallet = await Secp256k1OfflineWallet.fromMnemonic(faucet.mnemonic);
const accounts = await wallet.getAccounts();
const { address: walletAddress } = accounts[0];
const [{ address: walletAddress }] = accounts;
const client = new SigningCosmosClient(wasmd.endpoint, faucet.address, wallet);
{
@ -533,7 +533,7 @@ describe("LcdClient", () => {
pendingWithoutWasmd();
const wallet = await Secp256k1OfflineWallet.fromMnemonic(faucet.mnemonic);
const accounts = await wallet.getAccounts();
const { address: walletAddress } = accounts[0];
const [{ address: walletAddress }] = accounts;
const memo = "My first contract on chain";
const theMsg: MsgSend = {
@ -641,7 +641,7 @@ describe("LcdClient", () => {
pendingWithoutWasmd();
const wallet = await Secp256k1OfflineWallet.fromMnemonic(faucet.mnemonic, makeCosmoshubPath(0));
const accounts = await wallet.getAccounts();
const { address: walletAddress } = accounts[0];
const [{ address: walletAddress }] = accounts;
const memo = "My first contract on chain";
const msg1: MsgSend = {

View File

@ -37,7 +37,7 @@ describe("Secp256k1OfflineWallet", () => {
const wallet = await Secp256k1OfflineWallet.fromMnemonic(
"oyster design unusual machine spread century engine gravity focus cave carry slot",
);
const { address } = (await wallet.getAccounts())[0];
const [{ address }] = await wallet.getAccounts();
expect(address).toEqual("cosmos1cjsxept9rkggzxztslae9ndgpdyt2408lk850u");
});
});