Skip to content

Commit

Permalink
refactor: remove defineChain export (#424)
Browse files Browse the repository at this point in the history
  • Loading branch information
fubhy committed Apr 29, 2023
1 parent ed623a4 commit 2eb73f6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changeset/gold-bikes-reply.md
@@ -0,0 +1,5 @@
---
"viem": patch
---

Removed the `defineChain` export from `viem/chains`.
9 changes: 2 additions & 7 deletions src/actions/wallet/sendTransaction.test.ts
Expand Up @@ -7,13 +7,7 @@ import {
testClient,
walletClient,
} from '../../_test/index.js'
import {
celo,
defineChain,
localhost,
mainnet,
optimism,
} from '../../chains.js'
import { celo, localhost, mainnet, optimism } from '../../chains.js'
import { hexToNumber, parseEther, parseGwei } from '../../utils/index.js'
import { getBalance, getBlock, getTransaction } from '../index.js'
import { mine, setBalance, setNextBlockBaseFeePerGas } from '../test/index.js'
Expand All @@ -22,6 +16,7 @@ import { sendTransaction } from './sendTransaction.js'
import { createWalletClient, http } from '../../clients/index.js'
import { anvilChain, walletClientWithAccount } from '../../_test/utils.js'
import { privateKeyToAccount } from '../../accounts/index.js'
import { defineChain } from '../../utils/chain.js'

const sourceAccount = accounts[0]
const targetAccount = accounts[1]
Expand Down
1 change: 0 additions & 1 deletion src/chains.test.ts
Expand Up @@ -5,7 +5,6 @@ import * as chains from './chains.js'
test('exports chains', () => {
expect(Object.keys(chains)).toMatchInlineSnapshot(`
[
"defineChain",
"arbitrum",
"arbitrumGoerli",
"aurora",
Expand Down
1 change: 0 additions & 1 deletion src/chains.ts
Expand Up @@ -10,7 +10,6 @@ import {
} from './utils/index.js'

export type { Chain } from './types/index.js'
export { defineChain } from './utils/index.js'

const celoFormatters = {
block: defineBlock({
Expand Down

1 comment on commit 2eb73f6

@vercel
Copy link

@vercel vercel bot commented on 2eb73f6 Apr 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.