Skip to content

Commit

Permalink
resolve commenst and add token_accounts for indexing in test fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
Nagaprasadvr committed Nov 28, 2024
1 parent 45cefbc commit fc78fa4
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
5 changes: 2 additions & 3 deletions digital_asset_types/src/dapi/common/asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,8 @@ pub fn asset_to_rpc(asset: FullAsset, options: &Options) -> Result<RpcAsset, DbE
_ => None,
};

let token_info = if options.show_fungible && token_info.is_some() {
let token_info = token_info.unwrap();
Some(TokenInfo {
let token_info = if options.show_fungible {
token_info.map(|token_info| TokenInfo {
supply: token_info.supply.try_into().unwrap_or(0),
decimals: token_info.decimals as u8,
mint_authority: token_info
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ async fn test_get_asset_with_show_fungible_scenario_1() {
let seeds: Vec<SeedEvent> = seed_accounts([
"Ca84nWhQu41DMRnjdhRrLZty1i9txepMhAhz5qLLGcBw",
"7z6b5TE4WX4mgcQjuNBTDxK4SE75sbgEg5WWJwoUeie8",
"8myaCN6KcKVkMqroXuLJq6QsqRcPbvme4wV5Ubfr5mDC",
]);

apply_migrations_and_delete_data(setup.db.clone()).await;
Expand Down Expand Up @@ -61,6 +62,7 @@ async fn test_get_asset_with_show_fungible_scenario_2() {
let seeds: Vec<SeedEvent> = seed_accounts([
"AH6wj7T8Ke5nbukjtcobjjs1CDWUcQxndtnLkKAdrSrM",
"7fXKY9tPpvYsdbSNyesUqo27WYC6ZsBEULdtngGHqLCK",
"8Xv3SpX94HHf32Apg4TeSeS3i2p6wuXeE8FBZr168Hti",
]);

apply_migrations_and_delete_data(setup.db.clone()).await;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ snapshot_kind: text
}
],
"ownership": {
"frozen": false,
"frozen": true,
"delegated": false,
"delegate": null,
"ownership_model": "single",
"owner": ""
"owner": "J1ep1LizHMU3Bf1GKkWePGHU3Qwwzw6FvwW5ySFWdCkn"
},
"supply": null,
"mutable": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ snapshot_kind: text
}
],
"ownership": {
"frozen": false,
"delegated": false,
"delegate": null,
"frozen": true,
"delegated": true,
"delegate": "BPB5idZgbA1DG4XEmnKs62AADRZFf3jY7Kr9mpMGyKPi",
"ownership_model": "single",
"owner": ""
"owner": "GqPnSDXwp4JFtKS7YZ2HERgBbYLKpKVYy9TpVunzLRa9"
},
"supply": null,
"mutable": true,
Expand Down

0 comments on commit fc78fa4

Please sign in to comment.