Skip to content

Commit cf5d153

Browse files
committed
Remove TODOs
1 parent 8f46ce7 commit cf5d153

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

core-rust/mesh-api-server/src/mesh_api/conversions/addressing.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ pub fn to_api_account_identifier_from_global_address(
7676
let node_id: &NodeId = address.as_ref();
7777
let address = to_api_entity_address(mapping_context, node_id)?;
7878

79-
// TODO:MESH remove account filtering
8079
if !node_id.is_global_account() {
8180
return Err(MappingError::InvalidAccount {
8281
message: format!("address {} is not an account", address),

core-rust/mesh-api-server/src/mesh_api/conversions/operations.rs

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,6 @@ pub(crate) enum MeshApiOperationStatus {
2020
Failure,
2121
}
2222

23-
// TODO:MESH This one might be confusing. Failed transaction will still have successful FeePayment
24-
// operation
25-
impl From<DetailedTransactionOutcome> for MeshApiOperationStatus {
26-
fn from(value: DetailedTransactionOutcome) -> Self {
27-
match value {
28-
DetailedTransactionOutcome::Success(..) => Self::Success,
29-
DetailedTransactionOutcome::Failure(..) => Self::Failure,
30-
}
31-
}
32-
}
33-
3423
impl From<MeshApiOperationStatus> for models::OperationStatus {
3524
fn from(value: MeshApiOperationStatus) -> Self {
3625
let successful = match value {
@@ -50,7 +39,6 @@ pub fn to_mesh_api_operation_no_fee(
5039
resource_address: &ResourceAddress,
5140
amount: Decimal,
5241
) -> Result<models::Operation, MappingError> {
53-
// TODO:MESH what about fee locking, burning, minting?
5442
let op_type = if amount.is_positive() {
5543
MeshApiOperationType::Deposit
5644
} else {
@@ -110,7 +98,11 @@ pub fn to_mesh_api_operations(
11098
state_version.number()
11199
),
112100
})?;
113-
let status = MeshApiOperationStatus::from(local_execution.outcome);
101+
let operation_status = match local_execution.outcome {
102+
DetailedTransactionOutcome::Success(..) => MeshApiOperationStatus::Success,
103+
DetailedTransactionOutcome::Failure(..) => MeshApiOperationStatus::Failure,
104+
};
105+
114106
let fee_balance_changes =
115107
resolve_global_fee_balance_changes(database, &local_execution.fee_source)?;
116108

@@ -158,7 +150,7 @@ pub fn to_mesh_api_operations(
158150
mapping_context,
159151
database,
160152
output.len() as i64,
161-
Some(status),
153+
Some(operation_status),
162154
entity,
163155
resource_address,
164156
*amount,

0 commit comments

Comments
 (0)