Commit Graph

13 Commits

Author SHA1 Message Date
sairajzero
6c0237b0b5 Upgrade Keys module
Keys module
- Private keys of node and sinks (shares) are managed by keys module
- sink_chest is moved here
- Seperate sinkIDs for each service

Sink Private key security improvements
- Shares are stored as index in SQL
- Indexes are mapped with sinkIDs in file system
- File is shuffled on interval
- Every file data is stored in encrypted format

Other changes
- changes required for the above
- RefundTransact is now dedicated to Convert service only (as every service has diff sinkID)
- moved periodicProcess to background.js
2022-11-15 03:20:33 +05:30
sairajzero
76339f1621 Optimization and Bug fix
- Renamed all `status` columns to `r_status`
- r_status uses INT instead of VARCHAR
- status-codes are used instead of strings
- Codes for status and modes can be found at floExchangeAPI.processCode
- Merged DepositCoin, WithdrawCoin, DepositToken, WithdrawToken into VaultTransactions so that all deposit/withdraw transactions can be viewed in order
- Updated relevant SQL syntaxes for the above
- Converted all multi-valued placeholders in SQL queries to array based placeholders
- Fixed minor bugs
2022-10-20 04:23:35 +05:30
sairajzero
f4bedfbd48 SQL fixes for previous updates
- Added table: ConvertFund
- Added triggers for CloseBondTransact, CloseFundTransact, ConvertFund, RefundTransact
- Updated truncateAll.sql
2022-10-19 21:27:54 +05:30
sairajzero
7d09babea7 Adding Coin-convert support
- Convert rupee token (currency) to coin (BTC) and vise-versa
2022-10-07 22:38:56 +05:30
sairajzero
bdd79a1a76 Adding support for BTC withdrawal 2022-09-30 05:52:30 +05:30
sairajzero
7092213826 Bug fixes
- Fixed: Trade balance not updated correctly
- Fixed: sell-chips were not checked correctly on placing sell orders
- Fixed: sell-chips not added when distributed
- Fixed: sell-chips (FLO) not added when deposited by launch-seller
- Fixed various bugs
- initialPrice will be added to priceHistory table (initially)
2022-04-27 00:29:51 +05:30
sairajzero
f59c6b3f2a Removing need for user registration
- Users can directly login or request without the need for user registration.
- Users can sign the requests either directly with own privateKey or by using a proxy
- Request's timestamp will be checked for Sign expiry.
- Request's sign will be checked for duplication.
- Cash table update will try to insert if record is not there
- Request Log table will also store a boolean value for sign by proxy or not
- Updated the SQL schema for the above changes.
2022-03-15 04:06:43 +05:30
sairajzero
0520791696 Adding transfer token feature
Transfer tokens
- Added transferToken: Users can directly transfer tokens (including FLO) to other registered users.
- Updated schema changes for the above requirement.
- Trade transactions and transfer transactions will generate a txid (using SHA256).

Other changes
- changed all signing type to lowercase
2022-03-12 02:25:31 +05:30
sairajzero
a06c5b4c7b Backup Sync improvements
- Removed: Immutable table-type (Previously immutable tables are now considered as mutable tables in backup feature)
- Backup sync-data from master are temporally cached and then processed after receiving all sync-data
- Backup sync-data from cache are now processed in ordered manner (to prevent foreign key constrain error, repeated data, re-adding a deleted data)
- Updated SQL Schema
2022-02-08 06:26:03 +05:30
sairajzero
048ab0667b Multi asset: initial price and other improvements
- Read blockchain for asset's initial price
- Transfer all tokens to new sink on master transfer

Other Improvements:
- Slave: close existing backup sync when master WS closes
- Updated SQL schema, updated SQL syntax as required
2022-02-05 20:23:36 +05:30
sairajzero
67c31d79a9 Multiple asset support
2 types of property:
1. Cash - main/central currency used for trading
2. Asset - (FLO/tokens) Can be brought or sold in the exchange market .

- Allow multiple tokens to act as asset in addition to FLO.
- Changes required for the above in deposits, withdraws, placing orders
- some code optimization in market.js
- Updated SQL schema
2022-02-02 04:17:47 +05:30
sairajzero
cdc55dbdc9 Update truncateAll.sql 2022-01-26 02:22:33 +05:30
sairajzero
f7584629b9 Bug fixes
- Fixed: error caused during inputRupee
- Passing timezone UTC in DB connection for uniformity between main server and backups.
- Changed single-line comments to multi-line comments in schema.sql
- Addng truncateAll.sql: can be used to clear the database (data only).
2021-10-21 21:08:12 +05:30