Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/wallet-daemon-new-auth-m…
Browse files Browse the repository at this point in the history
…ethod' into feature/wallet-daemon-new-auth-method
  • Loading branch information
ksrichard committed Feb 14, 2025
2 parents 718d749 + 2566992 commit 084e5c9
Show file tree
Hide file tree
Showing 25 changed files with 25 additions and 279 deletions.
2 changes: 0 additions & 2 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion applications/tari_dan_app_utilities/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ tari_transaction = { workspace = true }
tari_bor = { workspace = true, default-features = true }
tari_indexer_lib = { workspace = true }
tari_networking = { workspace = true }
tari_validator_node_rpc = { workspace = true }

anyhow = { workspace = true }
async-trait = { workspace = true }
Expand Down
192 changes: 0 additions & 192 deletions applications/tari_dan_app_utilities/src/json_encoding.rs

This file was deleted.

1 change: 0 additions & 1 deletion applications/tari_dan_app_utilities/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
pub mod common;
pub mod configuration;
pub mod epoch_oracle_config;
pub mod json_encoding;
pub mod keypair;
pub mod p2p_config;
pub mod seed_peer;
Expand Down
18 changes: 0 additions & 18 deletions applications/tari_dan_wallet_daemon/src/handlers/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use anyhow::anyhow;
use axum_jrpc::error::{JsonRpcError, JsonRpcErrorReason};
use futures::{future, future::Either};
use log::*;
use tari_dan_app_utilities::json_encoding;
use tari_dan_common_types::{optional::Optional, Epoch};
use tari_dan_wallet_sdk::apis::{jwt::JrpcPermission, key_manager};
use tari_template_lib::{args, models::Amount};
Expand Down Expand Up @@ -226,12 +225,9 @@ pub async fn handle_submit_dry_run(
.submit_dry_run_transaction(transaction, autofill_inputs)
.await?;

let json_result = json_encoding::encode_finalize_result_into_json(&exec_result.finalize)?;

Ok(TransactionSubmitDryRunResponse {
transaction_id: exec_result.finalize.transaction_hash.into_array().into(),
result: exec_result,
json_result,
})
}

Expand Down Expand Up @@ -296,17 +292,10 @@ pub async fn handle_get_result(
.optional()?
.ok_or(HandlerError::NotFound)?;

let json_result = transaction
.finalize
.as_ref()
.map(json_encoding::encode_finalize_result_into_json)
.transpose()?;

Ok(TransactionGetResultResponse {
transaction_id: req.transaction_id,
result: transaction.finalize,
status: transaction.status,
json_result,
})
}

Expand All @@ -328,15 +317,12 @@ pub async fn handle_wait_result(
.ok_or(HandlerError::NotFound)?;

if let Some(result) = transaction.finalize {
let json_result = json_encoding::encode_finalize_result_into_json(&result)?;

return Ok(TransactionWaitResultResponse {
transaction_id: req.transaction_id,
result: Some(result),
status: transaction.status,
final_fee: transaction.final_fee.unwrap_or_default(),
timed_out: false,
json_result: Some(json_result),
});
}

Expand All @@ -359,14 +345,12 @@ pub async fn handle_wait_result(

match evt_or_timeout {
Some(WalletEvent::TransactionFinalized(event)) if event.transaction_id == req.transaction_id => {
let json_result = json_encoding::encode_finalize_result_into_json(&event.finalize)?;
return Ok(TransactionWaitResultResponse {
transaction_id: req.transaction_id,
result: Some(event.finalize),
status: event.status,
final_fee: event.final_fee,
timed_out: false,
json_result: Some(json_result),
});
},
Some(WalletEvent::TransactionInvalid(event)) if event.transaction_id == req.transaction_id => {
Expand All @@ -376,7 +360,6 @@ pub async fn handle_wait_result(
status: event.status,
final_fee: event.final_fee.unwrap_or_default(),
timed_out: false,
json_result: None,
});
},
Some(_) => continue,
Expand All @@ -387,7 +370,6 @@ pub async fn handle_wait_result(
status: transaction.status,
final_fee: Amount::zero(),
timed_out: true,
json_result: None,
});
},
};
Expand Down
2 changes: 0 additions & 2 deletions applications/tari_dan_wallet_daemon/src/indexer_jrpc_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,12 @@ fn convert_indexer_result_to_wallet_result(result: IndexerTransactionFinalizedRe
finalized_time,
execution_time,
abort_details,
json_results,
} => TransactionFinalizedResult::Finalized {
final_decision,
execution_result,
execution_time,
finalized_time,
abort_details,
json_results,
},
}
}
4 changes: 2 additions & 2 deletions applications/tari_dan_wallet_web_ui/package-lock.json

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

Loading

0 comments on commit 084e5c9

Please sign in to comment.