Skip to content

Commit

Permalink
fixing metamask code
Browse files Browse the repository at this point in the history
  • Loading branch information
ardan-bkennedy committed Oct 4, 2024
1 parent cbc8e12 commit 25770c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/services/ui/website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ <h2></h2>
<div id="error"></div>
</div>
</body>
</html>
</html>
11 changes: 3 additions & 8 deletions app/services/ui/website/scripts/backend/wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const sdk = new MetaMaskSDK.MetaMaskSDK({
url: 'http://' + window.location.host,
},
logging: {
sdk: false,
sdk: true,
},
});

Expand Down Expand Up @@ -92,7 +92,7 @@ export default Wallet;
function parseError(e) {
switch (true) {
case 'message' in e:
return e.message;
return e.ReferenceError;
}

return 'no error field identified';
Expand Down Expand Up @@ -124,12 +124,7 @@ function toUTF8Array(str) {
// subtracting 0x10000 and splitting the
// 20 bits of 0x0-0xFFFFF into two halves
charcode = 0x10000 + (((charcode & 0x3ff) << 10) | (str.charCodeAt(i) & 0x3ff));
utf8.push(
0xf0 | (charcode >> 18),
0x80 | ((charcode >> 12) & 0x3f),
0x80 | ((charcode >> 6) & 0x3f),
0x80 | (charcode & 0x3f)
);
utf8.push(0xf0 | (charcode >> 18), 0x80 | ((charcode >> 12) & 0x3f), 0x80 | ((charcode >> 6) & 0x3f), 0x80 | (charcode & 0x3f));
}
}

Expand Down

0 comments on commit 25770c3

Please sign in to comment.