File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,11 @@ export const fromMetadatum = (
121
121
const assetId = Cardano . AssetId . fromParts ( asset . policyId , asset . name ) ;
122
122
123
123
if ( version === '1.0' && ! name ) {
124
- name = AssetName . toUTF8 ( asset . name ) ;
124
+ try {
125
+ name = AssetName . toUTF8 ( asset . name ) ;
126
+ } catch ( error ) {
127
+ logger . warn ( error ) ;
128
+ }
125
129
}
126
130
127
131
if ( ! name || ! image ) {
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ AssetName.toUTF8 = (assetName: AssetName) => {
22
22
try {
23
23
return utf8Decoder . decode ( Buffer . from ( assetName , 'hex' ) ) ;
24
24
} catch ( error ) {
25
- throw new InvalidStringError ( ' Cannot convert AssetName to UTF8' , error ) ;
25
+ throw new InvalidStringError ( ` Cannot convert AssetName ' ${ assetName } ' to UTF8` , error ) ;
26
26
}
27
27
} ;
28
28
You can’t perform that action at this time.
0 commit comments