@@ -23,7 +23,7 @@ use commit_verify::mpc::MerkleBlock;
23
23
use rgb:: BlockchainResolver ;
24
24
use rgb_core:: validation:: Validity ;
25
25
use rgb_core:: { Operation , Assign , Anchor , TransitionBundle } ;
26
- use rgb_lib:: BitcoinNetwork ;
26
+ use rgb_lib:: { BitcoinNetwork , AssetSchema } ;
27
27
use rgb_lib:: utils:: { load_rgb_runtime, RgbRuntime } ;
28
28
use serde:: { Deserialize , Serialize } ;
29
29
use rgbstd:: Txid as RgbTxid ;
@@ -558,6 +558,11 @@ pub(crate) fn handle_funding(temporary_channel_id: &[u8; 32], funding_txid: Stri
558
558
let consignment_path = ldk_data_dir. join ( format ! ( "consignment_{}" , hex:: encode( temporary_channel_id) ) ) ;
559
559
fs:: write ( consignment_path. clone ( ) , consignment_bytes) . expect ( "unable to write file" ) ;
560
560
let consignment = Bindle :: < RgbTransfer > :: load ( consignment_path) . expect ( "successful consignment load" ) ;
561
+ let schema_id = consignment. schema_id ( ) . to_string ( ) ;
562
+ match AssetSchema :: from_schema_id ( schema_id) {
563
+ Ok ( AssetSchema :: Nia ) => { }
564
+ _ => return Err ( MsgHandleErrInternal :: send_err_msg_no_close ( "Unsupported RGB schema" . to_owned ( ) , * temporary_channel_id) )
565
+ }
561
566
let transfer: RgbTransfer = consignment. clone ( ) . unbindle ( ) ;
562
567
563
568
let mut runtime = get_rgb_runtime ( ldk_data_dir) ;
0 commit comments