Getline-Network / getline

Distributed P2P Lending System
https://getline.in
Apache License 2.0
9 stars 6 forks source link

[front-end] crashes without visible user error when Metamask is locked #41

Closed ritave closed 6 years ago

ritave commented 6 years ago
Uncaught (in promise) Error: gRPC failed (2): invalid owner specified: neither ASCII nor Raw form of address given
    at Object.onEnd (app.e16483494b1250262f36.js:16)
    at Array.<anonymous> (app.e16483494b1250262f36.js:16)
    at t (app.e16483494b1250262f36.js:1)
    at app.e16483494b1250262f36.js:1

No visible error shows-up for the user, and unlocking account doesn't resolve the issue - the website needs to be refreshed to work again.

q3k commented 6 years ago

This can be detected via


const c: Client;
const user = await c.currentUser();
if (user.ascii == undefined) {
    console.log("Unlock your metamask!");
}

I can add an async method to the client that will wait for an account to be unlocked, if necessary.

q3k commented 6 years ago

Verified, works now.