Skip to content

Commit 0ff7d79

Browse files
refactor(wallet-registry): improve test structure and readability
- Updated import statements to include 'ethers' alongside 'helpers' for clarity. - Refactored test code for better readability by adjusting line breaks and formatting. - Ensured consistent handling of the 'stakingProvider' variable for improved code maintainability.
1 parent 25132a2 commit 0ff7d79

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

solidity/ecdsa/test/WalletRegistry.Rewards.test.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { helpers } from "hardhat"
1+
import { ethers, helpers } from "hardhat"
22
import { expect } from "chai"
33

44
import { walletRegistryFixture } from "./fixtures"
@@ -10,6 +10,7 @@ import type { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"
1010
import type { FakeContract } from "@defi-wonderland/smock"
1111
import type { Operator, OperatorID } from "./utils/operators"
1212
import type {
13+
Allowlist,
1314
SortitionPool,
1415
WalletRegistry,
1516
WalletRegistryGovernance,
@@ -282,17 +283,17 @@ describe("WalletRegistry - Rewards", () => {
282283

283284
it("should pay rewards to _currentAuthorizationSource().rolesOf beneficiary (Allowlist)", async () => {
284285
const operator = membersLocal[0].signer.address
285-
const stakingProvider = await walletRegistryLocal.operatorToStakingProvider(
286-
operator
287-
)
286+
const stakingProvider =
287+
await walletRegistryLocal.operatorToStakingProvider(operator)
288288
const allowlistAddr = await walletRegistryLocal.allowlist()
289289
const allowlist = (await ethers.getContractAt(
290290
"Allowlist",
291291
allowlistAddr
292292
)) as Allowlist
293293

294-
const { beneficiary: expectedBeneficiary } =
295-
await allowlist.rolesOf(stakingProvider)
294+
const { beneficiary: expectedBeneficiary } = await allowlist.rolesOf(
295+
stakingProvider
296+
)
296297
expect(expectedBeneficiary).to.equal(stakingProvider)
297298

298299
await tTokenLocal

0 commit comments

Comments
 (0)