phantasma-io-archive/Ecto

Add an easy way to determine if Ecto Wallet is installed

Closed this issue · 1 comments

Adding this function here would allow people to message the extension to check if it is installed:
chrome.runtime.onMessageExternal.addListener(function(request, sender, respond) { if(request == 'isInstalled') { respond(true) } })

People could check with this command:
chrome.runtime.sendMessage('bgjogpoidejdemgoochpnkmdjpocgkha', 'isInstalled', function(response) { if(response) { // The extension is installed } else { // The extension is not installed or disabled } })

Unless you see this as a security threat, being able to detect if users have the extension installed, I think it would be very beneficial to include it for ease of use.

if (!!window.PhantasmaLinkSocket == true) { //providerHint = 'ecto'; };