Prevent malformed logs from preventing other logs being decoded (#4275).
This commit is contained in:
parent
3a52201fe2
commit
0dca645632
@ -76,10 +76,12 @@ export class ContractTransactionReceipt extends TransactionReceipt {
|
|||||||
return super.logs.map((log) => {
|
return super.logs.map((log) => {
|
||||||
const fragment = log.topics.length ? this.#iface.getEvent(log.topics[0]): null;
|
const fragment = log.topics.length ? this.#iface.getEvent(log.topics[0]): null;
|
||||||
if (fragment) {
|
if (fragment) {
|
||||||
|
try {
|
||||||
return new EventLog(log, this.#iface, fragment)
|
return new EventLog(log, this.#iface, fragment)
|
||||||
} else {
|
} catch (error) { }
|
||||||
return log;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return log;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user