This repository was archived by the owner on Jun 14, 2024. It is now read-only.
File tree 1 file changed +1
-9
lines changed
1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change 3
3
const runApp = require ( './src/app' )
4
4
const logger = require ( './src/logger' )
5
5
const config = require ( 'config' )
6
- const { join } = require ( 'path' )
7
- const { existsSync } = require ( 'fs' )
8
6
9
7
const NODE_ENV = config . get ( 'NODE_ENV' )
10
8
const PORT = config . get ( 'PORT' )
@@ -15,12 +13,7 @@ const loadCtrAddresses = () => {
15
13
let contractAddresses = process . env . CONTRACT_ADDRESSES
16
14
17
15
if ( ! contractAddresses ) {
18
- const contractAddressesPath = join ( __dirname , './contracts/contractAddresses.json' )
19
- if ( existsSync ( contractAddressesPath ) ) {
20
- contractAddresses = require ( contractAddressesPath )
21
- } else {
22
- throw new Error ( 'API: could not recover addresses from the environment or from files' )
23
- }
16
+ throw new Error ( 'API: could not recover addresses from the environment variable $CONTRACT_ADDRESSES' )
24
17
} else {
25
18
contractAddresses = JSON . parse ( contractAddresses )
26
19
}
@@ -30,7 +23,6 @@ const loadCtrAddresses = () => {
30
23
31
24
; ( ( ) => {
32
25
try {
33
- // TODO: Validate contarct setup
34
26
const contractAddresses = loadCtrAddresses ( )
35
27
36
28
runApp ( contractAddresses )
You can’t perform that action at this time.
0 commit comments