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

[ioctl]node reward unclaimed support name query #4150

Merged
merged 8 commits into from
Mar 7, 2024

Conversation

millken
Copy link
Contributor

@millken millken commented Feb 23, 2024

Description

Improve user experience, you can use ioctl node reward unclaimed cobo to query without input the address.

Fixes #4149

Type of change

Please delete options that are not relevant.

  • [] Bug fix (non-breaking change which fixes an issue)
  • [] New feature (non-breaking change which adds functionality)
  • Code refactor or improvement
  • [] Breaking change (fix or feature that would cause a new or changed behavior of existing functionality)
  • [] This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • [] make test
  • [] fullsync
  • [] Other test (please specify)

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • [] My code follows the style guidelines of this project
  • [] I have performed a self-review of my code
  • [] I have commented my code, particularly in hard-to-understand areas
  • [] I have made corresponding changes to the documentation
  • [] My changes generate no new warnings
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] New and existing unit tests pass locally with my changes
  • [] Any dependent changes have been merged and published in downstream modules

Copy link

codecov bot commented Feb 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.38%. Comparing base (e1f0636) to head (fff75fc).
Report is 189 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4150      +/-   ##
==========================================
+ Coverage   75.38%   76.38%   +1.00%     
==========================================
  Files         303      340      +37     
  Lines       25923    28964    +3041     
==========================================
+ Hits        19541    22125    +2584     
- Misses       5360     5731     +371     
- Partials     1022     1108      +86     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -365,3 +365,16 @@ func getAllStakingCandidates(chainClient iotexapi.APIServiceClient) (candidateLi
}
return
}

func getCandidateRewardAddressByName(cli iotexapi.APIServiceClient, name string) (string, bool, error) {
Copy link
Member

@dustinxie dustinxie Mar 5, 2024

Choose a reason for hiding this comment

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

  1. getCandidateRewardAddressByAddressOrName() (string, error)
  2. move address, err := util.Address(arg) into here

@@ -24,8 +24,8 @@ import (
// Multi-language support
var (
_rewardCmdUses = map[config.Language]string{
config.English: "reward unclaimed|pool [ALIAS|DELEGATE_ADDRESS]",
config.Chinese: "reward 未支取|奖金池 [别名|委托地址]",
config.English: "reward unclaimed|pool [ALIAS|DELEGATE_ADDRESS|NAME]",
Copy link
Member

Choose a reason for hiding this comment

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

|REWARD_ADDRESS
奖励地址

Copy link

sonarcloud bot commented Mar 7, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
52.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@dustinxie dustinxie merged commit 0e32c42 into iotexproject:master Mar 7, 2024
3 of 5 checks passed
dustinxie added a commit that referenced this pull request Mar 8, 2024
Co-authored-by: dustinxie <dahuaxie@gmail.com>
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.

ioctl node reward command to support delegate name
3 participants