-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(bridge-ui-v2): revert walletconnect upgrade (#15069)
- Loading branch information
1 parent
c22b1b9
commit e8f3e67
Showing
6 changed files
with
167 additions
and
313 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,57 @@ | ||
import { createWeb3Modal } from '@web3modal/wagmi'; | ||
import { EthereumClient } from '@web3modal/ethereum'; | ||
import { Web3Modal } from '@web3modal/html'; | ||
|
||
import { PUBLIC_WALLETCONNECT_PROJECT_ID } from '$env/static/public'; | ||
import { chains, getChainImages } from '$libs/chain'; | ||
import { wagmiConfig } from '$libs/wagmi'; | ||
|
||
const projectId = PUBLIC_WALLETCONNECT_PROJECT_ID; | ||
|
||
const ethereumClient = new EthereumClient(wagmiConfig, chains); | ||
|
||
const chainImages = getChainImages(); | ||
|
||
export const web3modal = createWeb3Modal({ | ||
wagmiConfig, | ||
projectId, | ||
chains, | ||
chainImages, | ||
themeVariables: { | ||
'--w3m-font-family': '"Public Sans", sans-serif', | ||
'--w3m-accent': 'var(--primary-brand)', | ||
|
||
// Body small regular | ||
// @ts-ignore | ||
'--w3m-text-small-regular-line-height': '20px', | ||
|
||
// Body regular | ||
// @ts-ignore | ||
'--w3m-text-medium-regular-size': '16px', | ||
'--w3m-text-medium-regular-weight': '400', | ||
'--w3m-text-medium-regular-line-height': '24px', | ||
'--w3m-text-medium-regular-letter-spacing': 'normal', | ||
|
||
// Title body bold | ||
// @ts-ignore | ||
'--w3m-text-big-bold-size': '18px', | ||
'--w3m-text-big-bold-weight': '700', | ||
'--w3m-text-big-bold-line-height': '24px', | ||
|
||
// @ts-ignore | ||
'--w3m-background-color': 'var(--primary-brand)', | ||
'--w3m-overlay-background-color': 'var(--overlay-background)', | ||
'--w3m-background-border-radius': '20px', | ||
'--w3m-container-border-radius': '0', | ||
|
||
// Unofficial variables | ||
// @ts-ignore | ||
'--w3m-color-fg-1': 'var(--primary-content)', | ||
'--w3m-color-bg-1': 'var(--primary-background)', | ||
'--w3m-color-bg-2': 'var(--neutral-background)', | ||
'--w3m-color-overlay': 'none', | ||
'--w3m-accent-fill-color': 'var(--dark-background)', | ||
export const web3modal = new Web3Modal( | ||
{ | ||
projectId, | ||
chainImages, | ||
// TODO: can we bring these vars into Tailwind theme? | ||
themeVariables: { | ||
'--w3m-font-family': '"Public Sans", sans-serif', | ||
'--w3m-font-feature-settings': 'normal', | ||
'--w3m-button-border-radius': '9999px', | ||
|
||
// Body small regular | ||
'--w3m-text-small-regular-size': '14px', | ||
'--w3m-text-small-regular-weight': '400', | ||
'--w3m-text-small-regular-line-height': '20px', | ||
|
||
// Body regular | ||
'--w3m-text-medium-regular-size': '16px', | ||
'--w3m-text-medium-regular-weight': '400', | ||
'--w3m-text-medium-regular-line-height': '24px', | ||
'--w3m-text-medium-regular-letter-spacing': 'normal', | ||
|
||
// Title body bold | ||
'--w3m-text-big-bold-size': '18px', | ||
'--w3m-text-big-bold-weight': '700', | ||
'--w3m-text-big-bold-line-height': '24px', | ||
|
||
'--w3m-background-color': 'var(--primary-brand)', | ||
'--w3m-overlay-background-color': 'var(--overlay-background)', | ||
'--w3m-background-border-radius': '20px', | ||
'--w3m-container-border-radius': '0', | ||
|
||
// Unofficial variables | ||
// @ts-ignore | ||
'--w3m-color-fg-1': 'var(--primary-content)', | ||
'--w3m-color-bg-1': 'var(--primary-background)', | ||
'--w3m-color-bg-2': 'var(--neutral-background)', | ||
'--w3m-color-overlay': 'none', | ||
'--w3m-accent-color': 'var(--neutral-background)', | ||
'--w3m-accent-fill-color': 'var(--dark-background)', | ||
}, | ||
themeMode: (localStorage.getItem('theme') as 'dark' | 'light') ?? 'dark', | ||
}, | ||
themeMode: (localStorage.getItem('theme') as 'dark' | 'light') ?? 'dark', | ||
}); | ||
ethereumClient, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
import { configureChains } from '@wagmi/core'; | ||
import { publicProvider } from '@wagmi/core/providers/public'; | ||
import { defaultWagmiConfig, walletConnectProvider } from '@web3modal/wagmi'; | ||
import { configureChains, createConfig } from '@wagmi/core'; | ||
import { w3mConnectors, w3mProvider } from '@web3modal/ethereum'; | ||
|
||
import { PUBLIC_WALLETCONNECT_PROJECT_ID } from '$env/static/public'; | ||
import { chains } from '$libs/chain'; | ||
|
||
const projectId = PUBLIC_WALLETCONNECT_PROJECT_ID; | ||
|
||
export const { publicClient } = configureChains(chains, [walletConnectProvider({ projectId }), publicProvider()]); | ||
export const { publicClient } = configureChains(chains, [w3mProvider({ projectId })]); | ||
|
||
export const wagmiConfig = defaultWagmiConfig({ chains, projectId }); | ||
export const wagmiConfig = createConfig({ | ||
autoConnect: true, | ||
connectors: w3mConnectors({ projectId, chains }), | ||
publicClient, | ||
}); |
Oops, something went wrong.
e8f3e67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
bridge-ui-v2-internal – ./packages/bridge-ui-v2
bridge-ui-v2-internal-git-main-taikoxyz.vercel.app
bridge-ui-v2-internal.vercel.app
bridge-ui-v2-internal-taikoxyz.vercel.app