Skip to content

Commit

Permalink
fix: import genesis
Browse files Browse the repository at this point in the history
  • Loading branch information
crisdut committed Aug 8, 2023
1 parent aa97e02 commit e1ac176
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/rgb/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ pub fn contract_from_other_formats(
.expect("invalid strict serialized data");

match asset_type {
Some(asset_type) => {
let genesis = Genesis::from_strict_serialized::<{ U32 }>(confined)
.expect("invalid strict genesis data");
contract_from_genesis(genesis, asset_type, stock)
}
Some(asset_type) => match Genesis::from_strict_serialized::<{ U32 }>(confined.clone()) {
Ok(genesis) => contract_from_genesis(genesis, asset_type, stock),
Err(_) => Contract::from_strict_serialized::<{ U32 }>(confined)
.expect("invalid strict contract data"),
},
None => Contract::from_strict_serialized::<{ U32 }>(confined)
.expect("invalid strict contract data"),
}
Expand Down

0 comments on commit e1ac176

Please sign in to comment.