This commit is contained in:
2026-05-05 05:03:11 +02:00
parent 3e994995d7
commit f2c227e08f
132 changed files with 5767 additions and 4461 deletions

View File

@@ -43,7 +43,7 @@ impl KbChainTransactionDto {
transaction_json: std::string::String,
) -> Self {
let now = chrono::Utc::now();
Self {
return Self {
id: None,
signature,
slot,
@@ -55,7 +55,7 @@ impl KbChainTransactionDto {
transaction_json,
created_at: now,
updated_at: now,
}
};
}
}
@@ -73,9 +73,9 @@ impl TryFrom<crate::KbChainTransactionEntity> for KbChainTransactionDto {
"cannot convert chain transaction slot '{}' to u64: {}",
slot, error
)));
}
},
}
}
},
None => None,
};
let created_at_result = chrono::DateTime::parse_from_rfc3339(&entity.created_at);
@@ -86,7 +86,7 @@ impl TryFrom<crate::KbChainTransactionEntity> for KbChainTransactionDto {
"cannot parse chain transaction created_at '{}': {}",
entity.created_at, error
)));
}
},
};
let updated_at_result = chrono::DateTime::parse_from_rfc3339(&entity.updated_at);
let updated_at = match updated_at_result {
@@ -96,9 +96,9 @@ impl TryFrom<crate::KbChainTransactionEntity> for KbChainTransactionDto {
"cannot parse chain transaction updated_at '{}': {}",
entity.updated_at, error
)));
}
},
};
Ok(Self {
return Ok(Self {
id: Some(entity.id),
signature: entity.signature,
slot,
@@ -110,6 +110,6 @@ impl TryFrom<crate::KbChainTransactionEntity> for KbChainTransactionDto {
transaction_json: entity.transaction_json,
created_at,
updated_at,
})
});
}
}