Skip to content

Commit bf7a04a

Browse files
committed
remove dependency of hooks on common
1 parent aa1d87f commit bf7a04a

File tree

7 files changed

+3
-26
lines changed

7 files changed

+3
-26
lines changed

packages/common/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export {
1515
truncateAtMiddle
1616
} from './utils/helpers.js'
1717

18-
export { createNativeTokenBalance, getNativeTokenInfoByChainId } from './utils/tokens.js'
18+
export { getNativeTokenInfoByChainId } from './utils/tokens.js'
1919
export { getNetwork, getNetworkBackgroundColor, getNetworkColor } from './utils/networks.js'
2020
export { getModalPositionCss } from './utils/styling.js'
2121
export { publicClientToProvider, walletClientToSigner } from './utils/adapters.js'

packages/common/src/utils/tokens.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,3 @@ export const getNativeTokenInfoByChainId = (chainId: number, wagmiChains: readon
3939
logoURI: ''
4040
}
4141
}
42-
43-
export const createNativeTokenBalance = (chainId: number, accountAddress: string, balance: string = '0'): TokenBalance => {
44-
return {
45-
chainId,
46-
contractAddress: zeroAddress,
47-
accountAddress,
48-
contractType: ContractType.UNKNOWN,
49-
balance,
50-
blockHash: '',
51-
blockNumber: 0,
52-
tokenID: '',
53-
isSummary: false,
54-
uniqueCollectibles: ''
55-
}
56-
}

packages/connect/src/styles.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -823,9 +823,6 @@ export const styles = String.raw`
823823
--tw-border-style: solid;
824824
border-style: solid;
825825
}
826-
.border-background-primary {
827-
border-color: var(--seq-color-background-primary);
828-
}
829826
.border-border-error {
830827
border-color: var(--seq-color-border-error);
831828
}

packages/hooks/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
},
3333
"peerDependencies": {
3434
"@0xsequence/api": ">=2.3.11",
35-
"@0xsequence/common": "workspace:*",
3635
"@0xsequence/indexer": ">=2.3.7",
3736
"@0xsequence/metadata": ">=2.3.7",
3837
"@0xsequence/network": ">=2.3.7",
@@ -43,7 +42,6 @@
4342
},
4443
"devDependencies": {
4544
"@0xsequence/api": "2.3.23",
46-
"@0xsequence/common": "workspace:*",
4745
"@0xsequence/indexer": "^2.3.23",
4846
"@0xsequence/metadata": "^2.3.23",
4947
"@0xsequence/network": "^2.3.23",

packages/hooks/src/hooks/IndexerGateway/useGetNativeTokenBalance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { createNativeTokenBalance } from '@0xsequence/common'
21
import { SequenceIndexerGateway, type IndexerGateway, type TokenBalance } from '@0xsequence/indexer'
32
import { useQuery } from '@tanstack/react-query'
43

54
import { QUERY_KEYS, time } from '../../constants.js'
5+
import { createNativeTokenBalance } from '../../utils/helpers.js'
66
import type { HooksOptions } from '../../types/hooks.js'
77

88
import { useIndexerGatewayClient } from './useIndexerGatewayClient.js'

packages/hooks/src/hooks/IndexerGateway/useGetSingleTokenBalance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { compareAddress, createNativeTokenBalance } from '@0xsequence/common'
21
import { ContractVerificationStatus, type SequenceIndexerGateway } from '@0xsequence/indexer'
32
import { useQuery } from '@tanstack/react-query'
43

54
import { QUERY_KEYS, time, ZERO_ADDRESS } from '../../constants.js'
65
import type { HooksOptions } from '../../types/hooks.js'
6+
import { compareAddress, createNativeTokenBalance } from '../../utils/helpers.js'
77

88
import { useIndexerGatewayClient } from './useIndexerGatewayClient.js'
99

pnpm-lock.yaml

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)