-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Move Signer balance queries to store for component-wide re-use #3531
Conversation
Although it's only a small part of cleaning up the signer, it looks good! 👍 |
} | ||
|
||
fetchBalances (addresses) { | ||
addresses.forEach((address) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use of MobX transaction
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NM, transaction isn't for async...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, as soon as you bring a promise in the transaction doesn't quite work - can only use it where setting the values, not wrapping a Promise. (Tried the former in my first attempt, however useStrict
doesn't like that approach at all.)
Signer additions, 2 of n... Follow practices elsewhere where APIs are localised to stores, DRY-ing up queries, all within a single store.
Closes https://github.com/ethcore/parity/issues/3523