@@ -20,17 +20,6 @@ pub(crate) enum MeshApiOperationStatus {
20
20
Failure ,
21
21
}
22
22
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
-
34
23
impl From < MeshApiOperationStatus > for models:: OperationStatus {
35
24
fn from ( value : MeshApiOperationStatus ) -> Self {
36
25
let successful = match value {
@@ -50,7 +39,6 @@ pub fn to_mesh_api_operation_no_fee(
50
39
resource_address : & ResourceAddress ,
51
40
amount : Decimal ,
52
41
) -> Result < models:: Operation , MappingError > {
53
- // TODO:MESH what about fee locking, burning, minting?
54
42
let op_type = if amount. is_positive ( ) {
55
43
MeshApiOperationType :: Deposit
56
44
} else {
@@ -110,7 +98,11 @@ pub fn to_mesh_api_operations(
110
98
state_version. number( )
111
99
) ,
112
100
} ) ?;
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
+
114
106
let fee_balance_changes =
115
107
resolve_global_fee_balance_changes ( database, & local_execution. fee_source ) ?;
116
108
@@ -158,7 +150,7 @@ pub fn to_mesh_api_operations(
158
150
mapping_context,
159
151
database,
160
152
output. len ( ) as i64 ,
161
- Some ( status ) ,
153
+ Some ( operation_status ) ,
162
154
entity,
163
155
resource_address,
164
156
* amount,
0 commit comments