sdk38: Use assert util in distribution module test

This commit is contained in:
willclarktech 2020-07-16 11:09:51 +02:00
parent 0eab1b020e
commit 7fd8355d33
No known key found for this signature in database
GPG Key ID: 551A86E2E398ADF7

View File

@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/naming-convention */
import { Bech32 } from "@cosmjs/encoding";
import { sleep } from "@cosmjs/utils";
import { assert, sleep } from "@cosmjs/utils";
import { coin, coins } from "../coins";
import { isPostTxFailure } from "../cosmosclient";
@ -55,9 +55,7 @@ describe("DistributionExtension", () => {
};
const receipt = await client.postTx(tx);
if (isPostTxFailure(receipt)) {
throw new Error("Delegation failed");
}
assert(!isPostTxFailure(receipt));
await sleep(75); // wait until transactions are indexed
}