Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit fa2461c

Browse files
author
Alex Luu
committed
format
1 parent 8cc7544 commit fa2461c

1 file changed

Lines changed: 22 additions & 9 deletions

File tree

packages/web3-eth/test/integration/web3_eth/send_transaction.test.ts

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ describe('Web3Eth.sendTransaction', () => {
9090
expect(response.status).toBe(BigInt(1));
9191
expect(response.events).toBeUndefined();
9292

93-
const minedTransactionData = await web3EthWithWallet.getTransaction(response.transactionHash);
93+
const minedTransactionData = await web3EthWithWallet.getTransaction(
94+
response.transactionHash,
95+
);
9496

9597
expect(minedTransactionData).toMatchObject({
9698
from: tempAcc.address,
@@ -119,7 +121,9 @@ describe('Web3Eth.sendTransaction', () => {
119121
expect(response.status).toBe(BigInt(1));
120122
expect(response.events).toBeUndefined();
121123

122-
const minedTransactionData = await web3EthWithWallet.getTransaction(response.transactionHash);
124+
const minedTransactionData = await web3EthWithWallet.getTransaction(
125+
response.transactionHash,
126+
);
123127

124128
expect(minedTransactionData).toMatchObject({
125129
from: tempAcc.address,
@@ -152,7 +156,9 @@ describe('Web3Eth.sendTransaction', () => {
152156
expect(response.status).toBe(BigInt(1));
153157
expect(response.events).toBeUndefined();
154158

155-
const minedTransactionData = await web3EthWithWallet.getTransaction(response.transactionHash);
159+
const minedTransactionData = await web3EthWithWallet.getTransaction(
160+
response.transactionHash,
161+
);
156162

157163
expect(minedTransactionData).toMatchObject({
158164
from: tempAcc.address,
@@ -534,9 +540,12 @@ describe('Web3Eth.sendTransaction', () => {
534540
from: tempAcc.address,
535541
data: SimpleRevertDeploymentData,
536542
};
537-
simpleRevertDeployTransaction.gas = await web3Eth.estimateGas(simpleRevertDeployTransaction);
538-
simpleRevertContractAddress = (await web3Eth.sendTransaction(simpleRevertDeployTransaction))
539-
.contractAddress as Address;
543+
simpleRevertDeployTransaction.gas = await web3Eth.estimateGas(
544+
simpleRevertDeployTransaction,
545+
);
546+
simpleRevertContractAddress = (
547+
await web3Eth.sendTransaction(simpleRevertDeployTransaction)
548+
).contractAddress as Address;
540549
});
541550

542551
it('Should throw TransactionRevertInstructionError because gas too low', async () => {
@@ -578,7 +587,9 @@ describe('Web3Eth.sendTransaction', () => {
578587
const transaction: Transaction = {
579588
from: tempAcc.address,
580589
to: '0x0000000000000000000000000000000000000000',
581-
value: BigInt('99999999999999999999999999999999999999999999999999999999999999999'),
590+
value: BigInt(
591+
'99999999999999999999999999999999999999999999999999999999999999999',
592+
),
582593
};
583594

584595
const expectedThrownError = {
@@ -587,7 +598,9 @@ describe('Web3Eth.sendTransaction', () => {
587598
code: 402,
588599
reason:
589600
getSystemTestBackend() === BACKEND.GETH
590-
? expect.stringContaining('err: insufficient funds for gas * price + value: address')
601+
? expect.stringContaining(
602+
'err: insufficient funds for gas * price + value: address',
603+
)
591604
: 'VM Exception while processing transaction: insufficient balance',
592605
};
593606

@@ -720,4 +733,4 @@ describe('Web3Eth.sendTransaction', () => {
720733
).rejects.toMatchObject(expectedThrownError);
721734
});
722735
});
723-
});
736+
});

0 commit comments

Comments
 (0)