This commit is contained in:
Kostiantyn Stoliarskyi 2023-06-19 13:07:53 +03:00
parent b574c48e22
commit 8b15e3f212
2 changed files with 15 additions and 15 deletions

File diff suppressed because one or more lines are too long

View File

@ -12,20 +12,20 @@ export function initWallet() {
// connect to ethereum network and sign transactions with Metamask
async function signInWithEthereum() {
if (!window.hasOwnProperty('ethereum')) {
let result = confirm(
"You don't have needed extension! Do you want to install it?",
);
localStorage.setItem('showExtensionAlert', 'false');
if (result) {
window.open('https://metamask.io/', '_blank');
}
return;
}
if (!window.hasOwnProperty('ethereum')) {
console.error('Required extension not found');
return;
}
// if (!window.hasOwnProperty('ethereum')) {
// let result = confirm(
// "You don't have needed extension! Do you want to install it?",
// );
// localStorage.setItem('showExtensionAlert', 'false');
// if (result) {
// window.open('https://metamask.io/', '_blank');
// }
// return;
// }
// if (!window.hasOwnProperty('ethereum')) {
// console.error('Required extension not found');
// return;
// }
const options = {
injectProvider: false,
communicationLayerPreference: 'webrtc',