Skip to content

Commit

Permalink
Mark MemoData as optional
Browse files Browse the repository at this point in the history
  • Loading branch information
gemcoder21 committed Dec 30, 2023
1 parent 86197b2 commit dbd7539
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion blockchain/src/xrp/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,5 @@ pub struct TransactionMemo {
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct TransactionMemoData {
#[serde(rename = "MemoData")]
pub data: String,
pub data: Option<String>,
}
4 changes: 4 additions & 0 deletions parser/src/pusher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ impl Pusher {
title: format!("Stake {}", asset.symbol),
message: "".to_string(),
}),
TransactionType::StakeUndelegate => Ok(Message {
title: format!("Unstake {}", asset.symbol),
message: "".to_string(),
}),
TransactionType::StakeRewards => Ok(Message {
title: format!("Claim Rewards {}", asset.symbol),
message: "".to_string(),
Expand Down
1 change: 1 addition & 0 deletions primitives/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ impl Transaction {
}
TransactionType::TokenApproval
| TransactionType::StakeDelegate
| TransactionType::StakeUndelegate
| TransactionType::StakeRewards => vec![self.asset_id.clone().to_string()],
}
}
Expand Down
1 change: 1 addition & 0 deletions primitives/src/transaction_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pub enum TransactionType {
Swap,
TokenApproval,
StakeDelegate,
StakeUndelegate,
StakeRewards,
}

Expand Down
1 change: 1 addition & 0 deletions storage/src/models/transaction_addresses.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ impl TransactionAddresses {
primitives::TransactionType::Transfer
| primitives::TransactionType::TokenApproval
| primitives::TransactionType::StakeDelegate
| primitives::TransactionType::StakeUndelegate
| primitives::TransactionType::StakeRewards => transaction
.addresses()
.into_iter()
Expand Down

0 comments on commit dbd7539

Please sign in to comment.