Skip to content

fix: make view methods pausable#144

Merged
karim-en merged 5 commits into
masterfrom
fix-pause
Sep 11, 2024
Merged

fix: make view methods pausable#144
karim-en merged 5 commits into
masterfrom
fix-pause

Conversation

@karim-en
Copy link
Copy Markdown
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
Copy Markdown
Contributor

@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
Copy Markdown
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
Copy Markdown
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
@karim-en karim-en deleted the fix-pause branch September 11, 2024 12:08
This was referenced Mar 27, 2026
@github-actions github-actions Bot mentioned this pull request Apr 7, 2026
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