Skip to content

Commit

Permalink
Fix event and function fragment formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed May 31, 2019
1 parent 5ba6a61 commit a2d4b29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/abi/src.ts/fragments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ export abstract class Fragment {
result += "(" + this.inputs.map((i) => i.format(expanded)).join(expanded ? ", ": ",") + ") ";

// @TODO: Handle returns, modifiers, etc.
if (expanded) {
if (expanded && this.type !== "event") {
result += "public ";
if ((<any>this).mutabilityState) {
result += (<any>this).mutabilityState + " ";
Expand All @@ -362,7 +362,7 @@ export abstract class Fragment {
}

if ((<any>this).outputs && (<any>this).outputs.length) {
result += "(" + (<any>this).outputs.map((i: ParamType) => i.format(expanded)).join(", ") + ") ";
result += "returns (" + (<any>this).outputs.map((i: ParamType) => i.format(expanded)).join(", ") + ") ";
}
}

Expand Down

0 comments on commit a2d4b29

Please sign in to comment.