Skip to content

Commit

Permalink
Do not require a Signer for contract.populateTransaction.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Jun 28, 2019
1 parent 7715e23 commit 0e78386
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/contracts/src.ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,12 @@ function runMethod(contract: Contract, functionName: string, options: RunOptions
})
}

if (options.transaction) { return resolveProperties(tx); }

if (!contract.signer) {
errors.throwError("sending a transaction require a signer", errors.UNSUPPORTED_OPERATION, { operation: "sendTransaction" })
}

if (options.transaction) { return resolveProperties(tx); }

return contract.signer.sendTransaction(tx).then((tx) => {
let wait = tx.wait.bind(tx);

Expand Down

0 comments on commit 0e78386

Please sign in to comment.