Skip to content

Commit

Permalink
Add --use-frame flag for using frame as the web3 provider (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
izqui authored Oct 24, 2018
1 parent 9ec9a27 commit 9c1e1c5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ cmd.option('cwd', {
}
})

cmd.option('use-frame', {
description: 'Use frame as a signing provider and web3 provider',
boolean: true,
default: false
})

// network coerce is called multiple times, only warn once
let warnedDeprecatedNetwork = false

Expand Down
7 changes: 7 additions & 0 deletions src/middleware/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ const configureNetwork = (argv, network) => {
}
}

if (argv.useFrame) {
return {
name: `frame-${network}`,
provider: new Web3.providers.WebsocketProvider('ws://localhost:1248')
}
}

const truffleConfig = getTruffleConfig()

const truffleNetwork = truffleConfig.networks[network]
Expand Down

0 comments on commit 9c1e1c5

Please sign in to comment.