token_list: fixed usize conversion error on search_decimal

This commit is contained in:
lunar-mining
2021-09-30 17:46:10 +02:00
parent c784d0396c
commit 9b71f28f26

View File

@@ -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);
}
}