token_list: use drk_tokenlist as a reference

This commit is contained in:
ghassmo
2021-10-12 12:45:33 +03:00
parent 1de9af5211
commit a541cd088e
2 changed files with 2 additions and 2 deletions

View File

@@ -154,7 +154,7 @@ impl Darkfid {
let network = "solana";
let mut data_vec: Vec<String> = Vec::new();
if let Some(symbol) = self.drk_tokenlist.clone().symbol_from_id(id)? {
if let Some(symbol) = self.drk_tokenlist.symbol_from_id(id)? {
let amount = encode_base10(*value, 8);
data_vec.push(amount);
data_vec.push(network.to_string());

View File

@@ -84,7 +84,7 @@ impl DrkTokenList {
}
}
pub fn symbol_from_id(self, id: jubjub::Fr) -> Result<Option<String>> {
pub fn symbol_from_id(&self, id: jubjub::Fr) -> Result<Option<String>> {
Ok(self
.tokens
.iter()