Prevent subscription recipient from connecting to unverified web3 account
This commit is contained in:
parent
fe6ef494e3
commit
c2b0c67be9
1 changed files with 6 additions and 0 deletions
|
@ -130,6 +130,12 @@ async function connectWallet() {
|
||||||
if (!signer) {
|
if (!signer) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
const walletAddress = await signer.getAddress()
|
||||||
|
if (isCurrentUser() && !ethereumAddressMatch(walletAddress, profileEthereumAddress)) {
|
||||||
|
// Recipient must use verified account
|
||||||
|
disconnectWallet()
|
||||||
|
return
|
||||||
|
}
|
||||||
const walletChainId = await web3Provider.send("eth_chainId", [])
|
const walletChainId = await web3Provider.send("eth_chainId", [])
|
||||||
console.info("chain ID:", walletChainId)
|
console.info("chain ID:", walletChainId)
|
||||||
web3Provider.provider.on("chainChanged", (chainId: string) => {
|
web3Provider.provider.on("chainChanged", (chainId: string) => {
|
||||||
|
|
Loading…
Reference in a new issue