2
0
mirror of synced 2025-02-23 11:38:42 +00:00

Do not require a Signer for contract.populateTransaction.

This commit is contained in:
Richard Moore 2019-06-28 15:47:42 -04:00
parent 7715e233bb
commit 0e78386a08
No known key found for this signature in database
GPG Key ID: 525F70A6FCABC295

View File

@ -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);