Skip to content

Commit

Permalink
Fixed Interface signautres missing strings as eventFragments (#3157).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Jul 14, 2022
1 parent 17676e9 commit c004ae5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/abi/src.ts/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ export class Interface {
}

// Create the filter for the event with search criteria (e.g. for eth_filterLog)
encodeFilterTopics(eventFragment: EventFragment, values: ReadonlyArray<any>): Array<string | Array<string>> {
encodeFilterTopics(eventFragment: EventFragment | string, values: ReadonlyArray<any>): Array<string | Array<string>> {
if (typeof(eventFragment) === "string") {
eventFragment = this.getEvent(eventFragment);
}
Expand Down Expand Up @@ -477,7 +477,7 @@ export class Interface {

values.forEach((value, index) => {

let param = eventFragment.inputs[index];
let param = (<EventFragment>eventFragment).inputs[index];

if (!param.indexed) {
if (value != null) {
Expand Down Expand Up @@ -505,7 +505,7 @@ export class Interface {
return topics;
}

encodeEventLog(eventFragment: EventFragment, values: ReadonlyArray<any>): { data: string, topics: Array<string> } {
encodeEventLog(eventFragment: EventFragment | string, values: ReadonlyArray<any>): { data: string, topics: Array<string> } {
if (typeof(eventFragment) === "string") {
eventFragment = this.getEvent(eventFragment);
}
Expand Down

0 comments on commit c004ae5

Please sign in to comment.