Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/ethers unsupported error #1876

Merged
merged 7 commits into from
Feb 6, 2024
Merged
4 changes: 4 additions & 0 deletions packages/ethers/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,10 @@ export class Web3Modal extends Web3ModalScaffold {
await this.syncBalance(address)
}
}
} else if (isConnected) {
this.setCaipNetwork({
id: `${ConstantsUtil.EIP155}:${chainId}`
})
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions packages/ethers5/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,10 @@ export class Web3Modal extends Web3ModalScaffold {
await this.syncBalance(address)
}
}
} else if (isConnected) {
this.setCaipNetwork({
id: `${ConstantsUtil.EIP155}:${chainId}`
})
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class WuiListWalletTransaction extends LitElement {
<wui-chip
icon="externalLink"
variant="shadeSmall"
@click=${this.onExplorer.bind(this)}
href=${this.addressExplorerUrl}
title=${this.receiverAddress}
></wui-chip>
</wui-flex>
Expand All @@ -56,12 +56,6 @@ export class WuiListWalletTransaction extends LitElement {

return html`<wui-icon size="inherit" color="fg-200" name="networkPlaceholder"></wui-icon>`
}

private onExplorer() {
if (this.addressExplorerUrl) {
window.open(this.addressExplorerUrl, '_blank', 'noreferrer noopener')
}
}
}

declare global {
Expand Down
Loading