aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil/common.go
diff options
context:
space:
mode:
authorMaran <maran.hidskes@gmail.com>2014-05-20 20:53:34 +0800
committerMaran <maran.hidskes@gmail.com>2014-05-20 20:53:34 +0800
commit31e44c2ab959124cbcf2de45385373b9898727bc (patch)
treef9420d332af513f174b6b9608c485178d52a709e /ethutil/common.go
parentf5d441473499428964b75924845cf0c7bcaaa5ca (diff)
downloadgo-tangerine-31e44c2ab959124cbcf2de45385373b9898727bc.tar
go-tangerine-31e44c2ab959124cbcf2de45385373b9898727bc.tar.gz
go-tangerine-31e44c2ab959124cbcf2de45385373b9898727bc.tar.bz2
go-tangerine-31e44c2ab959124cbcf2de45385373b9898727bc.tar.lz
go-tangerine-31e44c2ab959124cbcf2de45385373b9898727bc.tar.xz
go-tangerine-31e44c2ab959124cbcf2de45385373b9898727bc.tar.zst
go-tangerine-31e44c2ab959124cbcf2de45385373b9898727bc.zip
Change shorthands
Diffstat (limited to 'ethutil/common.go')
-rw-r--r--ethutil/common.go26
1 files changed, 13 insertions, 13 deletions
diff --git a/ethutil/common.go b/ethutil/common.go
index 983ea5d1b..771dfc723 100644
--- a/ethutil/common.go
+++ b/ethutil/common.go
@@ -7,13 +7,13 @@ import (
// The different number of units
var (
- Ether = BigPow(10, 18)
- Finney = BigPow(10, 15)
- Szabo = BigPow(10, 12)
- Vita = BigPow(10, 9)
- Turing = BigPow(10, 6)
- Eins = BigPow(10, 3)
- Wei = big.NewInt(1)
+ Ether = BigPow(10, 18)
+ Finney = BigPow(10, 15)
+ Szabo = BigPow(10, 12)
+ Shannon = BigPow(10, 9)
+ Babbage = BigPow(10, 6)
+ Ada = BigPow(10, 3)
+ Wei = big.NewInt(1)
)
// Currency to string
@@ -27,12 +27,12 @@ func CurrencyToString(num *big.Int) string {
return fmt.Sprintf("%v Finney", new(big.Int).Div(num, Finney))
case num.Cmp(Szabo) >= 0:
return fmt.Sprintf("%v Szabo", new(big.Int).Div(num, Szabo))
- case num.Cmp(Vita) >= 0:
- return fmt.Sprintf("%v Vita", new(big.Int).Div(num, Vita))
- case num.Cmp(Turing) >= 0:
- return fmt.Sprintf("%v Turing", new(big.Int).Div(num, Turing))
- case num.Cmp(Eins) >= 0:
- return fmt.Sprintf("%v Eins", new(big.Int).Div(num, Eins))
+ case num.Cmp(Shannon) >= 0:
+ return fmt.Sprintf("%v Shannon", new(big.Int).Div(num, Shannon))
+ case num.Cmp(Babbage) >= 0:
+ return fmt.Sprintf("%v Babbage", new(big.Int).Div(num, Babbage))
+ case num.Cmp(Ada) >= 0:
+ return fmt.Sprintf("%v Ada", new(big.Int).Div(num, Ada))
}
return fmt.Sprintf("%v Wei", num)