sclem / pfcrypto

chome extension to automatically update cryptocurrency holdings in personal capital
https://chrome.google.com/webstore/detail/pfcrypto/ceepigemlmlbphjhffddplfecgedhoeb
MIT License
48 stars 11 forks source link

pfcrypto not working, even after update to new API #15

Closed didyouexpectthat closed 4 years ago

didyouexpectthat commented 4 years ago

I haven't been able to get pfcrypto working in a long time. I've logged out of personalcapital, logged back in, added new 'stock' using both methods (id, ticker)... received the new update today, still not getting any updates to coins.

image image

Originally posted by @didyouexpectthat in https://github.com/sclem/pfcrypto/issues/14#issuecomment-599092390

Chrome console says: personalcapital.js:186 Done resolving account balances personalcapital.js:210 done updating holdings.

Nothing is ever updated.

sclem commented 4 years ago

@didyouexpectthat you prob need to debug the data coming from personalcapital. You can follow the dev instructions to load the extension manually and add some console logs (don't forget to remove the official one first). You will want to log here at a minimum: https://github.com/sclem/pfcrypto/blob/master/personalcapital.js#L55

My first guess is no PC holdings are mapping to the array, so nothing updates. You also put in a number for number of shares, right?

didyouexpectthat commented 4 years ago

Thanks, I was thinking about adding more console messages to figure out what kind of data it was pulling. I'll try starting there. All of the holdings have number of shares and a price and match the id.

sclem commented 4 years ago

I'm actually refactoring the code right now. Its way overdue and there are a lot better, modern js features we can use like async/await to clean it up. I'll put that out as a pr for others to review. It might help navigating the current spaghetti.

didyouexpectthat commented 4 years ago

I added a console log at line 55 for holdings it said length: 0 :P I'll add more console logs throughout and see what else I can get it to tell me. The only thing I haven't done is completely wipe away the manual portfolio and rebuild it.

didyouexpectthat commented 4 years ago

I'll watch for the PR. :) thanks.

didyouexpectthat commented 4 years ago

Going to close this because I think it's an issue with PC, not with pfcrypto. 👋