File tree 2 files changed +4
-1
lines changed
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,9 @@ export const resolveImports = async code => {
45
45
const addressMap = { }
46
46
const importList = extractImports ( fixShorthandImports ( code ) )
47
47
for ( const key in importList ) {
48
- if ( defaultsByName [ key ] ) {
48
+ if ( importList [ key ] && importList [ key ] . toLowerCase ( ) . startsWith ( "0x" ) && importList [ key ] . length === 18 ) {
49
+ addressMap [ key ] = importList [ key ]
50
+ } else if ( defaultsByName [ key ] && ! ( importList [ key ] && importList [ key ] === '"DYNAMIC"' ) ) {
49
51
addressMap [ key ] = defaultsByName [ key ]
50
52
} else {
51
53
const address = await getContractAddress ( key )
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ export {
23
23
getScriptCode ,
24
24
getContractCode ,
25
25
getTransactionCode ,
26
+ defaultsByName ,
26
27
} from "./file"
27
28
export { sendTransaction , executeScript } from "./interaction"
28
29
export { getFlowBalance , mintFlow } from "./flow-token"
You can’t perform that action at this time.
0 commit comments