mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
token_list: fixed usize conversion error on search_decimal
This commit is contained in:
@@ -37,6 +37,7 @@ impl TokenList {
|
||||
if item["symbol"] == symbol.to_uppercase() {
|
||||
let decimals = item["decimals"].clone();
|
||||
let decimals = decimals.as_u64().ok_or(Error::TokenParseError)?;
|
||||
let decimals = decimals as usize;
|
||||
return Ok(decimals);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user