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

Add Client option for retry publishing behaviour #820

Merged
merged 10 commits into from
Apr 28, 2022

Conversation

abdulmth
Copy link
Contributor

Description of change

Add retry_until_included option to the Client for both Wasm and Rust.
Add public is_message_included(message_id) -> bool to check if message is confirmed by a milestone.

Links to any relevant issues

fixes issue #811

Type of change

  • Bug fix (a non-breaking change which fixes an issue)
  • Enhancement (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Fix

@abdulmth abdulmth self-assigned this Apr 24, 2022
@abdulmth abdulmth added Added A new feature that requires a minor release. Part of "Added" section in changelog Wasm Related to Wasm bindings. Becomes part of the Wasm changelog Rust Related to the core Rust code. Becomes part of the Rust changelog. labels Apr 24, 2022
@abdulmth abdulmth added this to the v0.6 Features milestone Apr 24, 2022
@abdulmth abdulmth linked an issue Apr 24, 2022 that may be closed by this pull request
7 tasks
Abdulrahim Al Methiab added 2 commits April 24, 2022 23:01
@abdulmth abdulmth requested a review from cycraig April 24, 2022 22:01
Copy link
Contributor

@cycraig cycraig left a comment

Choose a reason for hiding this comment

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

Looks good to me, I like that Client::is_message_included is exposed now.

Minor comments.

bindings/wasm/src/tangle/client_config.rs Outdated Show resolved Hide resolved
identity-iota/src/tangle/client_builder.rs Outdated Show resolved Hide resolved
identity-iota/src/tangle/client_builder.rs Outdated Show resolved Hide resolved
identity-iota/src/tangle/client.rs Outdated Show resolved Hide resolved
Comment on lines 257 to 259

#[wasm_bindgen(typescript_type = "Promise<boolean>")]
pub type PromiseBoolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

There is already a PromiseBool in the Wasm bindings, re-use that to avoid duplicate definitions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That one is located in account -> storage -> traits it didn't feel right to reuse it. It should be moved to common -> traits but that is still not merged from #815. I didn't create a file with the same name to avoid merge conflicts.

Copy link
Contributor

Choose a reason for hiding this comment

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

It should be moved to common, we can deal with the merge conflicts later.

bindings/wasm/src/tangle/client.rs Outdated Show resolved Hide resolved
@cycraig
Copy link
Contributor

cycraig commented Apr 28, 2022

Pull from dev to fix CI.

@abdulmth abdulmth merged commit 11b8bd9 into dev Apr 28, 2022
@abdulmth abdulmth deleted the feat/retry-until-included branch April 28, 2022 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Added A new feature that requires a minor release. Part of "Added" section in changelog Rust Related to the core Rust code. Becomes part of the Rust changelog. Wasm Related to Wasm bindings. Becomes part of the Wasm changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task] Add Client option for retry publishing behaviour
2 participants