This repository was archived by the owner on Mar 28, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -2119,24 +2119,16 @@ func (l *Listing) validateCryptocurrencyListing() error {
2119
2119
return ErrListingCryptoCurrencyCodeInvalid
2120
2120
}
2121
2121
2122
- var cryptoDivisibility uint
2123
- switch listing .Metadata .Version {
2124
- case 5 :
2125
- cryptoDivisibility = uint (listing .Metadata .CryptoDivisibility )
2126
- default :
2127
- if listing .Metadata .CryptoDivisibility != 0 {
2128
- cryptoDivisibility = uint (math .Log10 (float64 (listing .Metadata .CryptoDivisibility )))
2129
- }
2130
- }
2122
+
2123
+ cryptoDivisibility := l .GetCryptoDivisibility ()
2131
2124
if cryptoDivisibility == 0 {
2132
2125
return ErrListingCryptoDivisibilityInvalid
2133
2126
}
2134
2127
localDef , err := AllCurrencies ().Lookup (listing .Metadata .CryptoCurrencyCode )
2135
2128
if err != nil {
2136
2129
return ErrCurrencyDefinitionUndefined
2137
2130
}
2138
- if cryptoDivisibility != localDef .Divisibility {
2139
- log .Info ("***" , cryptoDivisibility , localDef .Divisibility )
2131
+ if uint (cryptoDivisibility ) != localDef .Divisibility {
2140
2132
return ErrListingCryptoDivisibilityInvalid
2141
2133
}
2142
2134
return nil
You can’t perform that action at this time.
0 commit comments