DigixGlobal / governance-ui-components

Governance UI reusable components library
Other
3 stars 2 forks source link

fix - created method with a check for undefined before extracting add… #368

Closed crypto-supporter closed 5 years ago

crypto-supporter commented 5 years ago

WHY

I cannot connect my wallet through meta mast without an address nickname. If i leave that input empty i get javascript error, cannot get address of undefined.

WHAT

Created a function which extract that address property after checking if parent isnt undefined.

HOW TO TEST

  1. Try to connect meta mask without address nickname. No js error should crash the page to a white screen.

PS

Maybe this should be fixed higher up? Maybe better to make input address nickname required if it really is required higher up?

mandres-digix commented 5 years ago

Hey @crypto-supporter, I believe this is already addressed in PR #345. We're no longer asking for the name when loading a MetaMask wallet.

I'll be closing the PR now. Feel free to re-open this or create a new PR if you're still encountering errors with MetaMask.