Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
feat: check if provider is metamask in has3idSupport
Browse files Browse the repository at this point in the history
  • Loading branch information
oed committed Oct 31, 2019
1 parent 094391e commit 18990f7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/3id/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ class ThreeId {
}

const has3idSupport = async provider => {
if (provider.isMetaMask) return false
try {
await utils.callRpc(provider, '3id_getLink')
// no error thrown, provider has 3id support
Expand Down

0 comments on commit 18990f7

Please sign in to comment.