Skip to content

Commit

Permalink
Merge pull request #506 from lamassu/dev
Browse files Browse the repository at this point in the history
merge dev into 7.5.0
  • Loading branch information
RafaelTaranto authored Nov 9, 2020
2 parents 8bd71d6 + e563688 commit 04b0539
Show file tree
Hide file tree
Showing 14 changed files with 59 additions and 132 deletions.
110 changes: 0 additions & 110 deletions bin/lamassu-update

This file was deleted.

3 changes: 2 additions & 1 deletion lib/blockchain/bitcoin.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ server=1
connections=40
keypool=10000
prune=4000
daemon=0`
daemon=0
addresstype=p2sh-segwit`
}
3 changes: 2 additions & 1 deletion lib/blockchain/litecoin.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ server=1
connections=40
keypool=10000
prune=4000
daemon=0`
daemon=0
addresstype=p2sh-segwit`
}
8 changes: 4 additions & 4 deletions lib/new-admin/graphql/schema.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { gql } = require('apollo-server-express')
const converter = require('json-2-csv')
const { parseAsync } = require('json2csv')
const { GraphQLDateTime } = require('graphql-iso-date')
const { GraphQLJSON, GraphQLJSONObject } = require('graphql-type-json')
const got = require('got')
Expand Down Expand Up @@ -261,17 +261,17 @@ const resolvers = {
machineLogs: (...[, { deviceId, from, until, limit, offset }]) =>
logs.simpleGetMachineLogs(deviceId, from, until, limit, offset),
machineLogsCsv: (...[, { deviceId, from, until, limit, offset }]) =>
logs.simpleGetMachineLogs(deviceId, from, until, limit, offset).then(converter.json2csvAsync),
logs.simpleGetMachineLogs(deviceId, from, until, limit, offset).then(parseAsync),
serverVersion: () => serverVersion,
uptime: () => supervisor.getAllProcessInfo(),
serverLogs: (...[, { from, until, limit, offset }]) =>
serverLogs.getServerLogs(from, until, limit, offset),
serverLogsCsv: (...[, { from, until, limit, offset }]) =>
serverLogs.getServerLogs(from, until, limit, offset).then(converter.json2csvAsync),
serverLogs.getServerLogs(from, until, limit, offset).then(parseAsync),
transactions: (...[, { from, until, limit, offset }]) =>
transactions.batch(from, until, limit, offset),
transactionsCsv: (...[, { from, until, limit, offset }]) =>
transactions.batch(from, until, limit, offset).then(converter.json2csvAsync),
transactions.batch(from, until, limit, offset).then(parseAsync),
config: () => settingsLoader.loadLatestConfigOrNone(),
accounts: () => settingsLoader.loadAccounts()
},
Expand Down
6 changes: 4 additions & 2 deletions new-lamassu-admin/src/components/LogsDownloaderPopper.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,10 @@ const LogsDownloaderPopover = ({ name, query, args, title, getLogs }) => {
FileSaver.saveAs(
blob,
selectedRadio === ALL
? `${formatDateFile(new Date())}_${name}`
: `${formatDateFile(range.from)}_${formatDateFile(range.until)}_${name}`
? `${formatDateFile(new Date())}_${name}.csv`
: `${formatDateFile(range.from)}_${formatDateFile(
range.until
)}_${name}.csv`
)
}

Expand Down
7 changes: 6 additions & 1 deletion new-lamassu-admin/src/pages/Wizard/components/Locales.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ function Locales({ isActive, doContinue }) {
data?.cryptoCurrencies || []
)

const onChangeCoin = (prev, curr, setValue) => setValue(curr)

return (
<div className={classes.wrapper}>
<TitleSection title="Locales" />
Expand All @@ -85,7 +87,10 @@ function Locales({ isActive, doContinue }) {
save={save}
validationSchema={schema}
data={[]}
elements={mainFields(R.merge(data, { cryptoCurrencies }), () => {})}
elements={mainFields(
R.merge(data, { cryptoCurrencies }),
onChangeCoin
)}
/>
</Section>
</div>
Expand Down
6 changes: 3 additions & 3 deletions new-lamassu-admin/src/pages/Wizard/components/Welcome.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ function Welcome({ doContinue }) {

return (
<div className={classes.welcome}>
<H1 className={classes.title}>Welcome to Lamassu Admin</H1>
<H1 className={classes.title}>Welcome to the Lamassu Admin</H1>
<P className={classes.getStarted}>
To get started, we’ve put together wizard that will
To get you started, we’ve put together a wizard that will
<br />
help set up you need before start adding machines.
help set up what you need before pairing your machines.
</P>
<Button size="xl" onClick={doContinue}>
Get started
Expand Down
27 changes: 27 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"graphql-type-json": "^0.3.1",
"helmet": "^3.8.1",
"inquirer": "^5.2.0",
"json-2-csv": "^3.7.8",
"json2csv": "^5.0.3",
"kraken-api": "github:DeX3/npm-kraken-api",
"libphonenumber-js": "^1.7.38",
"lnd-async": "^1.8.0",
Expand Down Expand Up @@ -92,7 +92,6 @@
"lamassu-cancel": "./bin/lamassu-cancel",
"lamassu-nuke-db": "./bin/lamassu-nuke-db",
"lamassu-coins": "./bin/lamassu-coins",
"lamassu-update": "./bin/lamassu-update",
"lamassu-ofac-update": "./bin/lamassu-ofac-update",
"lamassu-send-coins": "./bin/lamassu-send-coins",
"lamassu-update-to-mnemonic": "./bin/lamassu-update-to-mnemonic",
Expand All @@ -115,7 +114,9 @@
"watch": "concurrently \"npm:server\" \"npm:admin-server\" \"npm:graphql-server\""
},
"nodemonConfig": {
"ignore": ["new-lamassu-admin/*"]
"ignore": [
"new-lamassu-admin/*"
]
},
"devDependencies": {
"ava": "3.8.2",
Expand Down
6 changes: 3 additions & 3 deletions public/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"files": {
"main.js": "/static/js/main.7f48381f.chunk.js",
"main.js.map": "/static/js/main.7f48381f.chunk.js.map",
"main.js": "/static/js/main.d0c68b02.chunk.js",
"main.js.map": "/static/js/main.d0c68b02.chunk.js.map",
"runtime-main.js": "/static/js/runtime-main.f0000622.js",
"runtime-main.js.map": "/static/js/runtime-main.f0000622.js.map",
"static/js/2.e506a40f.chunk.js": "/static/js/2.e506a40f.chunk.js",
Expand Down Expand Up @@ -81,6 +81,6 @@
"entrypoints": [
"static/js/runtime-main.f0000622.js",
"static/js/2.e506a40f.chunk.js",
"static/js/main.7f48381f.chunk.js"
"static/js/main.d0c68b02.chunk.js"
]
}
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="/manifest.json"/><title>Lamassu Admin</title></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root" class="root"></div><script>!function(e){function r(r){for(var n,a,l=r[0],i=r[1],f=r[2],c=0,s=[];c<l.length;c++)a=l[c],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&s.push(o[a][0]),o[a]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var i=t[l];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={1:0},u=[];function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,r){if(1&r&&(e=a(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)a.d(t,n,function(r){return e[r]}.bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="/";var l=this["webpackJsonplamassu-admin"]=this["webpackJsonplamassu-admin"]||[],i=l.push.bind(l);l.push=r,l=l.slice();for(var f=0;f<l.length;f++)r(l[f]);var p=i;t()}([])</script><script src="/static/js/2.e506a40f.chunk.js"></script><script src="/static/js/main.7f48381f.chunk.js"></script></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><meta name="theme-color" content="#000000"/><link rel="manifest" href="/manifest.json"/><title>Lamassu Admin</title></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root" class="root"></div><script>!function(e){function r(r){for(var n,a,l=r[0],i=r[1],f=r[2],c=0,s=[];c<l.length;c++)a=l[c],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&s.push(o[a][0]),o[a]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var i=t[l];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={1:0},u=[];function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,r){if(1&r&&(e=a(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)a.d(t,n,function(r){return e[r]}.bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="/";var l=this["webpackJsonplamassu-admin"]=this["webpackJsonplamassu-admin"]||[],i=l.push.bind(l);l.push=r,l=l.slice();for(var f=0;f<l.length;f++)r(l[f]);var p=i;t()}([])</script><script src="/static/js/2.e506a40f.chunk.js"></script><script src="/static/js/main.d0c68b02.chunk.js"></script></body></html>
1 change: 0 additions & 1 deletion public/static/js/main.7f48381f.chunk.js.map

This file was deleted.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public/static/js/main.d0c68b02.chunk.js.map

Large diffs are not rendered by default.

0 comments on commit 04b0539

Please sign in to comment.