mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
controllers - balance - update for eth-block-tracker@4
This commit is contained in:
parent
623533ab15
commit
32b3b8f2a7
@ -60,7 +60,7 @@ class BalanceController {
|
|||||||
* Sets up listeners and subscriptions which should trigger an update of ethBalance. These updates include:
|
* Sets up listeners and subscriptions which should trigger an update of ethBalance. These updates include:
|
||||||
* - when a transaction changes state to 'submitted', 'confirmed' or 'failed'
|
* - when a transaction changes state to 'submitted', 'confirmed' or 'failed'
|
||||||
* - when the current account changes (i.e. a new account is selected)
|
* - when the current account changes (i.e. a new account is selected)
|
||||||
* - when there is a block update
|
* - when there is a block update
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
*
|
*
|
||||||
@ -80,7 +80,7 @@ class BalanceController {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.accountTracker.store.subscribe(update)
|
this.accountTracker.store.subscribe(update)
|
||||||
this.blockTracker.on('block', update)
|
this.blockTracker.on('latest', update)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -100,7 +100,7 @@ class BalanceController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the pending transactions (i.e. those with a 'submitted' status). These are accessed from the
|
* Gets the pending transactions (i.e. those with a 'submitted' status). These are accessed from the
|
||||||
* TransactionController passed to this BalanceController during construction.
|
* TransactionController passed to this BalanceController during construction.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @returns {Promise<array>} Promises an array of transaction objects.
|
* @returns {Promise<array>} Promises an array of transaction objects.
|
||||||
|
Loading…
Reference in New Issue
Block a user