7a54e584d5
* Add transfer watcher * Filter userRequestForAffirmation events in Transfer events * Add extended oracle composer file
31 lines
722 B
JavaScript
31 lines
722 B
JavaScript
const baseConfig = require('./base.config')
|
|
const { ERC_TYPES } = require('../../commons')
|
|
|
|
const initialChecksJson = process.argv[3]
|
|
|
|
if (!initialChecksJson) {
|
|
throw new Error('initial check parameter was not provided.')
|
|
}
|
|
|
|
let initialChecks
|
|
try {
|
|
initialChecks = JSON.parse(initialChecksJson)
|
|
} catch (e) {
|
|
throw new Error('Error on decoding values from initial checks.')
|
|
}
|
|
|
|
if (baseConfig.id === 'erc-erc' && initialChecks.foreignERC === ERC_TYPES.ERC677) {
|
|
baseConfig.id = 'erc677-erc677'
|
|
}
|
|
|
|
const id = `${baseConfig.id}-affirmation-request`
|
|
|
|
module.exports = {
|
|
...baseConfig.bridgeConfig,
|
|
...baseConfig.foreignConfig,
|
|
event: 'UserRequestForAffirmation',
|
|
queue: 'home',
|
|
name: `watcher-${id}`,
|
|
id
|
|
}
|