Retry downloading OFAC lists (#236)
* Retry downloading OFAC lists * Update ofac sources on lamassu-update
This commit is contained in:
parent
b9f9c6facc
commit
7043a3c408
5 changed files with 48 additions and 1 deletions
23
bin/lamassu-ofac-update-sources
Executable file
23
bin/lamassu-ofac-update-sources
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
'use strict'
|
||||
|
||||
const fs = require('fs')
|
||||
|
||||
const ofacSources = [
|
||||
{
|
||||
name: 'sdn_advanced',
|
||||
url: 'https://www.treasury.gov/ofac/downloads/sanctions/1.0/sdn_advanced.xml'
|
||||
},
|
||||
{
|
||||
name: 'cons_advanced',
|
||||
url: 'https://www.treasury.gov/ofac/downloads/sanctions/1.0/cons_advanced.xml'
|
||||
}
|
||||
]
|
||||
|
||||
const options = require('../lib/options-loader')()
|
||||
|
||||
if (!options.opts.ofacSources) {
|
||||
options.opts.ofacSources = ofacSources
|
||||
fs.writeFileSync(options.path, JSON.stringify(options.opts, null, ' '), 'utf8')
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue