From c0e6014c71135b20a6b1158b110ccc9fe4927001 Mon Sep 17 00:00:00 2001 From: neeboo Date: Sun, 14 Jul 2019 04:53:21 +0800 Subject: [PATCH] fix(contract):signTransaction using 'latest' blockNumber --- packages/harmony-contract/src/contract.ts | 3 +++ packages/harmony-contract/src/methods/method.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/harmony-contract/src/contract.ts b/packages/harmony-contract/src/contract.ts index fd564ee..ee5a2d2 100644 --- a/packages/harmony-contract/src/contract.ts +++ b/packages/harmony-contract/src/contract.ts @@ -100,4 +100,7 @@ export class Contract { runEventFactory(): Contract { return new EventFactory(this).addEventsToContract(); } + connect(wallet: Wallet): void { + this.wallet = wallet; + } } diff --git a/packages/harmony-contract/src/methods/method.ts b/packages/harmony-contract/src/methods/method.ts index b7453e2..08b1bb5 100644 --- a/packages/harmony-contract/src/methods/method.ts +++ b/packages/harmony-contract/src/methods/method.ts @@ -149,7 +149,7 @@ export class ContractMethod { undefined, updateNonce, 'rlp', - 'pending', + 'latest', // 'pending', ); this.contract.address = TransactionFactory.getContractAddress(signed); this.contract.setStatus(ContractStatus.SIGNED);