mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
token_list: disabled erroring code
This commit is contained in:
@@ -393,9 +393,9 @@ impl Darkfid {
|
||||
|
||||
let _token = token.as_str().unwrap();
|
||||
|
||||
//let token_vec = self.wallet.get_token_ids();
|
||||
let token_vec = self.client.lock().await.get_token_id().await;
|
||||
|
||||
//for (network_name, token_id) in self.drk_tokenlist.iter() {}
|
||||
//for (symbol, token_id) in self.drk_tokenlist.iter() {}
|
||||
|
||||
if address.as_str().is_none() {
|
||||
return JsonResult::Err(jsonerr(InvalidAddressParam, None, id));
|
||||
|
||||
@@ -77,13 +77,13 @@ pub struct DrkTokenList {
|
||||
impl DrkTokenList {
|
||||
pub fn new(list: SolTokenList) -> Result<Self> {
|
||||
let mut drk_tokenlist = HashMap::new();
|
||||
let symbols = list.clone().get_symbols()?;
|
||||
//let symbols = list.clone().get_symbols()?;
|
||||
|
||||
for symbol in symbols {
|
||||
let id = list.clone().search_id(&symbol)?;
|
||||
let drk_id = generate_id(&id, &NetworkName::Solana)?;
|
||||
drk_tokenlist.insert(symbol, drk_id);
|
||||
}
|
||||
//for symbol in symbols {
|
||||
// let id = list.clone().search_id(&symbol)?;
|
||||
// let drk_id = generate_id(&id, &NetworkName::Solana)?;
|
||||
// drk_tokenlist.insert(symbol, drk_id);
|
||||
//}
|
||||
// TODO: add btc_id, NetworkName::Bitcoin to drk_tokenlist
|
||||
Ok(Self { drk_tokenlist })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user