@@ -10,7 +10,7 @@ use sp_io::TestExternalities;
1010use sp_runtime:: { traits:: Convert , AccountId32 , BuildStorage } ;
1111use xcm:: {
1212 v3,
13- v4 :: { Asset , Location } ,
13+ v5 :: { Asset , Location } ,
1414} ;
1515use xcm_simulator:: { decl_test_network, decl_test_parachain, decl_test_relay_chain, TestExt } ;
1616
@@ -109,12 +109,12 @@ impl Convert<CurrencyId, Option<Location>> for CurrencyIdConvert {
109109 ) ,
110110 CurrencyId :: RegisteredAsset ( id) => AssetRegistry :: location ( & id) . unwrap_or_default ( ) ,
111111 } ;
112- loc. and_then ( |l| l. try_into ( ) . ok ( ) )
112+ loc. and_then ( |l| l. into_versioned ( ) . try_into ( ) . ok ( ) )
113113 }
114114}
115115impl Convert < Location , Option < CurrencyId > > for CurrencyIdConvert {
116116 fn convert ( l : Location ) -> Option < CurrencyId > {
117- use xcm:: v4 :: Junction :: * ;
117+ use xcm:: v5 :: Junction :: * ;
118118
119119 let a: Vec < u8 > = "A" . into ( ) ;
120120 let a1: Vec < u8 > = "A1" . into ( ) ;
@@ -147,14 +147,14 @@ impl Convert<Location, Option<CurrencyId>> for CurrencyIdConvert {
147147 _ => None ,
148148 } ;
149149 currency_id. or_else ( || {
150- let loc = v3:: Location :: try_from ( l. clone ( ) ) . ok ( ) ?;
150+ let loc = v3:: Location :: try_from ( l. into_versioned ( ) ) . ok ( ) ?;
151151 AssetRegistry :: location_to_asset_id ( & loc) . map ( CurrencyId :: RegisteredAsset )
152152 } )
153153 }
154154}
155155impl Convert < Asset , Option < CurrencyId > > for CurrencyIdConvert {
156156 fn convert ( a : Asset ) -> Option < CurrencyId > {
157- use xcm:: v4 :: prelude:: * ;
157+ use xcm:: v5 :: prelude:: * ;
158158 if let Asset {
159159 fun : Fungible ( _) ,
160160 id : AssetId ( id) ,
0 commit comments