Skip to content

Commit

Permalink
OG-371: fix-relayer-register (#560)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Forshtat <forshtat1@gmail.com>
  • Loading branch information
drortirosh and forshtat authored Dec 21, 2020
1 parent 63870cb commit 5b4bb2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/cli/CommandsLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ export default class CommandsLogic {
this.web3 = new Web3(provider)
}

async init (): Promise<void> {
async init (): Promise<this> {
await this.contractInteractor.init()
return this
}

async findWealthyAccount (requiredBalance = ether('2')): Promise<string> {
Expand Down
2 changes: 1 addition & 1 deletion src/cli/commands/gsn-relayer-register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const commander = gsnCommander(['n', 'f', 'm', 'g'])
const host = getNetworkUrl(commander.network)
const mnemonic = getMnemonic(commander.mnemonic)
const logger = createCommandsLogger(commander.loglevel)
const logic = new CommandsLogic(host, logger, {}, mnemonic)
const logic = await new CommandsLogic(host, logger, {}, mnemonic).init()
const registerOptions = {
from: commander.from ?? await logic.findWealthyAccount(),
stake: ether(commander.stake),
Expand Down

0 comments on commit 5b4bb2c

Please sign in to comment.