mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
network change fix
This commit is contained in:
parent
68ed8fd348
commit
a322c443ed
@ -25,7 +25,6 @@ const Blockies = ({ account }: { account: string | undefined }) => {
|
|||||||
const Account = React.forwardRef((props, ref: any) => {
|
const Account = React.forwardRef((props, ref: any) => {
|
||||||
const { accountId, status, connect, networkId } = useOcean()
|
const { accountId, status, connect, networkId } = useOcean()
|
||||||
const hasSuccess = status === 1 && isCorrectNetwork(networkId)
|
const hasSuccess = status === 1 && isCorrectNetwork(networkId)
|
||||||
console.log(networkId)
|
|
||||||
|
|
||||||
async function handleActivation(e: FormEvent<HTMLButtonElement>) {
|
async function handleActivation(e: FormEvent<HTMLButtonElement>) {
|
||||||
// prevent accidentially submitting a form the button might be in
|
// prevent accidentially submitting a form the button might be in
|
||||||
|
@ -8,8 +8,8 @@ export function NetworkMonitor(): ReactElement {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!web3Provider) return
|
if (!web3Provider) return
|
||||||
|
|
||||||
async function handleNetworkChanged(chainId: number) {
|
async function handleNetworkChanged(chainId: string) {
|
||||||
const config = getOceanConfig(chainId)
|
const config = getOceanConfig(Number(chainId.replace('0x', '')))
|
||||||
await connect(config)
|
await connect(config)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user