Skip to content

Commit

Permalink
fix: Use correct node type for local state expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanmenzel committed Oct 16, 2024
1 parent a61a2b6 commit d1db360
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/awst_build/eb/storage/local-state.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { nodeFactory } from '../../../awst/node-factory'
import type { AppStateExpression, Expression, LValue } from '../../../awst/nodes'
import type { AppAccountStateExpression, AppStateExpression, Expression, LValue } from '../../../awst/nodes'
import { BytesConstant } from '../../../awst/nodes'
import type { SourceLocation } from '../../../awst/source-location'
import { stateKeyWType, voidWType } from '../../../awst/wtypes'
Expand Down Expand Up @@ -61,7 +61,7 @@ export class LocalStateExpressionBuilder extends InstanceExpressionBuilder<Local
return new LocalStateForAccountExpressionBuilder(this.buildField(account.resolve(), sourceLocation), this.ptype.contentType)
}

private buildField(account: Expression, sourceLocation: SourceLocation): AppStateExpression {
private buildField(account: Expression, sourceLocation: SourceLocation): AppAccountStateExpression {
return nodeFactory.appAccountStateExpression({
key: this._expr,
account,
Expand All @@ -76,7 +76,7 @@ export class LocalStateForAccountExpressionBuilder extends NodeBuilder {
ptype: undefined

constructor(
private key: AppStateExpression,
private key: AppAccountStateExpression,
private contentType: PType,
) {
super(key.sourceLocation)
Expand All @@ -87,7 +87,7 @@ export class LocalStateForAccountExpressionBuilder extends NodeBuilder {
case 'value':
// TODO: use value proxy
return instanceEb(
nodeFactory.appStateExpression({
nodeFactory.appAccountStateExpression({
...this.key,
sourceLocation,
}),
Expand Down

0 comments on commit d1db360

Please sign in to comment.