Skip to content

Commit

Permalink
update: add linea chain
Browse files Browse the repository at this point in the history
  • Loading branch information
westonnelson committed Dec 31, 2023
1 parent 19a2377 commit b892e1e
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 29 deletions.
2 changes: 1 addition & 1 deletion components/ConnectWalletButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const ConnectWalletButton: FC<Props> = () => {
onClick={openConnectModal}
type="button"
>
Connect Wallet
Login
</Button>
)
}
Expand Down
4 changes: 2 additions & 2 deletions components/navbar/HamburgerMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ const HamburgerMenu = () => {
Bridge NFTE
</Text>
</Link>
<Link href="https://app.uniswap.org/swap?outputCurrency=0x51B902f19a56F0c8E409a34a215AD2673EDF3284&chain=arbitrum" legacyBehavior>
<Link href="https://app.uniswap.org/#/swap?outputCurrency=0xc2106ca72996e49bBADcB836eeC52B765977fd20&chain=base" legacyBehavior>
<Text
style="subtitle1"
css={{
Expand All @@ -200,7 +200,7 @@ const HamburgerMenu = () => {
pt: '24px',
}}
>
Get NFTE
Swap NFTE
</Text>
</Link>

Expand Down
26 changes: 12 additions & 14 deletions components/navbar/Wallet.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {FC, useMemo, useState} from 'react'
import { useAccount, useContractReads, erc20ABI, useBalance } from 'wagmi'
import { zeroAddress, formatUnits } from 'viem'
import { mainnet, polygon, optimism, arbitrum, bsc } from 'wagmi/chains'
import { mainnet, polygon, optimism, arbitrum } from 'wagmi/chains'
import { useCoinConversion } from '@reservoir0x/reservoir-kit-ui'
import CryptoCurrencyIcon from 'components/primitives/CryptoCurrencyIcon'
import {
Expand All @@ -13,6 +13,7 @@ import {
} from 'components/primitives'
import {useProfile} from "hooks";
import {formatNumber} from "utils/numbers";
import { base } from 'utils/chains'

//CONFIGURABLE: Here you may configure currencies that you want to display in the wallet menu. Native currencies,
//like ETH/MATIC etc need to be fetched in a different way. Configure them below
Expand Down Expand Up @@ -47,7 +48,7 @@ const currencies = [
},
coinGeckoId: 'matic-network',
},
/*{
{
address: zeroAddress,
symbol: 'ETH',
decimals: base.nativeCurrency.decimals,
Expand Down Expand Up @@ -107,7 +108,7 @@ const currencies = [
},
coinGeckoId: 'nftearth',
},*/
{
/*{
address: '0x912CE59144191C1204E64559FE8253a0e49E6548',
symbol: 'ARB',
decimals: arbitrum.nativeCurrency.decimals,
Expand All @@ -116,7 +117,7 @@ const currencies = [
name: arbitrum.name,
},
coinGeckoId: 'arbitrum',
},
},*/
{
address: '0x4200000000000000000000000000000000000042',
symbol: 'OP',
Expand Down Expand Up @@ -180,12 +181,11 @@ const Wallet : FC<WalletProps> = ({ exp }) => {
const optimismBalance = useBalance({
address,
chainId: optimism.id,
})

/*const baseBalance = useBalance({
})
const baseBalance = useBalance({
address,
chainId: base.id,
})*/
chainId: base.id,
})

const usdConversions = useCoinConversion(
'USD',
Expand Down Expand Up @@ -220,13 +220,11 @@ const Wallet : FC<WalletProps> = ({ exp }) => {
case optimism.id: {
balance = optimismBalance.data?.value || 0n
break


}
/*case base.id: {
case base.id: {
balance = baseBalance.data?.value || 0n
break
}*/
}
}
} else {
const index = nonNativeCurrencies.findIndex(
Expand Down Expand Up @@ -310,7 +308,7 @@ const Wallet : FC<WalletProps> = ({ exp }) => {
window.open('https://app.uniswap.org/', '_blank')
}}
>
Add Funds
Swap Crypto
</Button>
{visibleCurrencies.map((currency, i) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion components/navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ const Navbar = () => {
</DropdownMenuItem>
<DropdownMenuItem
as={Link}
href="https://app.uniswap.org/swap?outputCurrency=0x51B902f19a56F0c8E409a34a215AD2673EDF3284&chain=arbitrum"
href="https://app.uniswap.org/#/swap?outputCurrency=0xc2106ca72996e49bBADcB836eeC52B765977fd20&chain=base"
css={{
display: 'flex',
py: '$3',
Expand Down
4 changes: 2 additions & 2 deletions stitches.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const { createTheme, keyframes, styled, globalCss, getCssText } =

//Secondary
secondary1: '#0e190c',
secondary2: '#20FF04',
secondary2: '#0420ff',
secondary3: '#2b4c25',
secondary4: '#396631',
secondary5: '#47803d',
Expand All @@ -80,7 +80,7 @@ export const { createTheme, keyframes, styled, globalCss, getCssText } =
gray11: '$slate11',
gray12: '$slate12',

accent: '#79ffa8',
accent: '#0420ff',

neutralBgSubtle: '$gray3',
neutralBg: '$gray1',
Expand Down
18 changes: 9 additions & 9 deletions utils/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ export const OFT_CHAINS : OFTChain[] = [
darkIconUrl: '/icons/base-icon-light.svg',
coingeckoNetworkId: 'base'
},
/* {
{
id: linea.id,
lzId: 183,
name: linea.name,
Expand All @@ -310,15 +310,15 @@ export const OFT_CHAINS : OFTChain[] = [
darkIconUrl: '/icons/linea-icon-light.svg',
coingeckoNetworkId: 'linea'
},
{
/*{
id: polygonZkEvm.id,
lzId: 158,
name: polygonZkEvm.name,
address: '0xf1B8982eC774AE84e936Bd63f372280bd534E797',
lightIconUrl: '/icons/polygon-zkevm-icon-dark.svg',
darkIconUrl: '/icons/polygon-zkevm-icon-light.svg',
coingeckoNetworkId: 'zkevm'
}*/
}
// {
// id: 5000,
Expand All @@ -327,7 +327,7 @@ export const OFT_CHAINS : OFTChain[] = [
// address: '0x3E173b825ADEeF9661920B91A8d50B075Ad51bA5',
// lightIconUrl: '/icons/mantle-icon-dark.svg',
// darkIconUrl: '/icons/mantle-icon-light.svg'
// }
// }*/
]

export const FORTUNE_CHAINS = [
Expand Down Expand Up @@ -370,8 +370,8 @@ export default [
DefaultChain,
{
...arbitrum,
lightIconUrl: '/icons/arbitrum-icon-light.svg',
darkIconUrl: '/icons/arbitrum-icon-dark.svg',
lightIconUrl: '/icons/arbitrum-icon-dark.svg',
darkIconUrl: '/icons/arbitrum-icon-light.svg',
reservoirBaseUrl: 'https://api-arbitrum.reservoir.tools',
proxyApi: '/api/reservoir/arbitrum',
routePrefix: 'arbitrum',
Expand Down Expand Up @@ -464,8 +464,8 @@ export default [
coingeckoId: 'base',
collectionSetId: process.env.NEXT_PUBLIC_BASE_COLLECTION_SET_ID,
community: process.env.NEXT_PUBLIC_BASE_COMMUNITY,
}
/*{
},
{
...linea,
lightIconUrl: '/icons/linea-icon-dark.svg',
darkIconUrl: '/icons/linea-icon-light.svg',
Expand All @@ -477,7 +477,7 @@ export default [
collectionSetId: process.env.NEXT_PUBLIC_LINEA_COLLECTION_SET_ID,
community: process.env.NEXT_PUBLIC_LINEA_COMMUNITY,
},
{
/*{
...polygonZkEvm,
lightIconUrl: '/icons/polygon-zkevm-icon-dark.svg',
darkIconUrl: '/icons/polygon-zkevm-icon-light.svg',
Expand Down

0 comments on commit b892e1e

Please sign in to comment.