Add helper to initialize a new instance with provider #128

Merged
bumi merged 4 commits from feature/simple-init into master 2019-05-17 07:37:11 +00:00
Showing only changes of commit 1a227ba67c - Show all commits

View File

@ -67,7 +67,7 @@ class Kredits {
}
static for (connectionOptions, kreditsOptions) {
const { network, rpcUrl, wallet } = connectionOptions;
let { network, rpcUrl, wallet } = connectionOptions;
if (!rpcUrl && network === 'local') { rpcUrl = 'http://localhost:8545'; }
let ethProvider, signer;
if (rpcUrl || network === 'local') {