diff --git a/client/package-lock.json b/client/package-lock.json index ee733b83d..5e17d3b9d 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -1,6 +1,6 @@ { "name": "@superalgos/operations-client", - "version": "0.0.21", + "version": "0.0.29", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/client/package.json b/client/package.json index 91748be1d..a6356f216 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "@superalgos/operations-client", - "version": "0.0.28", + "version": "0.0.30", "description": "Superalgos Operations client-side web app", "main": "src/index.js", "dependencies": { diff --git a/client/src/GraphQL/Calls/clones.js b/client/src/GraphQL/Calls/clones.js index 54becf398..b215a578d 100644 --- a/client/src/GraphQL/Calls/clones.js +++ b/client/src/GraphQL/Calls/clones.js @@ -21,7 +21,7 @@ const OPERATIONS_LIST_CLONES = gql` const OPERATIONS_HISTORY_CLONES = gql` query Operations_HistoryClones{ - operations_HistoryClones { + operations_HistoryClones(botType: "Trading") { ...clone } } diff --git a/client/src/GraphQL/Calls/keys.js b/client/src/GraphQL/Calls/keys.js index 0f6e8006a..23d3ffed3 100644 --- a/client/src/GraphQL/Calls/keys.js +++ b/client/src/GraphQL/Calls/keys.js @@ -6,6 +6,7 @@ export const GET_ALL_KEYS = gql` id key description + exchange } } ` diff --git a/client/src/GraphQL/models.js b/client/src/GraphQL/models.js index 4ce450894..022fb3ada 100644 --- a/client/src/GraphQL/models.js +++ b/client/src/GraphQL/models.js @@ -55,8 +55,7 @@ const botTypes = { const exchanges = { Coss: "Coss", - Poloniex: "Poloniex", - Binance: "Binance" + Poloniex: "Poloniex" } export { diff --git a/client/src/views/Clone/Add/index.js b/client/src/views/Clone/Add/index.js index 99aa9ae77..2bacda39d 100644 --- a/client/src/views/Clone/Add/index.js +++ b/client/src/views/Clone/Add/index.js @@ -160,6 +160,20 @@ class AddClone extends Component { {this.state.selectedBot.kind} + this.setState({ exchangeName: e.target.value })} + fullWidth + > + {Object.keys(exchanges).map((option, index) => ( + + {option} + + ))} + + {this.state.selectedBot.kind === botTypes.Trading && @@ -253,9 +267,9 @@ class AddClone extends Component { ); if (error) return `Error! ${error.message}`; const list = data.keyVault_AvailableKeys.map((key) => ( - - {key.key} - + + {key.key.substr(0, 32) + "..." + " - " + key.exchange} + )); return ( this.setState({ startYear: e.target.value })} fullWidth > - {getIndicatorYears().map((option, index) => ( - + {getIndicatorYears().map(option => ( + {option} ))} @@ -391,8 +405,8 @@ class AddClone extends Component { onChange={(e) => this.setState({ endYear: e.target.value })} fullWidth > - {getIndicatorYears().map((option, index) => ( - + {getIndicatorYears().map(option => ( + {option} ))} @@ -411,8 +425,8 @@ class AddClone extends Component { onChange={(e) => this.setState({ startYear: e.target.value })} fullWidth > - {getIndicatorYears().map((option, index) => ( - + {getIndicatorYears().map(option => ( + {option} ))} @@ -477,20 +491,6 @@ class AddClone extends Component { } - this.setState({ exchangeName: e.target.value })} - fullWidth - > - {Object.keys(exchanges).map((option, index) => ( - - {option} - - ))} - - You will be able to see the clone information under Active Clones. Whenever you decide to stop the clone you can delete it. On History Clones will find all deleted clones. diff --git a/test/cloneAdminTest.js b/test/cloneAdminTest.js index 150f3ccd1..d1ef7fbc8 100644 --- a/test/cloneAdminTest.js +++ b/test/cloneAdminTest.js @@ -24,7 +24,7 @@ describe('Admin clones Clones', function () { var clones = activeCloneList("Coss") try { for (let clone of clones) { - await removeClone(clone.id, clone.botName) + await createClone(clone) } } catch (err) { console.log('Error: ' + err) @@ -38,7 +38,7 @@ describe('Admin clones Clones', function () { var clones = activeCloneList("Poloniex") try { for (let clone of clones) { - await removeClone(clone.id, clone.botName) + await createClone(clone) } } catch (err) { console.log('Error: ' + err)