Skip to content

Commit

Permalink
fix: multiline match in idl strip regex
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgenbuilder committed Dec 7, 2022
1 parent 5c55917 commit 03f259c
Show file tree
Hide file tree
Showing 3 changed files with 924 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/sandbox/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function stripIdl(idl: string) {
return (
idl
// Remove extraneous export from interface file
.replace(/export const init = \(\{ IDL \}\) => \{.+\}/, '')
.replace(/export const init = \(\{ IDL \}\) => \{.+\}/s, '')
// Coerce export into a simple return statement for us to eval
.replace(
'export const idlFactory = ({ IDL }) =>',
Expand Down
2 changes: 2 additions & 0 deletions src/stubs/interfaces/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import { default as dscvr_analytics } from './27iad-5iaaa-aaaah-qbr5q-cai';
import { default as dscvr_hello } from './r5m4o-xaaaa-aaaah-qbpfq-cai';
import { default as nfid_iiDev } from './nprnb-waaaa-aaaaj-qax4a-cai';
import { default as metascore_metascore } from './tzvxm-jqaaa-aaaaj-qabga-cai';
import { default as nns } from './rrkah-fqaaa-aaaaa-aaaaq-cai';

export const Stubs = {
dscvr_analytics,
dscvr_hello,
nfid_iiDev,
metascore_metascore,
nns,
};
Loading

0 comments on commit 03f259c

Please sign in to comment.