-
Notifications
You must be signed in to change notification settings - Fork 4
/
coinObj.js
55 lines (52 loc) · 1.05 KB
/
coinObj.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
const createCoinObj = (answers) => {
const {
isAc,
native,
electrum,
isPbaasChain,
isPrivate,
sapling,
zOnly,
dustThreshold,
rpcPort,
startupParams,
electrumServers,
themeColor,
osxDir,
winDir,
linuxDir,
txFee
} = answers;
let tags = []
if (isPbaasChain) tags = tags.concat(['is_pbaas', 'is_verus'])
if (isPrivate) tags.push('is_zcash')
if (sapling) tags.push('is_sapling')
if (zOnly) tags.push('z_only')
if (isAc) tags.push('is_komodo')
return {
id: answers.id,
name: answers.name,
isPbaasChain: isPbaasChain || false,
themeColor,
available_modes: {
native,
electrum,
eth: false
},
options: {
dustThreshold,
fallbackPort: rpcPort,
startupOptions: startupParams,
daemon: isAc ? 'komodod' : 'verusd',
customServers: electrumServers,
dirNames: {
darwin: osxDir,
linux: linuxDir,
win32: winDir,
},
tags: tags.join('|'),
txFee
}
}
}
module.exports = createCoinObj