@@ -22,7 +22,7 @@ use protocol::{bitcoin::{
2222 opcodes,
2323 taproot:: { ControlBlock , TaprootBuilder } ,
2424 Address , ScriptBuf , XOnlyPublicKey ,
25- } , prepare:: { is_magic_lock_time, TrackableOutput } , FullSpaceOut , Space } ;
25+ } , prepare:: { is_magic_lock_time, TrackableOutput } , Covenant , FullSpaceOut , Space } ;
2626use serde:: { ser:: SerializeSeq , Deserialize , Deserializer , Serialize , Serializer } ;
2727use protocol:: constants:: { BID_PSBT_INPUT_SEQUENCE , BID_PSBT_TX_LOCK_TIME } ;
2828use protocol:: hasher:: { KeyHasher , SpaceKey } ;
@@ -645,6 +645,9 @@ impl SpacesWallet {
645645 if spaceout. space . is_none ( ) {
646646 return Err ( anyhow ! ( "No associated space" ) ) ;
647647 }
648+ if !matches ! ( spaceout. space. as_ref( ) . unwrap( ) . covenant, Covenant :: Transfer { ..} ) {
649+ return Err ( anyhow:: anyhow!( "Space not registered" ) )
650+ }
648651
649652 let recipient = Self :: verify_listing_signature ( & listing, outpoint, TxOut {
650653 value : spaceout. value ,
@@ -706,6 +709,14 @@ impl SpacesWallet {
706709 None => return Err ( anyhow:: anyhow!( "Space not found" ) ) ,
707710 Some ( outpoint) => outpoint,
708711 } ;
712+ let spaceout = match src. get_spaceout ( & space_outpoint) ? {
713+ None => return Err ( anyhow:: anyhow!( "Space not found" ) ) ,
714+ Some ( spaceout) => spaceout,
715+ } ;
716+ if !matches ! ( spaceout. space. as_ref( ) . unwrap( ) . covenant, Covenant :: Transfer { ..} ) {
717+ return Err ( anyhow:: anyhow!( "Space not registered" ) )
718+ }
719+
709720 let utxo = match self . internal . get_utxo ( space_outpoint) {
710721 None => return Err ( anyhow:: anyhow!( "Wallet does not own a space with outpoint {}" , space_outpoint) ) ,
711722 Some ( utxo) => utxo
0 commit comments