-
Notifications
You must be signed in to change notification settings - Fork 0
RAI-11434 refactor polling transaction logic #87
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
Conversation
src/rest.ts
Outdated
| timeout?: number; | ||
| }; | ||
|
|
||
| export type PollingResult<T> = |
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.
Hm, why not just
export type PollingResult<T> = {
done: boolean;
result?: T;
};
src/rest.ts
Outdated
|
|
||
| export type PollOptions = { | ||
| overheadRate?: number; | ||
| startTime?: number; |
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.
startTime looks kinda weird, doesn't it?
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.
So do we want to hardcode it in the pollWithOverhead function to Date.now, or we should just not expose it in the exec and pollTransaction options?
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.
Hardcode in pollWithOverhead
src/api/query/execAsyncApi.ts
Outdated
| readonly = true, | ||
| tags: string[] = [], | ||
| interval = 1000, // 1 second | ||
| timeout = Number.POSITIVE_INFINITY, |
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.
Should be options?: PollOptions, to be consistent with the poll function
No description provided.