Fix: make percentage chart work properly
Fix: code review Fix: rework components according to PR requested changes Fix: fix repeated code buildRatesNoCommission Also renames id to deviceId in transactions quer Fix: pr requested changes Chore: move inline styles to classes Chore: remove comment Fix: bad equality !process.env.NODE_ENV === 'production'
This commit is contained in:
parent
5572fb0eb1
commit
ae7eaca10c
43 changed files with 818 additions and 1578 deletions
|
|
@ -18,12 +18,11 @@ const couponManager = require('../../coupons')
|
|||
const serverVersion = require('../../../package.json').version
|
||||
const transactions = require('../transactions')
|
||||
const funding = require('../funding')
|
||||
const forex = require('../../forex')
|
||||
const supervisor = require('../supervisor')
|
||||
const serverLogs = require('../server-logs')
|
||||
const pairing = require('../pairing')
|
||||
|
||||
const plugins = require('../../plugins')
|
||||
const ticker = require('../../ticker')
|
||||
|
||||
const {
|
||||
accounts: accountsConfig,
|
||||
|
|
@ -240,6 +239,8 @@ const typeDefs = gql`
|
|||
created: Date
|
||||
age: Float
|
||||
deviceTime: Date
|
||||
}
|
||||
|
||||
type Rate {
|
||||
code: String
|
||||
name: String
|
||||
|
|
@ -268,25 +269,22 @@ const typeDefs = gql`
|
|||
until: Date
|
||||
limit: Int
|
||||
offset: Int
|
||||
id: ID
|
||||
deviceId: ID
|
||||
): [Transaction]
|
||||
transactionsCsv(from: Date, until: Date, limit: Int, offset: Int): String
|
||||
accounts: JSONObject
|
||||
config: JSONObject
|
||||
blacklist: [Blacklist]
|
||||
# userTokens: [UserToken]
|
||||
<<<<<<< HEAD
|
||||
coupons: [Coupon]
|
||||
cryptoRates: JSONObject
|
||||
fiatRates: [Rate]
|
||||
}
|
||||
|
||||
type SupportLogsResponse {
|
||||
id: ID!
|
||||
timestamp: Date!
|
||||
deviceId: ID
|
||||
=======
|
||||
rates: JSONObject
|
||||
btcRates(to: String, from: String): [Rate]
|
||||
>>>>>>> 9d88b4f... Feat: make dashboard and machine profile page
|
||||
}
|
||||
|
||||
enum MachineAction {
|
||||
|
|
@ -356,15 +354,26 @@ const resolvers = {
|
|||
serverLogs.getServerLogs(from, until, limit, offset),
|
||||
serverLogsCsv: (...[, { from, until, limit, offset }]) =>
|
||||
serverLogs.getServerLogs(from, until, limit, offset).then(parseAsync),
|
||||
transactions: (...[, { from, until, limit, offset, id }]) =>
|
||||
transactions.batch(from, until, limit, offset, id),
|
||||
transactions: (...[, { from, until, limit, offset, deviceId }]) =>
|
||||
transactions.batch(from, until, limit, offset, deviceId),
|
||||
transactionsCsv: (...[, { from, until, limit, offset }]) =>
|
||||
transactions.batch(from, until, limit, offset).then(parseAsync),
|
||||
config: () => settingsLoader.loadLatestConfigOrNone(),
|
||||
accounts: () => settingsLoader.loadAccounts(),
|
||||
blacklist: () => blacklist.getBlacklist(),
|
||||
// userTokens: () => tokenManager.getTokenList()
|
||||
coupons: () => couponManager.getAvailableCoupons()
|
||||
coupons: () => couponManager.getAvailableCoupons(),
|
||||
cryptoRates: () =>
|
||||
settingsLoader.loadLatest().then(settings => {
|
||||
const pi = plugins(settings)
|
||||
return pi.getRawRates().then(r => {
|
||||
return {
|
||||
withCommissions: pi.buildRates(r),
|
||||
withoutCommissions: pi.buildRatesNoCommission(r)
|
||||
}
|
||||
})
|
||||
}),
|
||||
fiatRates: () => forex.getFiatRates()
|
||||
},
|
||||
Mutation: {
|
||||
machineAction: (...[, { deviceId, action, cashbox, cassette1, cassette2, newName }]) => machineAction({ deviceId, action, cashbox, cassette1, cassette2, newName }),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue