Skip to content

Commit 9e31344

Browse files
committed
fix no-floating-promises lint
1 parent d7ea33b commit 9e31344

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

.eslintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"@typescript-eslint/explicit-function-return-type": "off",
2626
"@typescript-eslint/no-use-before-define": "warn",
2727
"@typescript-eslint/ban-ts-comment": "off",
28+
"@typescript-eslint/no-floating-promises": "error",
2829
"@typescript-eslint/no-unused-vars": [
2930
"error",
3031
{

packages/xchain-aggregator/__tests__/chainflipProtocol.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ describe('Chainflip protocol', () => {
7878
})
7979

8080
it('Should not get swap history', async () => {
81-
expect(async () => {
81+
await expect(async () => {
8282
await protocol.getSwapHistory()
8383
}).rejects.toThrow(/Method not implemented./)
8484
})

packages/xchain-bitcoin/__tests__/client-old.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ describe('BitcoinClient Test', () => {
219219
btcClient.setPhrase(phraseOne)
220220

221221
const amount = baseAmount(2223)
222-
expect(
222+
await expect(
223223
btcClient.transfer({
224224
asset: AssetBTC,
225225
recipient: addyThreePath0,

packages/xchain-wallet/__e2e__/wallet.e2e.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ describe('Wallet', () => {
118118
})
119119

120120
it('Should not get chain balance of unknown client', async () => {
121-
expect(async () => {
121+
await expect(async () => {
122122
await wallet.getBalance('BTC')
123123
}).rejects.toThrow(/Client not found for BTC chain/)
124124
})
@@ -156,7 +156,7 @@ describe('Wallet', () => {
156156
})
157157

158158
it('Should not get transaction data of unknown client', async () => {
159-
expect(async () => {
159+
await expect(async () => {
160160
await wallet.getTransactionData('BTC', '0eb1fd7d2ab247b2c3f6d79e9b48a71496a117c9bbaa5732636a2d46e72586e7')
161161
}).rejects.toThrow(/Client not found for BTC chain/)
162162
})
@@ -257,7 +257,7 @@ describe('Wallet', () => {
257257
})
258258

259259
it('Should not get chain history of unknown client', async () => {
260-
expect(async () => {
260+
await expect(async () => {
261261
await wallet.getTransactionsHistory('BTC')
262262
}).rejects.toThrow(/Client not found for BTC chain/)
263263
})

packages/xchain-wallet/__tests__/wallet.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ describe('Wallet', () => {
103103
})
104104

105105
it('Should not get explorer url from unknown client', () => {
106-
expect(async () => {
106+
await expect(async () => {
107107
await wallet.getExplorerUrl('THOR')
108108
}).rejects.toThrow(/Client not found for THOR chain/)
109109
})
@@ -113,7 +113,7 @@ describe('Wallet', () => {
113113
})
114114

115115
it('Should not get address url from unknown client', () => {
116-
expect(async () => {
116+
await expect(async () => {
117117
await wallet.getExplorerAddressUrl('THOR', 'thor1dj5wnd3q9c48g9cuylldfxrpvfjgqk7nsjzlcl')
118118
}).rejects.toThrow(/Client not found for THOR chain/)
119119
})
@@ -125,7 +125,7 @@ describe('Wallet', () => {
125125
})
126126

127127
it('Should not get tx url from unknown client', () => {
128-
expect(async () => {
128+
await expect(async () => {
129129
await wallet.getExplorerTxUrl('THOR', 'A4A8EB504016E930C10C8E5A5AC2980F89FBE10CF2861D99524574B32E009EA3')
130130
}).rejects.toThrow(/Client not found for THOR chain/)
131131
})

0 commit comments

Comments
 (0)