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 the problem that some unstake methods in the plugin `stake_to_sbt… #202

Closed
wants to merge 1 commit into from

Conversation

welbon
Copy link
Contributor

@welbon welbon commented Nov 11, 2022

…` do not check the identity of the caller

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Other information

@welbon welbon requested review from jolestar, pause125 and WGB5445 and removed request for jolestar and pause125 November 11, 2022 03:37
}

/// Called by script
public(script) fun unstake_item_entry<DAOT: store, TokenT: store>(_member: address, _id: u64) {
Copy link
Member

Choose a reason for hiding this comment

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

v12 版本没有 release,可以直接改,不用考虑兼容性。

Copy link
Member

Choose a reason for hiding this comment

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

不过用 unstake_item_by_id_entry 可能更合适一些


/// Unstake all staking items from member address,
/// No care whether the user is member or not
public fun unstake_all<DAOT: store, TokenT: store>(_member: address) {
Copy link
Member

Choose a reason for hiding this comment

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

unstake_all 应该也有一个 entry 方法

/// Unstake from staking
public fun unstake_by_id<DAOT: store, TokenT: store>(member: address, id: u64) acquires StakeList {
fun unstake_item_by_id<DAOT: store, TokenT: store>(member: address, id: u64) acquires StakeList {
Copy link
Member

Choose a reason for hiding this comment

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

是不是把 unstake_item_by_id 的 member address 改成 &signer, 还是保留 public, 这样可以方便别的 module 调用。

@jolestar
Copy link
Member

include in #203

@jolestar jolestar closed this Nov 11, 2022
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.

2 participants