bitshares / bitshares/gwallet

build getters response tree in a loop

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
code cleanup discussion needed plugin
Dominant language
C++
Stars
4
Forks
10
PR merge metrics
No merged PRs in 30d

Description

https://github.com/bitshares/gwallet/blob/master/plugins/getters/getaccount.cpp#L55-143

As the comment on the top express there is a massive amount of code in the response just to have the benefit of translate the keys of the response object. This is currently happening in all the getters.

Discussion needed about if the translation of the keys is not needed and if so, create a loop to build the tree. Add a function with the loop in a common place for commands to use.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with plugins/getters/getaccount.cpp around lines 55-143 and review the comment describing the response code. Determine through the requested discussion whether response-key translation is still needed, then assess the other getters before proposing a common function that builds the response tree in a loop. Done means the approach is agreed and the shared function can be used by commands.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.