-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consolidated AssetType and AssetData models
- Loading branch information
Thomas Luijken
committed
Sep 10, 2024
1 parent
3be9aef
commit 4486f36
Showing
13 changed files
with
79 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/// Contains the details of a non-native asset. | ||
#[derive(Clone, PartialEq, Debug, Default)] | ||
pub struct AssetData { | ||
pub asset_code: String, | ||
pub asset_issuer: String, | ||
} | ||
|
||
/// Represents the asset type of an asset. | ||
#[derive(Default, Clone, PartialEq, Debug)] | ||
pub enum AssetType { | ||
/// A native asset_type type. It holds no value. | ||
#[default] | ||
Native, | ||
/// An alphanumeric 4 asset_type type. It holds an Asset struct with asset code and asset issuer. | ||
Alphanumeric4(AssetData), | ||
/// An alphanumeric 12 asset_type type. It holds an Asset struct with asset code and asset issuer. | ||
Alphanumeric12(AssetData), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.