This commit is contained in:
Kostiantyn Stoliarskyi 2023-06-19 13:07:53 +03:00 committed by SvyatoslavArtymovych
parent 26069bc96e
commit 20d9b91bf5
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',