mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
token_list: use drk_tokenlist as a reference
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user