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

feat: add get Runes info batch api #73

Merged
merged 11 commits into from
Oct 31, 2024
Merged

Conversation

gazenw
Copy link
Member

@gazenw gazenw commented Oct 29, 2024

Description

  • Adds "GET /info/batch" for batch querying Runes info
  • Adds "includeHoldersCount" flag in Get Token Info / Get Token Info Batch / Get Tokens.
    • If false, set "holdersCount" field to 0.
    • If true, query holders count as normal
  • BREAKING: includeHoldersCount will default to false, instead of true (current behavior)

Type of change

What types of changes does your code introduce to Appium?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Enhancement (improvement to existing features and functionality)
  • Documentation update (changes to documentation)
  • Performance improvement (non-breaking change which improves efficiency)
  • Code consistency (non-breaking change which improves code reliability and robustness)

Commit formatting

Please follow the commit message conventions for an easy way to identify the purpose or intention of a commit. Check out our commit message conventions in the CONTRIBUTING.md

@@ -90,7 +91,7 @@ func (h *HttpHandler) GetHolders(ctx *fiber.Ctx) (err error) {
var ok bool
runeId, ok = h.resolveRuneId(ctx.UserContext(), req.Id)
if !ok {
return errs.NewPublicError("unable to resolve rune id from \"id\"")
return errs.NewPublicError(fmt.Sprintf("unable to resolve rune id \"%s\" from \"id\"", req.Id))
Copy link
Member

Choose a reason for hiding this comment

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

can use %q for quotation


terms := lo.FromPtr(runeEntry.Terms)

result := &getTokenInfoResult{
Copy link
Member

Choose a reason for hiding this comment

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

should we extract mapper func ?

@gazenw gazenw changed the base branch from main to develop October 31, 2024 07:14
@gazenw gazenw merged commit c5c9a7b into develop Oct 31, 2024
10 checks passed
@gazenw gazenw deleted the feat/batch-get-runes-info branch October 31, 2024 07:15
@gazenw gazenw mentioned this pull request Oct 31, 2024
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