Skip to content

Commit

Permalink
cr fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Giems committed Aug 20, 2024
1 parent f78cf6e commit bc3d8de
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ semver = "1.0.16"
spinners = "4.1.0"
include_dir = "0.7.3"

odin = { git = "ssh://[email protected]/nightly-labs/alexandria.git", rev = "017d52bca2e11f6cdd98fe5fc5186e01b95c730f", package = "odin" }
odin = { git = "ssh://[email protected]/nightly-labs/alexandria.git", rev = "bd401bc3807bba5bb5203f42cc7b8cf836be83f5", package = "odin" }

[patch.crates-io]
quinn-proto = { git = "https://github.com/quinn-rs/quinn.git", rev = "f0fa66f871b80b9d2d7075d76967c649aecc0b77" }
8 changes: 2 additions & 6 deletions crates/sui-indexer/src/handlers/checkpoint_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1145,8 +1145,7 @@ pub fn generate_updates_from_checkpoint_data(
.or_insert_with(Vec::new)
.push(SuiIndexerNotification::CoinSwap(CoinSwap {
sui_address: sui_address.clone(),
spent_token_type: base_coin_type.to_string(),
spent_amount: -base_amount,
spent: vec![(base_coin_type.to_string(), -base_amount)],
received: vec![(quote_coin_type.to_string(), quote_amount)],
}));
}
Expand Down Expand Up @@ -1216,15 +1215,12 @@ pub fn generate_updates_from_checkpoint_data(
}

// 3.
let (base_coin_type, base_amount) = negative_changes.remove(0);

notifications
.entry(transaction_id)
.or_insert_with(Vec::new)
.push(SuiIndexerNotification::CoinSwap(CoinSwap {
sui_address: sui_address.clone(),
spent_token_type: base_coin_type.clone(),
spent_amount: -base_amount,
spent: negative_changes,
received: positive_changes,
}));
}
Expand Down

0 comments on commit bc3d8de

Please sign in to comment.