@@ -180,6 +180,12 @@ export class Utils implements BaseUtils {
180180
181181 //Check for Byron-era address
182182 try {
183+ // Reject Daedalus wallet addresses (Byron-era addresses starting with "DdzFF")
184+ if ( address . startsWith ( 'DdzFF' ) ) {
185+ console . log ( `Rejecting Daedalus wallet address: ${ address } ` ) ;
186+ return false ;
187+ }
188+
183189 const decoded = bs58 . decode ( address ) ;
184190 const cborData = cbor . decodeFirstSync ( decoded ) ;
185191 return Array . isArray ( cborData ) && cborData . length >= 2 ;
@@ -270,6 +276,11 @@ export class Utils implements BaseUtils {
270276
271277 // Try decoding as a Byron (base58) address later
272278 try {
279+ // Reject Daedalus wallet addresses (Byron-era addresses starting with "DdzFF")
280+ if ( address . startsWith ( 'DdzFF' ) ) {
281+ throw new InvalidAddressError ( 'Provided string is a Daedalus address' ) ;
282+ }
283+
273284 return ByronAddress . from_base58 ( address ) . to_address ( ) ;
274285 } catch ( e ) {
275286 console . error ( `Could not decode byron address from string '${ address } '` ) ;
@@ -295,9 +306,12 @@ export class Utils implements BaseUtils {
295306 return address . to_bech32 ( ) ;
296307 }
297308
298- // If not Shelley, try Byron
299309 const byronAddress = ByronAddress . from_address ( address ) ;
310+ // Reject Daedalus wallet addresses (Byron-era addresses starting with "DdzFF")
300311 if ( byronAddress ) {
312+ if ( byronAddress . to_base58 ( ) . startsWith ( 'DdzFF' ) ) {
313+ throw new InvalidAddressError ( 'Provided address is a Daedalus address' ) ;
314+ }
301315 return byronAddress . to_base58 ( ) ;
302316 }
303317
0 commit comments