Added Personal Data, Exchange Account, Asset and Key basic structure
This commit is contained in:
1 parent
b85dae5896
commit
474f7fa4f6
11 files changed
+638
-13
No files matched your search
@@ -276,6 +276,55 @@ function newProtocolNode () {
|
||||
}
|
||||
return tradingSystem
|
||||
}
|
||||
case 'Personal Data': {
|
||||
let personalData = {
|
||||
type: node.type,
|
||||
subType: node.subType,
|
||||
name: node.name,
|
||||
exchangeAccounts: []
|
||||
}
|
||||
|
||||
for (let m = 0; m < node.exchangeAccounts.length; m++) {
|
||||
let exchangeAccount = getProtocolNode(node.exchangeAccounts[m])
|
||||
personalData.exchangeAccounts.push(exchangeAccount)
|
||||
}
|
||||
return personalData
|
||||
}
|
||||
case 'Exchange Account': {
|
||||
let exchangeAccount = {
|
||||
type: node.type,
|
||||
subType: node.subType,
|
||||
name: node.name,
|
||||
assets: [],
|
||||
keys: []
|
||||
}
|
||||
|
||||
for (let m = 0; m < node.assets.length; m++) {
|
||||
let asset = getProtocolNode(node.assets[m])
|
||||
exchangeAccount.assets.push(asset)
|
||||
}
|
||||
for (let m = 0; m < node.keys.length; m++) {
|
||||
let key = getProtocolNode(node.keys[m])
|
||||
exchangeAccount.keys.push(key)
|
||||
}
|
||||
return exchangeAccount
|
||||
}
|
||||
case 'Exchange Account Asset': {
|
||||
let asset = {
|
||||
type: node.type,
|
||||
subType: node.subType,
|
||||
name: node.name
|
||||
}
|
||||
return asset
|
||||
}
|
||||
case 'Exchange Account Key': {
|
||||
let key = {
|
||||
type: node.type,
|
||||
subType: node.subType,
|
||||
name: node.name
|
||||
}
|
||||
return key
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user