We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In #82 the PromiseResult type was changed to string | near.PromiseResult.NotReady | nearPromiseResult.Failed.
PromiseResult
string | near.PromiseResult.NotReady | nearPromiseResult.Failed
From the method's signature it looks like checking for errors would be:
if(near.promiseResult() == near.PromiseResult.Failed){ near.log("the xcc failed") }
However, if a method return the value of 2 it will be falsely assumed there was an error (I tested it in this transaction).
2
In an scenario such as handling FT, where methods return how many tokens were used, this could lead to potentially devastating errors.
The previous return{status, value} was clear, for which I vote for rolling it back.
{status, value}
The text was updated successfully, but these errors were encountered:
volovyks
Successfully merging a pull request may close this issue.
In #82 the
PromiseResult
type was changed tostring | near.PromiseResult.NotReady | nearPromiseResult.Failed
.From the method's signature it looks like checking for errors would be:
However, if a method return the value of
2
it will be falsely assumed there was an error (I tested it in this transaction).In an scenario such as handling FT, where methods return how many tokens were used, this could lead to potentially devastating errors.
The previous return
{status, value}
was clear, for which I vote for rolling it back.The text was updated successfully, but these errors were encountered: