Fixed Interface signautres missing strings as eventFragments (#3157).
This commit is contained in:
parent
17676e9597
commit
c004ae50f3
@ -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);
|
||||
}
|
||||
@ -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) {
|
||||
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user