mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Change function name to generateBalanceObject
This commit is contained in:
parent
0a6560bd5d
commit
cd8ae4b5ff
@ -2,7 +2,7 @@ const Component = require('react').Component
|
|||||||
const h = require('react-hyperscript')
|
const h = require('react-hyperscript')
|
||||||
const inherits = require('util').inherits
|
const inherits = require('util').inherits
|
||||||
const formatBalance = require('../util').formatBalance
|
const formatBalance = require('../util').formatBalance
|
||||||
const mainBalanceObject = require('../util').mainBalanceObject
|
const generateBalanceObject = require('../util').generateBalanceObject
|
||||||
const Tooltip = require('./tooltip.js')
|
const Tooltip = require('./tooltip.js')
|
||||||
module.exports = EthBalanceComponent
|
module.exports = EthBalanceComponent
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ EthBalanceComponent.prototype.render = function () {
|
|||||||
}
|
}
|
||||||
EthBalanceComponent.prototype.renderBalance = function (value) {
|
EthBalanceComponent.prototype.renderBalance = function (value) {
|
||||||
if (value === 'None') return value
|
if (value === 'None') return value
|
||||||
var balanceObj = mainBalanceObject(value)
|
var balanceObj = generateBalanceObject(value)
|
||||||
|
|
||||||
var balance = balanceObj.balance
|
var balance = balanceObj.balance
|
||||||
var label = balanceObj.label
|
var label = balanceObj.label
|
||||||
|
@ -26,7 +26,7 @@ module.exports = {
|
|||||||
numericBalance: numericBalance,
|
numericBalance: numericBalance,
|
||||||
parseBalance: parseBalance,
|
parseBalance: parseBalance,
|
||||||
formatBalance: formatBalance,
|
formatBalance: formatBalance,
|
||||||
mainBalanceObject: mainBalanceObject,
|
generateBalanceObject: generateBalanceObject,
|
||||||
dataSize: dataSize,
|
dataSize: dataSize,
|
||||||
readableDate: readableDate,
|
readableDate: readableDate,
|
||||||
ethToWei: ethToWei,
|
ethToWei: ethToWei,
|
||||||
@ -118,7 +118,7 @@ function formatBalance (balance, decimalsToKeep) {
|
|||||||
return formatted
|
return formatted
|
||||||
}
|
}
|
||||||
|
|
||||||
function mainBalanceObject (formattedBalance) {
|
function generateBalanceObject (formattedBalance) {
|
||||||
var balance = formattedBalance.split(' ')[0]
|
var balance = formattedBalance.split(' ')[0]
|
||||||
var label = formattedBalance.split(' ')[1]
|
var label = formattedBalance.split(' ')[1]
|
||||||
var beforeDecimal = balance.split('.')[0]
|
var beforeDecimal = balance.split('.')[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user