(exchangeId: string)
| 63 | } |
| 64 | |
| 65 | function getExchangeSettings (exchangeId: string) { |
| 66 | let settingsPath = path.join (getCacheDirectory (), 'config.json'); |
| 67 | const config = loadMainConfigFile (); |
| 68 | |
| 69 | if ('cachePath' in config) { |
| 70 | settingsPath = config['cachePath']; |
| 71 | } |
| 72 | |
| 73 | if (!fs.existsSync (settingsPath)) { |
| 74 | log.error ('The specified config file was not found: ' + settingsPath); |
| 75 | } |
| 76 | |
| 77 | const settings = JSON.parse (fs.readFileSync (settingsPath).toString ()); |
| 78 | |
| 79 | if (exchangeId in settings) { |
| 80 | return settings[exchangeId]; |
| 81 | } |
| 82 | |
| 83 | return {}; |
| 84 | } |
| 85 | |
| 86 | /** |
| 87 | * |
nothing calls this directly
no test coverage detected
searching dependent graphs…