Skip to content

Commit

Permalink
fix(lint): auto-fix [ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
mzywang committed May 21, 2024
1 parent 6af0ede commit c232e92
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
build-and-test:
needs: lint
name: build
name: build-and-test
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -86,7 +86,4 @@ jobs:
run: yarn build

- name: Build Docker
run: yarn docker:build

- name: Test
run: yarn test
run: yarn docker:build && yarn test
2 changes: 1 addition & 1 deletion src/utils/staticTokenDefinition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class StaticTokenDefinition {

export const getStaticDefinition = (
tokenAddress: Address,
staticDefinitions: Array<StaticTokenDefinition>
staticDefinitions: Array<StaticTokenDefinition>,
): StaticTokenDefinition | null => {
const tokenAddressHex = tokenAddress.toHexString()

Expand Down
6 changes: 3 additions & 3 deletions src/utils/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getStaticDefinition, STATIC_TOKEN_DEFINITIONS, StaticTokenDefinition }

export function fetchTokenSymbol(
tokenAddress: Address,
staticTokenDefinitions: StaticTokenDefinition[] = STATIC_TOKEN_DEFINITIONS
staticTokenDefinitions: StaticTokenDefinition[] = STATIC_TOKEN_DEFINITIONS,
): string {
const contract = ERC20.bind(tokenAddress)
const contractSymbolBytes = ERC20SymbolBytes.bind(tokenAddress)
Expand Down Expand Up @@ -39,7 +39,7 @@ export function fetchTokenSymbol(

export function fetchTokenName(
tokenAddress: Address,
staticTokenDefinitions: StaticTokenDefinition[] = STATIC_TOKEN_DEFINITIONS
staticTokenDefinitions: StaticTokenDefinition[] = STATIC_TOKEN_DEFINITIONS,
): string {
const contract = ERC20.bind(tokenAddress)
const contractNameBytes = ERC20NameBytes.bind(tokenAddress)
Expand Down Expand Up @@ -80,7 +80,7 @@ export function fetchTokenTotalSupply(tokenAddress: Address): BigInt {

export function fetchTokenDecimals(
tokenAddress: Address,
staticTokenDefinitions: StaticTokenDefinition[] = STATIC_TOKEN_DEFINITIONS
staticTokenDefinitions: StaticTokenDefinition[] = STATIC_TOKEN_DEFINITIONS,
): BigInt | null {
const contract = ERC20.bind(tokenAddress)
// try types uint8 for decimals
Expand Down
4 changes: 2 additions & 2 deletions tests/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const createTestPool = (
token1: TokenFixture,
poolAddressHexString: string,
feeTier: number,
tickSpacing: number
tickSpacing: number,
): void => {
const mockEvent = newMockEvent()
const token0Address = Address.fromString(token0.address)
Expand All @@ -64,7 +64,7 @@ export const createTestPool = (
mockEvent.block,
mockEvent.transaction,
parameters,
mockEvent.receipt
mockEvent.receipt,
)
// create mock contract calls for token0
createMockedFunction(token0Address, 'symbol', 'symbol():(string)').returns([ethereum.Value.fromString(token0.symbol)])
Expand Down
4 changes: 2 additions & 2 deletions tests/handlePoolCreated.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ describe('handlePoolCreated', () => {
WETH_MAINNET_FIXTURE,
USDC_WETH_03_MAINNET_POOL,
POOL_FEE_TIER_03,
POOL_TICK_SPACING_03
POOL_TICK_SPACING_03,
)

assertObjectMatches('Factory', FACTORY_ADDRESS, [
['poolCount', '1'],
['poolCount', '0'],
['totalVolumeETH', '0'],
['totalVolumeUSD', '0'],
['untrackedVolumeUSD', '0'],
Expand Down

0 comments on commit c232e92

Please sign in to comment.