File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
javascript/engine-js/src/repo/sources Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export class ScriptURI implements SourceInterface {
25
25
if ( ! uris )
26
26
throw new Error ( "ScriptURI is not set on this contract or chain" ) ;
27
27
28
- for ( const uri of uris ) {
28
+ for ( const [ index , uri ] of uris . entries ( ) ) {
29
29
30
30
const tokenScript = await this . context . getTokenScriptFromUrl ( uri ) ;
31
31
@@ -35,7 +35,8 @@ export class ScriptURI implements SourceInterface {
35
35
order : 0 ,
36
36
authenticated : true ,
37
37
sourceId : chain + "-" + contractAddr ,
38
- scriptId : "5169_" + tokenScript . getName ( ) ,
38
+ // The contracts first scriptUri acts as the default script. This is to be compatible with old data that uses tsId without a scriptId part.
39
+ scriptId : index > 0 ? "5169_" + tokenScript . getName ( ) : "" ,
39
40
sourceUrl : uri ,
40
41
type : ScriptSourceType . SCRIPT_URI
41
42
} ) ;
You can’t perform that action at this time.
0 commit comments