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