Skip to content

Commit

Permalink
chore: update namada to 0.36.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszjasiuk committed May 22, 2024
1 parent 9c7d9fa commit 2d8f723
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 20 deletions.
22 changes: 11 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ axum-macros = "0.3.8"
chrono = { version = "0.4.30", features = ["serde"] }
async-trait = "0.1.73"
anyhow = "1.0.75"
namada_core = { git = "https://github.com/anoma/namada", tag = "v0.35.1" }
namada_sdk = { git = "https://github.com/anoma/namada", tag = "v0.35.1" }
namada_tx = { git = "https://github.com/anoma/namada", tag = "v0.35.1" }
namada_governance = { git = "https://github.com/anoma/namada", tag = "v0.35.1" }
namada_ibc = { git = "https://github.com/anoma/namada", tag = "v0.35.1" }
namada_token = { git = "https://github.com/anoma/namada", tag = "v0.35.1" }
tendermint = "0.35.0"
tendermint-config = "0.35.0"
tendermint-rpc = { version = "0.35.0", features = ["http-client"] }
tendermint-proto = "0.35.0"
namada_core = { git = "https://github.com/anoma/namada", tag = "v0.36.0" }
namada_sdk = { git = "https://github.com/anoma/namada", tag = "v0.36.0" }
namada_tx = { git = "https://github.com/anoma/namada", tag = "v0.36.0" }
namada_governance = { git = "https://github.com/anoma/namada", tag = "v0.36.0" }
namada_ibc = { git = "https://github.com/anoma/namada", tag = "v0.36.0" }
namada_token = { git = "https://github.com/anoma/namada", tag = "v0.36.0" }
tendermint = "0.36.0"
tendermint-config = "0.36.0"
tendermint-rpc = { version = "0.36.0", features = ["http-client"] }
tendermint-proto = "0.36.0"
subtle-encoding = "0.5.1"
bimap = { version = "0.6.3", features = ["serde"] }
async-stream = "0.3.5"
Expand Down Expand Up @@ -76,4 +76,4 @@ derive_builder = "0.12.0"
clap-verbosity-flag = "2.1.1"
duration-str = "0.7.1"
fake = { version = "2.9.2", features = ["derive"] }
rand = "0.8.5"
rand = "0.8.5"
4 changes: 2 additions & 2 deletions shared/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ bimap.workspace = true
futures-core.workspace = true
futures-util.workspace = true
futures.workspace = true
namada_core = { git = "https://github.com/anoma/namada", tag = "v0.35.1", features = ["testing"]}
namada_core = { git = "https://github.com/anoma/namada", tag = "v0.36.0", features = ["testing"]}
namada_governance.workspace = true
namada_ibc.workspace = true
namada_sdk.workspace = true
Expand All @@ -34,4 +34,4 @@ tokio-retry.workspace = true
tokio.workspace = true
tracing.workspace = true
fake.workspace = true
rand.workspace = true
rand.workspace = true
8 changes: 4 additions & 4 deletions shared/src/block_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ impl From<TendermintBlockResultResponse> for BlockResult {
BTreeMap::default(),
|mut acc, attribute| {
acc.insert(
attribute.key.clone(),
attribute.value.clone(),
String::from(attribute.key_str().unwrap()),
String::from(attribute.value_str().unwrap()),
);
acc
},
Expand All @@ -129,8 +129,8 @@ impl From<TendermintBlockResultResponse> for BlockResult {
BTreeMap::default(),
|mut acc, attribute| {
acc.insert(
attribute.key.clone(),
attribute.value.clone(),
String::from(attribute.key_str().unwrap()),
String::from(attribute.value_str().unwrap()),
);
acc
},
Expand Down
11 changes: 8 additions & 3 deletions shared/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ impl Transaction {
let raw_hash_str = raw_hash.to_string();
let wrapper_tx_status =
block_results.find_tx_hash_result(&tx_id).unwrap();
let memo = transaction.memo();

let commitments =
transaction.first_commitments().unwrap().to_owned();

let memo = transaction.memo(&commitments);
let fee = Fee {
gas: Uint::from(wrapper.gas_limit).to_string(),
gas_payer: Id::from(wrapper.pk),
Expand Down Expand Up @@ -161,7 +165,7 @@ impl Transaction {
};

let tx_code_id = transaction
.get_section(transaction.code_sechash())
.get_section(commitments.code_sechash())
.and_then(|s| s.code_sec())
.map(|s| s.code.hash().0)
.map(|bytes| {
Expand All @@ -188,7 +192,8 @@ impl Transaction {

let tx_kind = if let Some(id) = tx_code_id {
if let Some(tx_kind_name) = checksums.get_name_by_id(&id) {
let tx_data = transaction.data().unwrap_or_default();
let tx_data =
transaction.data(&commitments).unwrap_or_default();
TransactionKind::from(&tx_kind_name, &tx_data)
} else {
TransactionKind::Unknown
Expand Down

0 comments on commit 2d8f723

Please sign in to comment.