Skip to content

Commit

Permalink
Fix typescript errors 4.1.*
Browse files Browse the repository at this point in the history
  • Loading branch information
jordy25519 committed Nov 29, 2020
1 parent 0f18455 commit 3532996
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/api/src/derives/cennzx/cennzxTrade.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('Cennzx Operations', () => {
// when the new asset is created it will have this ID.
assetA = await api.query.genericAsset.nextAssetId();
// Create new asset
const assetCreated = new Promise(async resolve => {
const assetCreated = new Promise<void>(async resolve => {
await api.tx.sudo
.sudo(createAssetTx1)
.signAndSend(sudoKeypair, { nonce: nonce++ }, async ({ status }) => (status.isInBlock ? resolve() : null));
Expand Down Expand Up @@ -105,7 +105,7 @@ describe('Cennzx Operations', () => {
// when the new asset is created it will have this ID.
assetB = await api.query.genericAsset.nextAssetId();
// Create new asset
const assetCreated = new Promise(async (resolve, reject) => {
const assetCreated = new Promise<void>(async (resolve, reject) => {
await api.tx.sudo
.sudo(createAssetTx2)
.signAndSend(sudoKeypair, { nonce: nonce++ }, async ({ status }) => (status.isInBlock ? resolve() : null));
Expand Down
2 changes: 1 addition & 1 deletion packages/api/test/e2e/staking.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ describe('Staking Governance (Sudo Required)', () => {

test('Force unstake', async done => {
const bobStash = keyring.addFromUri('//Bob//stash');
new Promise(async (resolve) => {
new Promise<void>(async (resolve) => {
// bond bob's stash account.
await api.tx.staking.bond(bob.address, 10_000, 'controller')
.signAndSend( bobStash, async ({ status }) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/api/test/e2e/tx.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ describe('e2e transactions', () => {

// 1) Create the new fee asset
// 2) Mint CPAY to assetOwner to fund subsequent pool liquidity and further transactions.
const assetCreated = new Promise(async (resolve, reject) => {
const assetCreated = new Promise<void>(async (resolve, reject) => {
let nonce = await api.rpc.system.accountNextIndex(sudoAddress);
await api.tx.sudo.sudo(createAssetTx).signAndSend(sudoKeypair, { nonce: nonce++ });
await api.tx.genericAsset.mint(spendingAssetId, assetOwner.address, initialIssuance).signAndSend(
Expand Down

0 comments on commit 3532996

Please sign in to comment.