Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: esm fixes #84

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/chains/supportedChains.evm.int.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createPublicClient, http } from 'viem'
import { describe, expect, test } from 'vitest'
import { supportedEVMChains } from './supportedChains.evm'
import { supportedEVMChains } from './supportedChains.evm.js'

describe.concurrent('EVM chains RPC check', () => {
const rpcUrls = supportedEVMChains.flatMap((chain) =>
Expand Down Expand Up @@ -40,7 +40,7 @@
async ({ blockExplorerUrl }) => {
const response = await fetch(blockExplorerUrl)
expect(response.url).toBe(blockExplorerUrl)
expect(response.ok).toBe(true)

Check failure on line 43 in src/chains/supportedChains.evm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

src/chains/supportedChains.evm.int.spec.ts > EVM chains block explorer check > block explorer should be alive 'Avalanche' - 43114 - 'https://snowtrace.io/'

AssertionError: expected false to be true // Object.is equality - Expected + Received - true + false ❯ src/chains/supportedChains.evm.int.spec.ts:43:27

Check failure on line 43 in src/chains/supportedChains.evm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

src/chains/supportedChains.evm.int.spec.ts > EVM chains block explorer check > block explorer should be alive 'Avalanche' - 43114 - 'https://snowtrace.io/'

AssertionError: expected false to be true // Object.is equality - Expected + Received - true + false ❯ src/chains/supportedChains.evm.int.spec.ts:43:27

Check failure on line 43 in src/chains/supportedChains.evm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

src/chains/supportedChains.evm.int.spec.ts > EVM chains block explorer check > block explorer should be alive 'Avalanche' - 43114 - 'https://snowtrace.io/'

AssertionError: expected false to be true // Object.is equality - Expected + Received - true + false ❯ src/chains/supportedChains.evm.int.spec.ts:43:27

Check failure on line 43 in src/chains/supportedChains.evm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

src/chains/supportedChains.evm.int.spec.ts > EVM chains block explorer check > block explorer should be alive 'Avalanche' - 43114 - 'https://snowtrace.io/'

AssertionError: expected false to be true // Object.is equality - Expected + Received - true + false ❯ src/chains/supportedChains.evm.int.spec.ts:43:27

Check failure on line 43 in src/chains/supportedChains.evm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

src/chains/supportedChains.evm.int.spec.ts > EVM chains block explorer check > block explorer should be alive 'Boba' - 288 - 'https://bobascan.com/'

AssertionError: expected false to be true // Object.is equality - Expected + Received - true + false ❯ src/chains/supportedChains.evm.int.spec.ts:43:27

Check failure on line 43 in src/chains/supportedChains.evm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

src/chains/supportedChains.evm.int.spec.ts > EVM chains block explorer check > block explorer should be alive 'Boba' - 288 - 'https://bobascan.com/'

AssertionError: expected false to be true // Object.is equality - Expected + Received - true + false ❯ src/chains/supportedChains.evm.int.spec.ts:43:27

Check failure on line 43 in src/chains/supportedChains.evm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

src/chains/supportedChains.evm.int.spec.ts > EVM chains block explorer check > block explorer should be alive 'Boba' - 288 - 'https://bobascan.com/'

AssertionError: expected false to be true // Object.is equality - Expected + Received - true + false ❯ src/chains/supportedChains.evm.int.spec.ts:43:27

Check failure on line 43 in src/chains/supportedChains.evm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

src/chains/supportedChains.evm.int.spec.ts > EVM chains block explorer check > block explorer should be alive 'Boba' - 288 - 'https://bobascan.com/'

AssertionError: expected false to be true // Object.is equality - Expected + Received - true + false ❯ src/chains/supportedChains.evm.int.spec.ts:43:27

Check failure on line 43 in src/chains/supportedChains.evm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

src/chains/supportedChains.evm.int.spec.ts > EVM chains block explorer check > block explorer should be alive 'Mode' - 34443 - 'https://modescan.io/'

AssertionError: expected false to be true // Object.is equality - Expected + Received - true + false ❯ src/chains/supportedChains.evm.int.spec.ts:43:27

Check failure on line 43 in src/chains/supportedChains.evm.int.spec.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

src/chains/supportedChains.evm.int.spec.ts > EVM chains block explorer check > block explorer should be alive 'Mode' - 34443 - 'https://modescan.io/'

AssertionError: expected false to be true // Object.is equality - Expected + Received - true + false ❯ src/chains/supportedChains.evm.int.spec.ts:43:27
expect(response.status).toBe(200)
}
)
Expand Down
4 changes: 2 additions & 2 deletions src/chains/supportedChains.evm.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { EVMChain } from '@lifi/types'
import { ChainId, ChainKey, ChainType, CoinKey } from '@lifi/types'
import { multicallAddresses } from '../multicall'
import { prefixChainId } from './utils'
import { multicallAddresses } from '../multicall.js'
import { prefixChainId } from './utils.js'

/**
* ChainNames aligned with https://github.com/ethereum-lists/chains/tree/master/_data/chains
Expand Down
2 changes: 1 addition & 1 deletion src/chains/supportedChains.svm.int.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Connection, PublicKey } from '@solana/web3.js'
import { describe, expect, test } from 'vitest'
import { supportedSolanaChains } from './supportedChains.svm'
import { supportedSolanaChains } from './supportedChains.svm.js'

const TokenProgramAddress = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'
const WalletAddress = '6AUWsSCRFSCbrHKH9s84wfzJXtD6mNzAHs11x6pGEcmJ'
Expand Down
6 changes: 3 additions & 3 deletions src/chains/supportedChains.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Chain, ChainKey } from '@lifi/types'
import { supportedEVMChains } from './supportedChains.evm'
import { supportedSolanaChains } from './supportedChains.svm'
import { supportedUXTOChains } from './supportedChains.utxo'
import { supportedEVMChains } from './supportedChains.evm.js'
import { supportedSolanaChains } from './supportedChains.svm.js'
import { supportedUXTOChains } from './supportedChains.utxo.js'

// This assignment is required to avoid breaking
// changes with the new non EVM support types release
Expand Down
12 changes: 8 additions & 4 deletions src/chains/supportedChains.unit.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ import {
findDefaultToken,
findTokenByChainIdAndAddress,
findWrappedGasOnChain,
} from '../coins'
import { getChainById, getChainByKey, supportedChains } from './supportedChains'
import { supportedEVMChains } from './supportedChains.evm'
import { prefixChainId } from './utils'
} from '../coins/index.js'
import {
getChainById,
getChainByKey,
supportedChains,
} from './supportedChains.js'
import { supportedEVMChains } from './supportedChains.evm.js'
import { prefixChainId } from './utils.js'

test('getChainById', () => {
expect(getChainById(ChainId.ETH)).toBeDefined()
Expand Down
2 changes: 1 addition & 1 deletion src/chains/supportedChains.utxo.int.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, test } from 'vitest'
import { supportedUXTOChains } from './supportedChains.utxo'
import { supportedUXTOChains } from './supportedChains.utxo.js'

describe.concurrent('UTXO chains RPC check', () => {
const rpcUrls = supportedUXTOChains.flatMap((chain) =>
Expand Down
2 changes: 1 addition & 1 deletion src/coins/coins.int.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { StaticToken } from '@lifi/types'
import { describe, expect, test } from 'vitest'
import { defaultCoins, wrappedTokens } from './coins'
import { defaultCoins, wrappedTokens } from './coins.js'

describe.concurrent('Coin logo test', { timeout: 30_000 }, () => {
const allImages: string[] = []
Expand Down
Loading