Added fragment for Deferred Topic Filter

Subscribing with contract.filter.EventName(someValue...) returns the entire log object instead of returning the Event arguments to the listener.
Other checks bellow check if fragment is present in the event but since it's an 'else if' it never triggers.
This commit is contained in:
lukastanisic99 2024-04-07 10:29:49 +02:00 committed by GitHub
parent ad5f1c5fc7
commit ac86db3198
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -500,7 +500,8 @@ async function getSubInfo(contract: BaseContract, event: ContractEventName): Pro
} else if (isDeferred(event)) {
// Deferred Topic Filter; e.g. `contract.filter.Transfer(from)`
topics = await event.getTopicFilter();
if(event.fragment)fragment = event.fragment
} else if ("fragment" in event) {
// ContractEvent; e.g. `contract.filter.Transfer`
fragment = event.fragment;