-
Notifications
You must be signed in to change notification settings - Fork 23
Refactoring / Мake signAccountOpController part of the request #2054
New issue
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
Refactoring / Мake signAccountOpController part of the request #2054
Conversation
| if (this.#signAccountOpController?.broadcastStatus === 'SUCCESS') { | ||
| setTimeout(() => { | ||
| this.resetForm() | ||
| }, 0) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can move the emit update to an else statement to prevent double emits
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An update is required, followed by another one on the next tick to receive the last update from the signAccountOpController before the resetForm func destroys it. It is just a workaround because the onUpdate with forceEmitUpdates does not work properly in controllers and it is a temp fix until we find a solution of the problem with the event emitter
|
|
||
| if (this.signAccountOpController?.broadcastStatus === 'SUCCESS') { | ||
| setTimeout(() => { | ||
| this.resetForm() | ||
| }, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can move the emit update to an else statement to prevent double emits
PetromirDev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job 👏
Uh oh!
There was an error while loading. Please reload this page.