1
0
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:
Frankie 2016-07-07 12:39:07 -07:00
parent 0a6560bd5d
commit cd8ae4b5ff
2 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@ const Component = require('react').Component
const h = require('react-hyperscript')
const inherits = require('util').inherits
const formatBalance = require('../util').formatBalance
const mainBalanceObject = require('../util').mainBalanceObject
const generateBalanceObject = require('../util').generateBalanceObject
const Tooltip = require('./tooltip.js')
module.exports = EthBalanceComponent
@ -31,7 +31,7 @@ EthBalanceComponent.prototype.render = function () {
}
EthBalanceComponent.prototype.renderBalance = function (value) {
if (value === 'None') return value
var balanceObj = mainBalanceObject(value)
var balanceObj = generateBalanceObject(value)
var balance = balanceObj.balance
var label = balanceObj.label

View File

@ -26,7 +26,7 @@ module.exports = {
numericBalance: numericBalance,
parseBalance: parseBalance,
formatBalance: formatBalance,
mainBalanceObject: mainBalanceObject,
generateBalanceObject: generateBalanceObject,
dataSize: dataSize,
readableDate: readableDate,
ethToWei: ethToWei,
@ -118,7 +118,7 @@ function formatBalance (balance, decimalsToKeep) {
return formatted
}
function mainBalanceObject (formattedBalance) {
function generateBalanceObject (formattedBalance) {
var balance = formattedBalance.split(' ')[0]
var label = formattedBalance.split(' ')[1]
var beforeDecimal = balance.split('.')[0]