Skip to content

Commit 0e78386

Browse files
committed
Do not require a Signer for contract.populateTransaction.
1 parent 7715e23 commit 0e78386

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/contracts/src.ts/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,12 @@ function runMethod(contract: Contract, functionName: string, options: RunOptions
218218
})
219219
}
220220

221+
if (options.transaction) { return resolveProperties(tx); }
222+
221223
if (!contract.signer) {
222224
errors.throwError("sending a transaction require a signer", errors.UNSUPPORTED_OPERATION, { operation: "sendTransaction" })
223225
}
224226

225-
if (options.transaction) { return resolveProperties(tx); }
226-
227227
return contract.signer.sendTransaction(tx).then((tx) => {
228228
let wait = tx.wait.bind(tx);
229229

0 commit comments

Comments
 (0)