diff --git a/src/client.js b/src/client.js deleted file mode 100644 index cfc7d9c7c..000000000 --- a/src/client.js +++ /dev/null @@ -1,31 +0,0 @@ -/** -* Licensed to the Apache Software Foundation (ASF) under one -* or more contributor license agreements. See the NOTICE file -* distributed with this work for additional information -* regarding copyright ownership. The ASF licenses this file -* to you under the Apache License, Version 2.0 (the -* "License"); you may not use this file except in compliance -* with the License. You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, -* software distributed under the License is distributed on an -* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -* KIND, either express or implied. See the License for the -* specific language governing permissions and limitations -* under the License. -*/ - -import axios from 'axios'; - -export const sendRequest = async (query) => { - const headers = { - 'Content-Type': 'application/json' - }; - const data = { - query: query - } - const response = await axios.post(process.env.REACT_APP_GRAPHQL_SERVER, data, { headers }) - return response.data; -}; diff --git a/src/constants.js b/src/constants.js deleted file mode 100644 index bcd98d8c8..000000000 --- a/src/constants.js +++ /dev/null @@ -1,35 +0,0 @@ -export const OPS = { - CREATE: "CREATE", - FETCH: "FETCH", - UPDATE: "UPDATE", - UPDATE_ALL: "UPDATE MULTIPLE", - FILTER: "FILTER", - INFO: "ACCOUNT" -}; - -export const OP_DATA = { - [OPS.CREATE]: { - from: "commit", - requiredFields: ['address', 'amount', 'data'] - }, - [OPS.FETCH]: { - from: "get", - requiredFields: ['id'] - }, - [OPS.UPDATE]: { - from: "update", - requiredFields: ['address', 'amount', 'data', 'id'] - }, - [OPS.UPDATE_ALL]: { - from: "update-multi", - requiredFields: ['values'] - }, - [OPS.FILTER]: { - from: "filter", - requiredFields: ['recipientPublicKey'] - }, - [OPS.INFO]: { - from: "account", - requiredFields: [] - } -}