Skip to content
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

[deku-c-toolkit] Expose cancelOnNewState function #989

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deku-c/deku-c-toolkit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@marigold-dev/deku-c-toolkit",
"version": "0.1.4",
"version": "0.1.6",
"description": "Deku typescript client to interact with deku-c",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
Expand Down
6 changes: 5 additions & 1 deletion deku-c/deku-c-toolkit/src/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ export class Contract {
return null;
})
.catch(console.error);
}, 2000);
}, 1000);
}

cancelOnNewState(): void {
if (this.fetchInterval) clearInterval(this.fetchInterval);
}
Comment on lines +168 to 170
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a doc to explain what this function does ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

}