mark https url as rpc

This commit is contained in:
Iuri Matias 2019-05-24 15:49:36 -04:00
parent 515643eac1
commit d2d6c33dac
1 changed files with 5 additions and 1 deletions

View File

@ -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);