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

fix: make view methods pausable #144

Merged
merged 5 commits into from
Sep 11, 2024
Merged

fix: make view methods pausable #144

merged 5 commits into from
Sep 11, 2024

Conversation

karim-en
Copy link
Collaborator

@karim-en karim-en commented Sep 10, 2024

  • Skip role verifications if the pausable method doesn't contain except roles to able to call view methods.
  • Fix the near-sdk version to avoid auto upgrade that breaks CI and build due to dependencies conflicts.

@karim-en karim-en marked this pull request as ready for review September 11, 2024 00:58
@karim-en karim-en changed the title fix: make view method pausable fix: make view methods pausable Sep 11, 2024
Copy link

@frolvanya frolvanya left a comment

Choose a reason for hiding this comment

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

There're small nitpicks like args.roles.len() == 0 -> !args.is_empty() or let err = format!("{}", err); -> let err = err.to_string();, but they're not that important, so can be ignored

.pausable_contract
.pa_pause_feature(&setup.pause_manager, "get_counter")
.await?;
assert_success_with(res, true);
Copy link
Contributor

Choose a reason for hiding this comment

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

We should also call the get_counter as a view method to ensure that we are able to do so.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We already do a view call line below

@karim-en karim-en merged commit 4f8466b into master Sep 11, 2024
2 checks passed
@karim-en karim-en deleted the fix-pause branch September 11, 2024 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants