moneybutton / yours-core

Client-side key and content management for Yours.
https://www.yours.network
MIT License
132 stars 27 forks source link

Can get cached bitcoin balances and block info from CoreBitcoin (Issue #98) #101

Closed willy-b closed 8 years ago

willy-b commented 8 years ago

To address #98

Makes it so CoreBitcoin issues "balance" events even if balance is unchanged whenever it checks the balance, to support stateless/new consumers.

willy-b commented 8 years ago

tl;dr I'm going back but storing the last value in DattCore

Full plan: The way I "fixed" this was stupid: You have to wait the polling interval after opening/closing the settings pane. For performance reasons the polling interval should be kept long, but for UX reasons, the refresh interval should be short. Thus these should be totally decoupled. Better solution: I'm going to keep the balance state at the DattCore level, and add a method to get the current balance. The maximum UI wait is then the polling interval, experienced ONLY if they opened the settings immediately before the first poll. Almost always one will get the last polled value instantly from DattCore.

willy-b commented 8 years ago

Almost ready for review. Just pending a couple test additions and updates:

willy-b commented 8 years ago

Thanks for the review. Addressed your comments, let me know if you need anything else

ryanxcharles commented 8 years ago

Project has been rearchitected - PR no longer applies.