From d2d6c33dac0c2020b9d6ed232f7ad31191312286 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Fri, 24 May 2019 15:49:36 -0400 Subject: [PATCH] mark https url as rpc --- src/actions.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/actions.js b/src/actions.js index f4dd67a..09462c1 100644 --- a/src/actions.js +++ b/src/actions.js @@ -46,7 +46,11 @@ class Actions { if (this.accounts.length > 0) { this.provider = new Provider(); this.provider.initAccounts(this.accounts); - this.provider.startWeb3Provider("ws", url) + if (url.indexOf("https") >= 0) { + this.provider.startWeb3Provider("rpc", url) + } else { + this.provider.startWeb3Provider("ws", url) + } } else { this.web3 = new Web3(); this.web3.setProvider(url);