File tree Expand file tree Collapse file tree 3 files changed +8
-11
lines changed Expand file tree Collapse file tree 3 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ const DEFAULT_SNAPSHOT_ENV: string = 'testnet';
6
6
7
7
export async function validateSpaceSettings (
8
8
originalSpace : any ,
9
- snapshotEnv = DEFAULT_SNAPSHOT_ENV
9
+ snapshotEnv = process . env . NETWORK ?? DEFAULT_SNAPSHOT_ENV
10
10
) : Promise < void > {
11
11
const spaceType = originalSpace . turbo ? 'turbo' : 'default' ;
12
12
const space = snapshot . utils . clone ( originalSpace ) ;
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ async function validateSpace(space: any) {
65
65
return Promise . reject ( 'space hibernated' ) ;
66
66
}
67
67
68
- await validateSpaceSettings ( space , process . env . NETWORK ) ;
68
+ await validateSpaceSettings ( space ) ;
69
69
}
70
70
71
71
export async function verify ( body ) : Promise < any > {
Original file line number Diff line number Diff line change @@ -23,15 +23,12 @@ export async function verify(body): Promise<any> {
23
23
const space = await getSpace ( msg . space , true ) ;
24
24
25
25
try {
26
- await validateSpaceSettings (
27
- {
28
- ...msg . payload ,
29
- id : msg . space ,
30
- deleted : space ?. deleted ,
31
- turbo : space ?. turbo
32
- } ,
33
- process . env . NETWORK
34
- ) ;
26
+ await validateSpaceSettings ( {
27
+ ...msg . payload ,
28
+ id : msg . space ,
29
+ deleted : space ?. deleted ,
30
+ turbo : space ?. turbo
31
+ } ) ;
35
32
} catch ( e ) {
36
33
return Promise . reject ( e ) ;
37
34
}
You can’t perform that action at this time.
0 commit comments