Skip to content

Commit

Permalink
Merge pull request #314 from mstable/chore/update-op-network-asset
Browse files Browse the repository at this point in the history
chore: update op network asset
  • Loading branch information
dimlbc authored Feb 24, 2025
2 parents 8db3ed3 + 483a131 commit 59a20c5
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 21 deletions.
11 changes: 9 additions & 2 deletions apps/lts/src/clients/wagmi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,20 @@ import { configureChains, createClient } from 'wagmi';
import { mainnet, optimism, polygon } from 'wagmi/chains';
import { alchemyProvider } from 'wagmi/providers/alchemy';

import type { Wallet } from '@rainbow-me/rainbowkit';
import type { Chain as RainbowKitChain, Wallet } from '@rainbow-me/rainbowkit';
import type { Chain, Connector } from 'wagmi';

const optimismWithCustomIconUrl = {
...optimism,
// https://www.rainbowkit.com/docs/custom-chains
iconUrl:
'https://firebasestorage.googleapis.com/v0/b/toros-leverage-bots.appspot.com/o/images%2Ficons%2Fnetworks%2Foptimism-network.png?alt=media&token=dc1a451a-1c89-4df3-b86f-9a3712068e4c',
} as const satisfies RainbowKitChain;

const POLLING_INTERVAL = 15_000;

export const { chains, provider } = configureChains(
[mainnet, polygon, optimism],
[mainnet, polygon, optimismWithCustomIconUrl],
[
alchemyProvider({ apiKey: process.env['NX_ALCHEMY_MAIN_API_KEY'] }),
alchemyProvider({ apiKey: process.env['NX_ALCHEMY_FALLBACK_API_KEY'] }),
Expand Down
11 changes: 9 additions & 2 deletions apps/mstable/src/clients/wagmi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,20 @@ import { configureChains, createClient } from 'wagmi';
import { optimism } from 'wagmi/chains';
import { alchemyProvider } from 'wagmi/providers/alchemy';

import type { Wallet } from '@rainbow-me/rainbowkit';
import type { Chain as RainbowKitChain, Wallet } from '@rainbow-me/rainbowkit';
import type { Chain, Connector } from 'wagmi';

const optimismWithCustomIconUrl = {
...optimism,
// https://www.rainbowkit.com/docs/custom-chains
iconUrl:
'https://firebasestorage.googleapis.com/v0/b/toros-leverage-bots.appspot.com/o/images%2Ficons%2Fnetworks%2Foptimism-network.png?alt=media&token=dc1a451a-1c89-4df3-b86f-9a3712068e4c',
} as const satisfies RainbowKitChain;

const POLLING_INTERVAL = 15_000;

export const { chains, provider } = configureChains(
[optimism],
[optimismWithCustomIconUrl],
[
alchemyProvider({ apiKey: process.env['NX_ALCHEMY_MAIN_API_KEY'] }),
alchemyProvider({ apiKey: process.env['NX_ALCHEMY_FALLBACK_API_KEY'] }),
Expand Down
20 changes: 4 additions & 16 deletions libs/shared/icons/src/components/chains/Optimism.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion libs/shared/icons/src/components/chains/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const Nightfall = (props: SvgIconProps) => (
/>
);
export const Optimism = (props: SvgIconProps) => (
<SvgIcon {...props} component={OptimismSvg} viewBox="0 0 500 500" />
<SvgIcon {...props} component={OptimismSvg} viewBox="0 0 48 48" />
);
export const Polygon = (props: SvgIconProps) => (
<SvgIcon {...props} component={PolygonSvg} viewBox="0 0 100 100" />
Expand Down

0 comments on commit 59a20c5

Please sign in to comment.