Skip to content

Fix non payable message decorator - #250

Merged
yjhmelody merged 1 commit into
ask-lang:mainfrom
shunsukew:fix/non-payable-message-decorator
Feb 7, 2023
Merged

yjhmelody merged 1 commit into
ask-lang:mainfrom
shunsukew:fix/non-payable-message-decorator

Conversation

@shunsukew

@shunsukew shunsukew commented Feb 6, 2023 •

Copy link
Copy Markdown
Contributor

Conditional for payable message decorator is wrong.
Thus cannot define non-payable message in ask language, and gets compile error even though payable: false decorator is properly set.

@message({ mutates: true, payable: false })
  flip(): void {
    this.data.flag = !this.data.flag;
    let event = new FlipEvent(this.data.flag);
    // @ts-ignore
    env().emitEvent(event);
  }

Screen Shot 2023-02-06 at 20 05 06

@yjhmelody

yjhmelody commented Feb 7, 2023 •

Copy link
Copy Markdown
Contributor

The PR will be useful, it's a bug. But need to print warning that payable will not be checked by contract actually.

@yjhmelody yjhmelody reopened this Feb 7, 2023
@yjhmelody

Copy link
Copy Markdown
Contributor

I will merge it. But non-payable is not supported this time.

@yjhmelody
yjhmelody merged commit 630b2db into ask-lang:main Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants