Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
vl-dev committed Mar 1, 2024
1 parent 03a634f commit 102a0b6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/hooks/useFeePayer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Connection, PublicKey, Transaction, TransactionInstruction } from '@solana/web3.js';
import env from '../libs/env';
import { useEffect, useState } from 'preact/hooks';
import { sleep } from "../libs/utils";
import { sleep } from '../libs/utils';

export const useFeePayer = () => {
const [feePayerPubKey, setFeePayerPubKey] = useState<PublicKey | null>(null);
Expand Down Expand Up @@ -53,7 +53,7 @@ export const useFeePayer = () => {
requireAllSignatures: false,
})
.toString('hex')]),
})
});

if (!response.ok) {
throw Error('Unable to sign request on the backend');
Expand All @@ -65,7 +65,9 @@ export const useFeePayer = () => {

const sx = await connection.sendRawTransaction(Buffer.from(json[0], 'hex'));
for (let i = 0; i < 12; i += 1) {
if (!sx) throw new Error('No transaction signature.');
if (!sx) {
throw new Error('No transaction signature.');
}
// eslint-disable-next-line no-await-in-loop
const status = await connection.getSignatureStatus(sx, {
searchTransactionHistory: true,
Expand Down

0 comments on commit 102a0b6

Please sign in to comment.