-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui): update packages and improve UX/UI
- Loading branch information
1 parent
99c04f7
commit 8ab6f88
Showing
6 changed files
with
204 additions
and
32 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
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { injected,walletConnect } from '@wagmi/connectors'; | ||
import { createConfig,http, reconnect } from '@wagmi/core'; | ||
import { createWeb3Modal } from '@web3modal/wagmi'; | ||
|
||
import { EVMWalletChain,NetworkId } from '@/config'; | ||
|
||
// Config | ||
const near = { | ||
id: EVMWalletChain.chainId, | ||
name: EVMWalletChain.name, | ||
nativeCurrency: { | ||
decimals: 18, | ||
name: 'NEAR', | ||
symbol: 'NEAR', | ||
}, | ||
rpcUrls: { | ||
default: { http: [EVMWalletChain.rpc] }, | ||
public: { http: [EVMWalletChain.rpc] }, | ||
}, | ||
blockExplorers: { | ||
default: { | ||
name: 'NEAR Explorer', | ||
url: EVMWalletChain.explorer, | ||
}, | ||
}, | ||
testnet: NetworkId === 'testnet', | ||
}; | ||
|
||
// Get your projectId at https://cloud.reown.com | ||
const projectId = '5bb0fe33763b3bea40b8d69e4269b4ae'; | ||
|
||
export const wagmiConfig = createConfig({ | ||
chains: [near], | ||
transports: { [near.id]: http() }, | ||
connectors: [walletConnect({ projectId, showQrModal: false }), injected({ shimDisconnect: true })], | ||
}); | ||
|
||
// Preserve login state on page reload | ||
reconnect(wagmiConfig); | ||
|
||
// Modal for login | ||
export const web3Modal = createWeb3Modal({ wagmiConfig, projectId }); |