@@ -281,8 +281,9 @@ pub mod pallet {
281
281
282
282
let precision = SidechainPrecision :: < T > :: get ( network_id, & asset_id)
283
283
. ok_or ( Error :: < T > :: UnknownPrecision ) ?;
284
- let amount = T :: BalancePrecisionConverter :: from_sidechain ( & asset_id, precision, amount)
285
- . ok_or ( Error :: < T > :: WrongAmount ) ?;
284
+ let ( amount, _) =
285
+ T :: BalancePrecisionConverter :: from_sidechain ( & asset_id, precision, amount)
286
+ . ok_or ( Error :: < T > :: WrongAmount ) ?;
286
287
ensure ! ( amount > Zero :: zero( ) , Error :: <T >:: WrongAmount ) ;
287
288
288
289
T :: BridgeAssetLocker :: unlock_asset (
@@ -366,7 +367,7 @@ pub mod pallet {
366
367
367
368
let sidechain_precision = T :: AssetRegistry :: get_raw_info ( asset_id. clone ( ) ) . precision ;
368
369
369
- let minimal_xcm_amount = T :: BalancePrecisionConverter :: to_sidechain (
370
+ let ( _ , minimal_xcm_amount) = T :: BalancePrecisionConverter :: to_sidechain (
370
371
& asset_id,
371
372
sidechain_precision,
372
373
minimal_xcm_amount,
@@ -403,7 +404,7 @@ pub mod pallet {
403
404
ensure_root ( origin) ?;
404
405
405
406
let asset_id = T :: AssetRegistry :: register_asset ( network_id. into ( ) , name, symbol) ?;
406
- let minimal_xcm_amount =
407
+ let ( _ , minimal_xcm_amount) =
407
408
T :: BalancePrecisionConverter :: to_sidechain ( & asset_id, decimals, minimal_xcm_amount)
408
409
. ok_or ( Error :: < T > :: WrongAmount ) ?;
409
410
@@ -500,7 +501,7 @@ pub mod pallet {
500
501
fail ! ( Error :: <T >:: UnknownPrecision ) ;
501
502
} ;
502
503
503
- let minimal_xcm_amount = T :: BalancePrecisionConverter :: to_sidechain (
504
+ let ( _ , minimal_xcm_amount) = T :: BalancePrecisionConverter :: to_sidechain (
504
505
& asset_id,
505
506
sidechain_precision,
506
507
minimal_xcm_amount,
@@ -588,7 +589,7 @@ pub mod pallet {
588
589
let precision = SidechainPrecision :: < T > :: get ( network_id, & asset_id)
589
590
. ok_or ( Error :: < T > :: UnknownPrecision ) ?;
590
591
591
- let sidechain_amount =
592
+ let ( amount , sidechain_amount) =
592
593
T :: BalancePrecisionConverter :: to_sidechain ( & asset_id, precision, amount. clone ( ) )
593
594
. ok_or ( Error :: < T > :: WrongAmount ) ?;
594
595
0 commit comments