Commit Graph

28 Commits

Author SHA1 Message Date
sairajzero
821de1a6d7 inscribing marketID in floExchangeAPI.js
- Inscribed marketID and market name inside floExchange.js
- Added getter for floExchangeAPI
  .adminID
  .application
  .nodeList
2022-10-29 03:46:55 +05:30
sairajzero
48609bd1b7 Changing env-var to arguments
- Changes console.log and console.debug to relevant types
- PASSWORD and I environment variables are now passed as arguments to npm commands
- Added optional argument `--debug`. when passed, console.debug is also logged, else console.debug are turned off
2022-10-25 03:18:36 +05:30
sairajzero
0389e833a5 Bug fix
- Updated btcOperator
- Changed all BIT to TINYINT in SQL schema
- Fixed: "Public key missing" error in deposit/withdraw convert fund
- Updated btcOperator
- Fixed: btcOperator not imported in index.html and main.js
2022-10-24 15:56:30 +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
29bedbdcc8 Bug fixes
- Fixed: refreshData for bobs-fund and blockchain-bonds not been invoked
- Fixed: DB assignment for conversion, bonds and bobs-fund
2022-10-11 17:12:30 +05:30
sairajzero
56e571606c Update stdop 2022-05-25 02:31:31 +05:30
sairajzero
6c86c0a94b Adding switch for rated-seller check 2022-05-01 19:49:22 +05:30
sairajzero
e88799f01f update std-op 2022-04-26 03:30:51 +05:30
sairajzero
f9551c856d Updating sell-requirement
- Users can only sell when enough sell-chips (for asset) are available.
- sell-chips are obtained by
  . buying assets
  . receiving asset from distributor
  . deposit (FLO only) as launch-seller (maximum of 1 million)
- Updated coupling for the requirement
- Improved getBestSeller and getBestBuyer: Directly fetch from SQL query
- Removed group.js (moved required functions to market.js)
- Updated SQL schema
2022-04-17 03:44:34 +05:30
sairajzero
6add4625c8 Renaming files
Renamed tokenAPI to floTokenAPI
Renamed exchangeAPI to floExchangeAPI
2022-03-21 16:24:25 +05:30
sairajzero
b229b6b3d5 Arranging files
Moved all public/ to docs/ so that github pages can be hosted on docs/ alone

- Moved floGlobals.js, lib.js, floCrypto.js, floBlockchainAPI.js, tokenAPI.js, KBucket.js to docs/scripts/
- Renamed api.js to exchangeAPI.js and moved to docs/scripts/
- Moved index.html to docs/
- Moved css components to docs/css
- Updated all imports for the above changes.
- User pages (index.html) uses floCrypto.js and floBlockchainAPI.js in docs/script dir instead of fetching from cdn
2022-03-16 01:06:59 +05:30
sairajzero
4434ad6b3e Support for SQL version 5.7 2022-02-18 22:23:17 +05:30
sairajzero
4416ab5ad3 Adding Blockchain refresh interval
- Added blockchain refresh interval
- Updating some constants
- Disabled various console.debug
2022-02-18 19:24:09 +05:30
sairajzero
ab3df761b0 Bug fixes
- Fixed: SQL schema asset foreign key incorrectly referenced
- Fixed: initial rate of asset not loading correctly from DB
- Fixed: get-rate API returning [object Object] instead of rates
- Fixed: Bug where transaction-loop happens with 0 quantity
- Improved: spendAsset to use assets NULL/Non-NULL base correctly
- Fixed: minor typos, syntax errors and SQL query errors

User-pages:
- Added: UI fields for assets in Buy/Sell orders
- Updated: UI display of correct asset in listing orders and transactions
- Updated: localStorage keys are prefixed 'exchange-'
- Fixed: Rates and Balance amount not displayed correctly

Others:
- Added: temporary code for tracing output lines in set_globals.js (commented out by default)
2022-02-07 03:12:20 +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
2c35c545e8 Bug fixes (client side)
Fixed Client page bugs:
- Fixed minor bugs in client side pages
- client page to use floGlobals.js
- moved KBucket.js to public (as its need by client page too).
Fixed Server Bugs:
- Added Access-Control-Allow-Origin to response headers
- Fixed: trustedIDs not loaded
- Fixed minor bugs (syntax errors)
2022-01-25 01:28:22 +05:30
sairajzero
8c1aad3d28 Bug fixes
- Added lastTx table to SQL schema
- setup file 'reset-password' now accepts any private key (node keys)
- Fixed minor SQL syntax
2022-01-23 04:51:15 +05:30
sairajzero
52a1b3077d multi-node support
- Run multiple nodes in the same directory with diff config files
- pass the env variable 'I' (optional) to run a diff node instance with config file config<I>.json (also uses keys<I>.json)
- Updated setup files
- Fixed bugs in SQL schema
2022-01-23 03:24:27 +05:30
sairajzero
abb82b0b34 Minor Fixes
- Adding tables to SQL schema
- Moved Kbucket usage from main.js to backup/head.js
- node Kbucket, ordered NodeList are calculated in backup/head.js
2022-01-14 04:52:41 +05:30
sairajzero
c32833e625 Adding application name in floGlobals 2022-01-14 04:15:21 +05:30
sairajzero
0ba0f10245 Renaming files 2022-01-14 04:11:25 +05:30
sairajzero
626c9ec214 Backup transfer/retrieval process 2022-01-14 04:08:44 +05:30
sairajzero
db9ff02488 Update main.js
- fetch data (nodeList, TagList, trustedIDs) from blockchain
- Act as slave or master when needed
2021-12-30 06:53:04 +05:30
sairajzero
5ac3316008 Allow trusted IDs to add/rm user tags via API 2021-11-18 15:58:40 +05:30
sairajzero
a7bab7ed6e Backup DB feature 2021-10-15 22:54:15 +05:30
sairajzero
96b9d3b6e9 Setup files
- Adding setup files to configure, set password.
- Private key will now be stored in encrypted shares. Password will be required for running the server.
- Automated creation of MySQL schema.
- Making floGlobals common for both server and client.
- Fixed a minor bug in database.js
2021-09-29 04:14:02 +05:30
sairajzero
8c31de3ccc Config update
- private key and flo addr for the admin
- Adding token URL
2021-09-24 03:34:01 +05:30
sairajzero
a137237010 Create start.js and main.js 2021-08-30 22:04:19 +05:30