parent
f166845d1b
commit
99847b3af5
@ -1,16 +1,7 @@ |
||||
import {Web3Button, Web3Modal} from '@web3modal/react' |
||||
import {WagmiConfig} from 'wagmi' |
||||
import {PROJECT_ID} from '../services/constant' |
||||
|
||||
export function WalletConnectUI({ethereumClient, wagmiConfig, theme}) { |
||||
export function WalletConnectUI() { |
||||
return ( |
||||
<div> |
||||
<div style={{display: 'inline-block'}}> |
||||
<WagmiConfig config={wagmiConfig}> |
||||
<Web3Button label="Connect to a wallet" /> |
||||
</WagmiConfig> |
||||
</div> |
||||
<Web3Modal projectId={PROJECT_ID} ethereumClient={ethereumClient} themeMode={theme} /> |
||||
<div style={{display: 'inline-block'}}> |
||||
<w3m-button /> |
||||
</div> |
||||
) |
||||
} |
||||
|
@ -1,2 +1,9 @@ |
||||
// @ts-ignore
|
||||
export const PROJECT_ID = WALLET_CONNECT_PROJECT_ID |
||||
export const PROJECT_ID = "bd4997ce3ede37c95770ba10a3804dad" |
||||
export const METADATA = { |
||||
name: 'Remix IDE', |
||||
description: 'The Native IDE for Web3 Development.', |
||||
url: 'https://remix.ethereum.org/', |
||||
icons: ['https://remix.ethereum.org/favicon.ico'], |
||||
verifyUrl: '' |
||||
} |
@ -0,0 +1,12 @@ |
||||
export interface RequestArguments { |
||||
readonly method: string |
||||
readonly params?: readonly unknown[] | object |
||||
readonly id?: string |
||||
} |
||||
|
||||
export interface EIP1193Provider { |
||||
request: <T>(args: RequestArguments) => Promise<T> |
||||
sendAsync: <T>(args: RequestArguments, callback:(error, response)=>void) => Promise<T> |
||||
on: (event: string, listener: (event: unknown) => void) => void |
||||
removeListener: (event: string, listener: (event: unknown) => void) => void |
||||
} |
Loading…
Reference in new issue