Skip to content

Commit

Permalink
Fixed contract proxied tx.wait receipt properties (#355).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Nov 27, 2018
1 parent 6830484 commit 3f76f60
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src.ts/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,20 +280,20 @@ function runMethod(contract: Contract, functionName: string, estimateOnly: boole
receipt.events = receipt.logs.map((log) => {
let event: Event = (<Event>deepCopy(log));

let parsed = this.interface.parseLog(log);
let parsed = contract.interface.parseLog(log);
if (parsed) {
event.args = parsed.values;
event.decode = parsed.decode;
event.event = parsed.name;
event.eventSignature = parsed.signature;
}

event.removeListener = () => { return this.provider; }
event.removeListener = () => { return contract.provider; }
event.getBlock = () => {
return this.provider.getBlock(receipt.blockHash);
return contract.provider.getBlock(receipt.blockHash);
}
event.getTransaction = () => {
return this.provider.getTransaction(receipt.transactionHash);
return contract.provider.getTransaction(receipt.transactionHash);
}
event.getTransactionReceipt = () => {
return Promise.resolve(receipt);
Expand Down

0 comments on commit 3f76f60

Please sign in to comment.