Skip to content

Commit

Permalink
Update runtime/altair/src/migrations.rs
Browse files Browse the repository at this point in the history
Co-authored-by: William Freudenberger <[email protected]>
  • Loading branch information
NunoAlexandre and wischli authored May 16, 2023
1 parent 71bc587 commit ad08698
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions runtime/altair/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl OnRuntimeUpgrade for TrancheLocationMigration {
fn on_runtime_upgrade() -> Weight {
for (asset_id, metadata) in orml_asset_registry::Metadata::<Runtime>::iter() {
if matches!(asset_id, CurrencyId::Tranche(_, _)) && metadata.location.is_some() {
match OrmlAssetRegistry::do_update_asset(
OrmlAssetRegistry::do_update_asset(
asset_id,
// decimals
None,
Expand All @@ -42,9 +42,11 @@ impl OnRuntimeUpgrade for TrancheLocationMigration {
Some(None),
// additional
None,
) {
Err(e) => log::error!("TrancheLocationMigration: Failed to update asset with underlying error: {:?}", e),
_ => continue,
)
.map_err(|e| {
log::error!("TrancheLocationMigration: Failed to update asset with underlying error: {:?}", e);
})
.ok();
}
}
}
Expand Down

0 comments on commit ad08698

Please sign in to comment.