Skip to content

Commit

Permalink
fix: msgSender appearing as msg in Buckets of Balls and causing a cir…
Browse files Browse the repository at this point in the history
…cuit compilation error
  • Loading branch information
lydiagarms committed Jul 8, 2024
1 parent 7973409 commit 68fe11c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,10 @@ class BoilerplateGenerator {
this.assignIndicators(mappingKeyIndicator);
this.mappingKeyName = mappingKeyName.replace('[', '_').replace(']', '');
if (this.mappingKeyName.split('.').length > 2) this.mappingKeyName.replace('.', 'dot');
if(this.mappingKeyName == 'msg')
this.mappingKeyName = this.mappingKeyName+mappingKeyIndicator.keyPath.parent.memberName.replace('sender','Sender').replace('value','Value');
this.mappingName = this.indicators.name;
this.name = `${this.mappingName}_${mappingKeyName}`.replaceAll('.', 'dot').replace('[', '_').replace(']', '');
this.name = `${this.mappingName}_${this.mappingKeyName}`.replaceAll('.', 'dot').replace('[', '_').replace(']', '');
}

generateBoilerplateStatement(bpType: string, extraParams?: any) {
Expand All @@ -237,7 +239,6 @@ class BoilerplateGenerator {
const { mappingKeyName } = extraParams;
this.refresh(mappingKeyName);
}
this.initialise(this.indicators);
return {
nodeType: 'BoilerplateStatement',
bpSection: 'statements',
Expand Down

0 comments on commit 68fe11c

Please sign in to comment.