-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'V4' into fix/dayjs-seconds
- Loading branch information
Showing
71 changed files
with
2,402 additions
and
295 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import * as React from 'react' | ||
import { useWeb3ModalAccount } from '@web3modal/ethers/react' | ||
|
||
import { Web3ModalInfo } from '../Web3ModalInfo' | ||
|
||
export function EthersModalInfo() { | ||
const { isConnected, address, chainId } = useWeb3ModalAccount() | ||
const [ready, setReady] = React.useState(false) | ||
|
||
React.useEffect(() => { | ||
setReady(true) | ||
}, []) | ||
|
||
return ready && isConnected ? <Web3ModalInfo address={address} chainId={chainId} /> : null | ||
} |
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,10 @@ | ||
import * as React from 'react' | ||
|
||
import { useAccount } from 'wagmi' | ||
import { Web3ModalInfo } from '../Web3ModalInfo' | ||
|
||
export function WagmiModalInfo() { | ||
const { isConnected, address, chainId } = useAccount() | ||
|
||
return isConnected ? <Web3ModalInfo address={address} chainId={chainId} /> : null | ||
} |
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,40 @@ | ||
import * as React from 'react' | ||
|
||
import { | ||
StackDivider, | ||
Card, | ||
CardHeader, | ||
Heading, | ||
CardBody, | ||
Box, | ||
Stack, | ||
Text | ||
} from '@chakra-ui/react' | ||
|
||
export function Web3ModalInfo({ address, chainId }: { address?: string; chainId?: number }) { | ||
return ( | ||
<Card marginTop={10} marginBottom={10}> | ||
<CardHeader> | ||
<Heading size="md">Account Information</Heading> | ||
</CardHeader> | ||
|
||
<CardBody> | ||
<Stack divider={<StackDivider />} spacing="4"> | ||
<Box> | ||
<Heading size="xs" textTransform="uppercase" pb="2"> | ||
Address | ||
</Heading> | ||
<Text data-testid="w3m-address">{address}</Text> | ||
</Box> | ||
|
||
<Box> | ||
<Heading size="xs" textTransform="uppercase" pb="2"> | ||
Chain Id | ||
</Heading> | ||
<Text data-testid="w3m-chain-id">{chainId}</Text> | ||
</Box> | ||
</Stack> | ||
</CardBody> | ||
</Card> | ||
) | ||
} |
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
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
Oops, something went wrong.