Commit graph

141 commits

Author SHA1 Message Date
Sérgio Salgado
40974dd501 fix: naming and redundancy issues 2021-05-03 23:00:41 +01:00
Sérgio Salgado
6396eb8247 fix: sql casing 2021-05-03 23:00:41 +01:00
Sérgio Salgado
fded22f39a feat: add user management screen
feat: login screen

fix: login routing and layout

feat: add users migration

feat: passport login strategy

fix: users migration

feat: simple authentication

fix: request body

feat: JWT authorization

feat: 2fa step on login

feat: 2fa flow

feat: add rememberme to req body

fix: hide 2fa secret from jwt

fix: block login access to logged in user

fix: rerouting to wizard

refactor: login screen

feat: setup 2fa state on login

feat: 2fa secret qr code

fix: remove jwt from 2fa secret

fix: wizard redirect after login

fix: 2fa setup flow

fix: user id to uuid

feat: user roles

feat: user sessions and db persistence

feat: session saving on DB and cookie

refactor: unused code

feat: cookie auto renew on request

feat: get user data endpoint

fix: repeated requests

feat: react routing

fix: private routes

refactor: auth

feat: sessions aware of ua and ip

feat: sessions on gql

feat: session management screen

feat: replace user_tokens usage for users

feat: user deletion also deletes active sessions

feat: remember me alters session cookie accordingly

feat: last session by all users

fix: login feedback

fix: page loading UX

feat: routes based on user role

feat: header aware of roles

feat: reset password

fix: reset password endpoint

feat: handle password change

feat: reset 2FA

feat: user role on management screen

feat: change user role

fix: user last session query

fix: context

fix: destroy own session

feat: reset password now resets sessions

feat: reset 2fa now resets sessions

refactor: user data

refactor: user management screen

feat: user enable

feat: schema directives

fix: remove schema directive temp

feat: create new users

feat: register endpoint

feat: modals for reset links

fix: directive Date errors

feat: superuser directive

feat: create user url modal

fix: user management layout

feat: confirmation modals

fix: info text

feat: 2fa input component

feat: code input on 2fa state

feat: add button styling

feat: confirmation modal on superuser action

feat: rework 2fa setup screen

feat: rework reset 2fa screen

fix: session management screen

fix: user management screen

fix: blacklist roles

chore: migrate old customer values to new columns

fix: value migration

fix: value migration

refactor: remove old code
2021-05-03 23:00:41 +01:00
Taranto
893e0b1493 fix: config migration 2021-03-23 17:45:14 +00:00
Cesar
34f2b84fe2 Feat: add notification center row in notification settings table 2021-02-15 23:17:19 +00:00
Cesar
3eac055294 Feat: enable alerts card on dashboard 2021-02-05 18:59:11 +00:00
Cesar
c457faab40 Chore: make notification center UI
Chore: fiatBalancesNotify refactor

Chore: removed now-unused code in some files

Feat: change column "detail" in database to use jsonb

Chore: add notification center background and button

Chore: notifications screen scaffolding

Fix: change position of notification UI

Feat: join backend and frontend

Feat: notification icons and machine names

Feat: add clear all button, stripe overlay on invalid notification

Fix: rework notification styles

Feat: use popper to render notifications

Feat: make notification center UI

Fix: fix css on notification center

Fix: fix invalidateNotification

Chore: apply PR requested changes

Fix: PR fixes

Fix: make toggleable body/root styles be handled by react

Chore: delete old notifier file

Fix: undo variable name changes for cryptobalance notifs
2021-02-04 15:48:23 +00:00
Cesar
3b3bdf839b Feat: crypto balance notifications saving in DB
Chore: add new column "detail" to transactions table migration

Feat: check if older notification is valid before sending new one

Feat: error saving to database

Fix: fix error when invalidating notification on
clearCryptoBalanceNotifications
Chre: code refactor in new-settings-loader for simplicity
Chore: refactor code on notifier and merge similar functions
2021-02-04 15:48:23 +00:00
Cesar
196a05549f Feat: save cash balance notifications in DB
Feat: add "detail" row in notifications table migration

This makes searching for specific notifications in the
code like cashbox number easier because we don't need
to scrub the notification message column anymore to search
for notifications relating the cashbox 1 for example.

Feat: clear notifications on cash cassette balance update
2021-02-04 15:48:23 +00:00
Cesar
75bfb4b991 Chore: make notifications table migration 2021-02-04 15:48:23 +00:00
Sérgio Salgado
309d9ff95b feat: store id card raw data 2021-02-02 19:03:40 +00:00
Rafael Taranto
d17ca43abb Merge pull request #572 from lamassu/release-7.5.0
Release 7.5.0-beta.1
2021-01-25 14:33:48 +00:00
Sérgio Salgado
5045821593 fix: review 2021-01-18 19:42:03 +00:00
Sérgio Salgado
742913db36 fix: normalize SQL 2021-01-18 19:42:03 +00:00
Sérgio Salgado
7fe8799edc feat: add loyalty panel screen and structure
feat: add coupons table

feat: add coupons to schema

fix: coupon schema

feat: coupon table

feat: add coupon top button

feat: add first coupon button

feat: delete coupon

feat: coupon modal

fix: clear discount on modal close

fix: modal input formatting

feat: add new coupons

fix: button positioning

fix: remove loyalty panel sidebar

fix: coupon screen matching specs

fix: coupon modal

feat: send coupon data to machine on poll

fix: available coupons bool

feat: coupon endpoint

feat: transaction discount migration

feat: post-discount rates

refactor: bills

feat: version string

fix: bill saving on db

feat: coupon soft-delete

fix: coupon soft delete

fix: bill receiving

feat: remove cryptoAtoms update during tx

fix: tx trading

fix: bills

feat: start trades rework

fix: remove code

fix: code review
2021-01-18 19:42:03 +00:00
Cesar
c686ecc2aa Fix: adds created_by_operator constraint for duplicate checking 2020-12-30 17:58:21 +00:00
Sérgio Salgado
839e6aae47 refactor: user agent parsing 2020-11-12 22:03:26 +00:00
Sérgio Salgado
791b275cdf feat: add request data to user_tokens and token filtering 2020-11-12 22:03:26 +00:00
Liordino Neto
a1cc7cad13 fix: removed unnecessary support log code from server 2020-10-28 16:16:14 +00:00
Taranto
89bb9a8f25 chore: cleanup, node14 and new admin default 2020-10-20 21:54:58 +02:00
Taranto
5887a301fb feat: us ssn 2020-10-09 18:01:02 +02:00
Taranto
e0581fc39b feat: suspension trigger 2020-10-06 23:19:22 +02:00
Liordino Neto
ccf7eacfad feat: Create migration from old config to new (#424)
* fix: adapt old settings loader to the new schema (filter schema_version)

feat: migrate commissions globals

feat: migrate locales

refactor: generalize the old fields search

chore: created functions signatures for all config migrations

feat: created wallet migration

feat: migrate operator info

feat: migrate coin atm radar

feat: migrate terms and conditions

feat: migrate commissions overrides

fix: removed the wallet_COIN_active field (don't exist anymore)

chore: moved the config-migration lib to the lib folder

feat: migrate cashout configurations

feat: migrate notifications globals

feat: export migration function

feat: migrate most of notifications scoped configs

fix: added the missing text property to the terms and conditions
migration

feat: migrate compliance triggers

feat: migrate receipt printing

feat: migrate accounts

chore: remove test code form module

refactor: change some functions naming

fix: set default trigger type to 'volume'

feat: added threshold days (default 1) to triggers

fix: removed strike from the accounts importing

refactor: cleaner code on fixed properties

feat: avoid repeated crypto/machine pairs on the commissions overrides
migrations

refactor: make renameAccountFields function internal to the account
migration function

fix: migrate all crypto scoped commission overrides

* fix: return plain objects from functions to make the jsons more readable

fix: fix bitgo fields casing

fix: improve commissions migration function readability

refactor: standard styling

* feat: add fallback values to the migration

* feat: created db migration for the new config

* feat: create migration to move machine names from file to db

fix: updates machine names before the config migration

fix: load machineLoader

fix: create a param to ignore the schema version when loading the latest
config using the old loader

* refactor: remove unnecessary arguments on createTrigger function

fix: check if there's an smsVerificationThreshold configured prior to
migrating triggers

* fix: migrate triggers with the correct thresholds and verify if they're
valid
2020-09-25 11:07:47 +01:00
Liordino Neto
6177a781a6 fix: make the schema_version column not nullable 2020-09-11 14:13:18 +01:00
Liordino Neto
6e356217ae feat: created migration to add a schema_version column on the user_config table
feat: adapted the new settings loader to work with the db instead of
the json file

fix: fixed the schema migration file

fix: updated accounts to work with the db

fix: fetch only data with the new schema version

fix: change the account saving process so there's no more than one
account record

chore: removed unnecessary TODO comments

fix: replaced an error throwing with a Promise reject

fix: when looking for the latest config, don't limit it to the new ones

fix: fix function names on gql server

fix: remove duplicate import

fix: return an empty object when there's no schema_version 2 config yet
2020-09-11 14:13:18 +01:00
Taranto
5dd8501a17 fix: pre release screen fixes 2020-07-06 14:17:44 +01:00
Taranto
db32ad4f16 Merge remote-tracking branch 'upstream/defiant-dingirma' into fix/flat-schema 2020-06-01 21:02:44 +01:00
Taranto
fa69d2a030 hotfix: add fudge factor 2020-03-23 19:10:58 +01:00
Rafael Taranto
c100c11a2f fix: rebase issues and code style 2019-11-12 15:04:32 +00:00
Luis Félix
703c5d7c91 feat: add new server log page 2019-11-12 11:20:57 +00:00
Rafael Taranto
98cc3b18b7 Prevent address reuse option 2019-07-31 18:12:16 +01:00
Rafael Taranto
15c8e0d862 Fix check pings query 2019-05-16 11:43:22 +01:00
Rafael Taranto
67919892e8 Truncate/trim server tables 2019-05-12 13:46:56 +01:00
Rafael Taranto
4640b4a774 Add blacklist functionality 2019-04-30 19:13:24 +02:00
littlenaut
1cd06a024c Add 'cash_in_txs' migration
This migration adds a new column to the 'cash_in_txs' table to
accommodate the new paper wallet feature for compliance.
2019-03-11 11:46:19 +00:00
Fabio Cigliano
578a39a721 log raw ticker price within tx 2019-03-02 14:40:29 +01:00
Fabio Cigliano
038a22aba7 migration added 2019-03-02 14:40:29 +01:00
Davit Abulashvili
907cd08cf1 Log unsuccessful trade attempts in the db (#224)
* Save trade error in table trades

* Add one migration, Add error column to trades table

* changes in plugins.js file

* Apply standardjs to plugins.js file
2018-11-28 20:24:48 +02:00
Zoran Joka
13040f41a1 Optimize machine pings query (#222)
* refactor recordPing method

* optimize queries

* migrate machine_pings

remove id, serial_number
add primary key on device_id
add unique constraint on device_id

* remove filelds from query, rename migration, delete duplicate migration

* truncate machine_pings in migration
2018-11-21 11:08:19 +01:00
Rafael Taranto
06f8c57608 Save migrations file on db (#215)
* Revert "Migration sql changes (#199)"

This reverts commit 12c834469c.

* Save migrate file on db

* Add message on migration error in lamassu-update
2018-11-18 10:15:22 +01:00
Rafael Taranto
a377777b12 Fix db migrations (#212) 2018-11-15 14:31:41 +01:00
Fabio Cigliano
12c834469c Migration sql changes (#199)
* safe migration script changes

* lamassu migration script fixes
2018-11-01 13:26:48 +02:00
Rafael Taranto
38aa006ecc Add device_id to cash_out_actions table (#164)
If a costumer originates a cashOut transaction at one device, and then
redeemed at a different device, the wrong machine would have bills debited from it.

With device_id being saved at the cash_out_actions table the bills can
be properly reconciled.
2018-09-22 23:38:31 +01:00
Fabio Cigliano
a30b835786 Terms and conditions screen (#118)
* Terms and Conditions screen added

* missing fields

* SQL migration added

* terms.text: markdown to html on server side

* markdown field type added

* other minor changes
2018-06-05 22:35:30 +03:00
Josh Harvey
d1712ce1ce Add layer2 address separately 2018-06-04 16:34:46 +03:00
Josh Harvey
6c3099921f support for Coin ATM Radar 2018-05-21 16:30:13 +03:00
Josh Harvey
c06c84c25c change crypto_atoms to numeric in db to support ETH (#116) 2018-05-11 19:05:20 +03:00
Josh Harvey
5ba164e566 add sanctions_logs table 2018-05-07 12:20:22 +03:00
Neal Conner
fd659c88c6 Fix migrate-tools for multiple devices (#113)
Don't fail with duplicate key errors if there is more than one row already in the devices table, since it attempts to update the device_id column.
2018-05-03 11:46:10 +03:00
Josh Harvey
c2af183911 format for latest standard 2018-03-10 18:59:40 +00:00