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 { accountId, status, connect, networkId } = useOcean()
|
||||
const hasSuccess = status === 1 && isCorrectNetwork(networkId)
|
||||
console.log(networkId)
|
||||
|
||||
async function handleActivation(e: FormEvent<HTMLButtonElement>) {
|
||||
// prevent accidentially submitting a form the button might be in
|
||||
|
@ -8,8 +8,8 @@ export function NetworkMonitor(): ReactElement {
|
||||
useEffect(() => {
|
||||
if (!web3Provider) return
|
||||
|
||||
async function handleNetworkChanged(chainId: number) {
|
||||
const config = getOceanConfig(chainId)
|
||||
async function handleNetworkChanged(chainId: string) {
|
||||
const config = getOceanConfig(Number(chainId.replace('0x', '')))
|
||||
await connect(config)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user