Skip to content

Commit 77b7ac8

Browse files
committed
fix: prettier formatting for l1l3Bridger
1 parent 4fbd0ef commit 77b7ac8

1 file changed

Lines changed: 48 additions & 45 deletions

File tree

packages/sdk/tests/integration/l1l3Bridger.test.ts

Lines changed: 48 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -994,59 +994,62 @@ describe('L1 to L3 Bridging', () => {
994994
await testHappyPathNonFeeOrStandard(depositParams)
995995
})
996996

997-
itOnlyWhenCustomGasToken('happy path OnlyCustomFee', async function (context) {
998-
const decimals = await getNativeTokenDecimals({
999-
parentProvider: l1Signer.provider!,
1000-
childNetwork: l3Network,
1001-
})
997+
itOnlyWhenCustomGasToken(
998+
'happy path OnlyCustomFee',
999+
async function (context) {
1000+
const decimals = await getNativeTokenDecimals({
1001+
parentProvider: l1Signer.provider!,
1002+
childNetwork: l3Network,
1003+
})
10021004

1003-
if (decimals !== 18) {
1004-
context.skip()
1005-
}
1005+
if (decimals !== 18) {
1006+
context.skip()
1007+
}
10061008

1007-
const l3Recipient = ethers.utils.hexlify(ethers.utils.randomBytes(20))
1008-
const l1FeeToken = (await l1l3Bridger.getGasTokenOnL1(
1009-
l1Signer.provider!,
1010-
l2Signer.provider!
1011-
))!
1009+
const l3Recipient = ethers.utils.hexlify(ethers.utils.randomBytes(20))
1010+
const l1FeeToken = (await l1l3Bridger.getGasTokenOnL1(
1011+
l1Signer.provider!,
1012+
l2Signer.provider!
1013+
))!
10121014

1013-
const depositParams: Erc20L1L3DepositRequestParams = {
1014-
erc20L1Address: l1FeeToken,
1015-
destinationAddress: l3Recipient,
1016-
amount: ethers.utils.parseEther('0.1'),
1017-
l2Provider: l2Signer.provider!,
1018-
l3Provider,
1019-
}
1015+
const depositParams: Erc20L1L3DepositRequestParams = {
1016+
erc20L1Address: l1FeeToken,
1017+
destinationAddress: l3Recipient,
1018+
amount: ethers.utils.parseEther('0.1'),
1019+
l2Provider: l2Signer.provider!,
1020+
l3Provider,
1021+
}
10201022

1021-
const depositTxRequest = await l1l3Bridger.getDepositRequest({
1022-
...depositParams,
1023-
l1Signer,
1024-
})
1023+
const depositTxRequest = await l1l3Bridger.getDepositRequest({
1024+
...depositParams,
1025+
l1Signer,
1026+
})
10251027

1026-
await (
1027-
await l1l3Bridger.approveToken({ ...depositParams, l1Signer })
1028-
).wait()
1028+
await (
1029+
await l1l3Bridger.approveToken({ ...depositParams, l1Signer })
1030+
).wait()
10291031

1030-
const depositTx = await l1l3Bridger.deposit({
1031-
l1Signer,
1032-
txRequest: depositTxRequest.txRequest,
1033-
})
1032+
const depositTx = await l1l3Bridger.deposit({
1033+
l1Signer,
1034+
txRequest: depositTxRequest.txRequest,
1035+
})
10341036

1035-
const depositReceipt = await depositTx.wait()
1037+
const depositReceipt = await depositTx.wait()
10361038

1037-
// poll status
1038-
await poll(async () => {
1039-
const status = await l1l3Bridger.getDepositStatus({
1040-
txHash: depositReceipt.transactionHash,
1041-
l1Provider: l1Signer.provider!,
1042-
l2Provider: l2Signer.provider!,
1043-
l3Provider,
1044-
})
1045-
return status.completed
1046-
}, 1000)
1039+
// poll status
1040+
await poll(async () => {
1041+
const status = await l1l3Bridger.getDepositStatus({
1042+
txHash: depositReceipt.transactionHash,
1043+
l1Provider: l1Signer.provider!,
1044+
l2Provider: l2Signer.provider!,
1045+
l3Provider,
1046+
})
1047+
return status.completed
1048+
}, 1000)
10471049

1048-
// todo make this check better
1049-
expect((await l3Provider.getBalance(l3Recipient)).gt('0')).toBe(true)
1050-
})
1050+
// todo make this check better
1051+
expect((await l3Provider.getBalance(l3Recipient)).gt('0')).toBe(true)
1052+
}
1053+
)
10511054
})
10521055
})

0 commit comments

Comments
 (0)