Do not require a Signer for contract.populateTransaction.
This commit is contained in:
parent
7715e233bb
commit
0e78386a08
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user