Skip to content

Commit

Permalink
[chore]: Removed unnecessary TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
woxjro committed Jan 13, 2024
1 parent 101d7e0 commit df98ce3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ impl App {
if let Err(e) = io_tx.send(action) {
self.is_loading = false;
println!("Error from dispatch {}", e);
// TODO: handle error
};
}
}
Expand Down
7 changes: 3 additions & 4 deletions src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ impl<'a> Network<'a> {
Self::get_latest_transactions(self.endpoint, n),
)
.await
.unwrap(); //TODO: remove unwrap
.unwrap();
let mut addresses = vec![];
for transaction in &transactions {
addresses.push(transaction.transaction.from);
Expand Down Expand Up @@ -305,7 +305,6 @@ impl<'a> Network<'a> {
}
}

//TODO: use `join`
async fn get_name_info(
endpoint: &'a str,
ens_id: &str,
Expand All @@ -314,8 +313,8 @@ impl<'a> Network<'a> {
let address = provider.resolve_name(ens_id).await?;

let avatar_url = provider.resolve_avatar(ens_id).await.ok();
let balance = provider.get_balance(address, None /* TODO */).await?;
//TODO: Not Found (impl LazyEtherscanError)
let balance = provider.get_balance(address, None).await?;

Ok(Some(AddressInfo {
address,
balance,
Expand Down
2 changes: 1 addition & 1 deletion src/ui/home/block/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ fn create_row<'a>(
Cell::from(format!("{}", tx.hash)).fg(Color::White),
if tx.to.is_some() {
if tx.input.len() >= 4 {
Cell::from("ContractExecution").fg(Color::LightYellow) //TODO
Cell::from("ContractExecution").fg(Color::LightYellow)
} else {
Cell::from("Transfer").fg(Color::LightMagenta)
}
Expand Down
8 changes: 4 additions & 4 deletions src/ui/home/latest_status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub fn render<B: Backend>(f: &mut Frame<B>, app: &mut App, rect: Rect) {

let header = vec![
ListItem::new(format!(
" {:^12} | {:^11} | {:^12} | {:^13} |", //TODO: remove these magic numbers
" {:^12} | {:^11} | {:^12} | {:^13} |",
"Block Height", "Hash", "Transactions", "Time"
)),
ListItem::new(format!(
Expand All @@ -53,7 +53,7 @@ pub fn render<B: Backend>(f: &mut Frame<B>, app: &mut App, rect: Rect) {
"-".repeat(13),
"-".repeat(14),
"-".repeat(15),
)), //TODO: remove these magic numbers
)),
];
let block_list = if let Some(latest_blocks) = app.latest_blocks.as_ref() {
let mut res = header;
Expand All @@ -65,7 +65,7 @@ pub fn render<B: Backend>(f: &mut Frame<B>, app: &mut App, rect: Rect) {
} = block_with_transaction_receipts;

res.push(ListItem::new(format!(
"{:>13} | {:>12} | {:>7} txns | {:>4} secs ago |", //TODO: remove these magic numbers
"{:>13} | {:>12} | {:>7} txns | {:>4} secs ago |",
block.number.unwrap(),
block.hash.unwrap(),
block.transactions.len(),
Expand Down Expand Up @@ -95,7 +95,7 @@ pub fn render<B: Backend>(f: &mut Frame<B>, app: &mut App, rect: Rect) {

let header = vec![
ListItem::new(format!(
"{:^22} | {:^22} | {:^11} |", //TODO: remove these magic numbers
"{:^22} | {:^22} | {:^11} |",
"From", "To", "Value (ETH)"
)),
ListItem::new(format!(
Expand Down

0 comments on commit df98ce3

Please sign in to comment.