diff --git a/new-lamassu-admin/package-lock.json b/new-lamassu-admin/package-lock.json index 51b0eca0..e8293895 100644 --- a/new-lamassu-admin/package-lock.json +++ b/new-lamassu-admin/package-lock.json @@ -10855,7 +10855,8 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true } } @@ -15026,7 +15027,8 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true } } @@ -19209,8 +19211,30 @@ "integrity": "sha512-VT/cxmx5yaoHSOTSyrCygIDFco+RsibY2NM0a4RdEeY/4KgqezwFtK1yr3U67xYhqJSlASm2pKhLVzPj2lr4bA==", "requires": { "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.0", "has-symbols": "^1.0.1", "object-keys": "^1.1.1" + }, + "dependencies": { + "es-abstract": { + "version": "1.18.0-next.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", + "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.0", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.1", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + } } } } @@ -27804,7 +27828,8 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true } } diff --git a/new-lamassu-admin/src/App.js b/new-lamassu-admin/src/App.js index 9db11f1b..d36bdcfa 100644 --- a/new-lamassu-admin/src/App.js +++ b/new-lamassu-admin/src/App.js @@ -1,4 +1,3 @@ -import { ApolloProvider, useQuery } from '@apollo/react-hooks' import CssBaseline from '@material-ui/core/CssBaseline' import { StylesProvider, @@ -6,15 +5,12 @@ import { MuiThemeProvider, makeStyles } from '@material-ui/core/styles' -import gql from 'graphql-tag' import { create } from 'jss' import extendJss from 'jss-plugin-extend' -import React from 'react' -import { BrowserRouter as Router } from 'react-router-dom' +import React, { createContext, useState } from 'react' +import { useLocation, BrowserRouter as Router } from 'react-router-dom' -import Wizard from 'src/pages/Wizard' -import { getWizardStep } from 'src/pages/Wizard/helper' -import client from 'src/utils/apollo' +import ApolloProvider from 'src/utils/apollo' import Header from './components/layout/Header' import { tree, Routes } from './routing/routes' @@ -53,51 +49,42 @@ const useStyles = makeStyles({ } }) -const GET_DATA = gql` - query getData { - config - accounts - cryptoCurrencies { - code - display - } - } -` +const AppContext = createContext() const Main = () => { const classes = useStyles() - const { data, loading } = useQuery(GET_DATA) + const location = useLocation() - if (loading) { - return <> - } - - const wizardStep = getWizardStep(data?.config, data?.cryptoCurrencies) + const is404 = location.pathname === '/404' return (
- - {wizardStep > 0 && } -
-
- -
- + {!is404 &&
} +
+ +
) } const App = () => { + const [wizardTested, setWizardTested] = useState(false) + return ( - - - - -
- - - + + + + + + +
+ + + + + ) } export default App +export { AppContext } diff --git a/new-lamassu-admin/src/pages/AddMachine/AddMachine.js b/new-lamassu-admin/src/pages/AddMachine/AddMachine.js index b5f95df8..98fed365 100644 --- a/new-lamassu-admin/src/pages/AddMachine/AddMachine.js +++ b/new-lamassu-admin/src/pages/AddMachine/AddMachine.js @@ -87,6 +87,9 @@ const validationSchema = Yup.object().shape({ const MachineNameComponent = ({ nextStep, classes, setQrCode, setName }) => { const [register] = useMutation(SAVE_CONFIG, { onCompleted: ({ createPairingTotem }) => { + if (process.env.NODE_ENV === 'development') { + console.log(`totem: "${createPairingTotem}" `) + } setQrCode(createPairingTotem) nextStep() }, diff --git a/new-lamassu-admin/src/pages/AuthRegister.js b/new-lamassu-admin/src/pages/AuthRegister.js index e5d46723..25a2f714 100644 --- a/new-lamassu-admin/src/pages/AuthRegister.js +++ b/new-lamassu-admin/src/pages/AuthRegister.js @@ -20,7 +20,7 @@ const AuthRegister = () => { customHandler: (err, res) => { if (err) return if (res) { - history.push('/') + history.push('/wizard', { fromAuthRegister: true }) } } }) diff --git a/new-lamassu-admin/src/pages/Commissions/helper.js b/new-lamassu-admin/src/pages/Commissions/helper.js index 85d17d36..74c6d1aa 100644 --- a/new-lamassu-admin/src/pages/Commissions/helper.js +++ b/new-lamassu-admin/src/pages/Commissions/helper.js @@ -52,7 +52,6 @@ const getOverridesFields = (getData, currency, auxElements) => { ) const suggestionFilter = (it, cryptoData) => { - console.log(it) if (!it?.machine) return cryptoData return R.differenceWith( diff --git a/new-lamassu-admin/src/pages/Transactions/DetailsCard.js b/new-lamassu-admin/src/pages/Transactions/DetailsCard.js index 410991af..642b30a2 100644 --- a/new-lamassu-admin/src/pages/Transactions/DetailsCard.js +++ b/new-lamassu-admin/src/pages/Transactions/DetailsCard.js @@ -33,7 +33,6 @@ const getCashOutStatus = it => { } const getCashInStatus = it => { - console.log(it) if (it.operatorCompleted) return 'Cancelled' if (it.hasError) return 'Error' if (it.sendConfirmed) return 'Sent' diff --git a/new-lamassu-admin/src/pages/Wallet/WizardSplash.js b/new-lamassu-admin/src/pages/Wallet/WizardSplash.js index 5e4614de..9ccf9565 100644 --- a/new-lamassu-admin/src/pages/Wallet/WizardSplash.js +++ b/new-lamassu-admin/src/pages/Wallet/WizardSplash.js @@ -66,7 +66,7 @@ const WizardSplash = ({ code, name, onContinue }) => {

You are about to enable {name} on your system. This will allow you to use this cryptocurrency on your machines. To be able to do that, you’ll - have to setup all the necessary 3rd party services. + have to set up all the necessary 3rd party services.