Cryptofolio icon indicating copy to clipboard operation
Cryptofolio copied to clipboard

Add tokens from multiple sources?

Open Suncatcher opened this issue 2 years ago • 4 comments

Suppose I have

  • 0.15 of coins A in Stock Exchange 1 (or address 1)
  • 0.005 of coins A in Stock Exchange 2
  • 1.00 of coins A in Stock Exchange 3

Now in Holdings section I have no possibility to add it in such breakdown, I can only add the coin as a whole.

Will it be added anytime soon?

Suncatcher avatar Jun 10 '22 11:06 Suncatcher

Great question. Anyone have any answers yet?

SaintelDaily avatar Jan 14 '23 21:01 SaintelDaily

Sorry for not being active; I got my first job around 7 months ago so unfortunately I don't have much free time to work on personal projects. I'm more than happy to accept any pull requests that add additional features though, but I personally won't be doing so.

Xtrendence avatar Jan 14 '23 23:01 Xtrendence

@Xtrendence if you can compile a one-pager on how your dev environment is setup, perhpaps, I, or someone else could open a few pull requests. Basically, how to do you build your project, and maybe some info around debugging the project with descriptions of what is doing what there.

gked avatar Apr 02 '24 00:04 gked

@gked Hi, thank you for the interest in the project, very happy to see it still getting attention after all this time! I've made a little guide that should hopefully be somewhat useful: https://github.com/Xtrendence/Cryptofolio/wiki/Dev-Environment

For debugging I only used the browser's console and network tabs 99% of the time, so going into detail about that would basically mean a tutorial on debugging and testing JS/PHP code which would take a while and probably wouldn't be that helpful since it'd be too general. The guide above explains what functionality is included in the various project files, from there I'd recommend thinking of a new feature to add or a bug to fix, and working backwards to see where to do that.

I'd recommend searching for strings such as IDs and such based on the DOM. So if you want to add a "source" to each holding, look at what other properties a holding has (such as "amount"). From there, find usages in the API related to holding amounts, and add a source field alongside it. Then find places in the UI where you want to show that data, find the holdings table in the HTML, add the new column, then find where the holding data is fetched i.e. listHoldings(), and modify that to add the source to the table. I wish I could provide more help but it's a 5,000+ line JS file I haven't touched in years, so it'd take me a while to find things myself, especially as my programming wasn't nearly as structured or thought out at the time.

Xtrendence avatar Apr 08 '24 19:04 Xtrendence