Commit Graph

138 Commits

Author SHA1 Message Date
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
64a81fc762 Bug fixes
- Fixed SQL query in checkPoolBalance

- Fixed: collectAndCall not set in app
- Fixed assetList not set
- Fixed: confirmDepositToken not working
- Fixed: confirmRefund not working
- Fixed bug: verifyTx.BTC

- Fixed bugs in some multi-value insert queries in SQL
- Fixed various syntax bugs
- Changed success logs to console.info
2022-10-24 15:55:30 +05:30
sairajzero
9e31246b42 Fixed various bugs 2022-10-21 04:02:27 +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
0381c44733 Convert fund management
- Added Withdrawal of convert fund
- Convert fund is moved to a different table (ConvertFund)
- Added APIs for withdraw fund
- Changed add-convert-fund to deposit-convert-fund
- Fixed minor bugs
2022-10-19 21:26:11 +05:30
sairajzero
fde297fb44 Convert feature add-ons
- Reject request when not enough fund is available to convert.
- MIN_FUND  is the minimum fund that should be reserved.
- Add funds for conversion via adminID

- Added: Refund feature
- Automate a refund on currency when convertToCoin request is made when fund is insufficient
- ConvertFrom now accepts an non-broadcasted tx_hex from user and broadcast it when convert fund is available. (if convert fund is insufficient, then tx is not broadcasted)
2022-10-18 04:45:55 +05:30
sairajzero
d8682a2561 minor fixes: bobs fund
- Fixed: tapoutWindow and tapoutInterval storing in DB when there is no tapout
- Fixed: lockin-period and tapout check in closeFund
2022-10-11 17:46:49 +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
d3f08dd921 Background process for close-fund 2022-10-11 16:56:42 +05:30
sairajzero
8a82a0b675 Close Bobs-Fund feature
- Adding feature to close bobs' fund investment upon user requests
- Added: API for the same
2022-10-11 03:15:34 +05:30
sairajzero
80879a250b Bug fix
- Fixed: incorrect eCode file mapped
- moved productStr inside IIF
- Fixed: some minor syntax bugs
2022-10-11 03:05:04 +05:30
sairajzero
7c99f41e48 API for close-blockchain-bonds 2022-10-10 19:23:20 +05:30
sairajzero
90d2a4764e Close-Blockchain-bond support
- Adding feature to close blockchain bonds upon user requests (when lock-in period is over)
- Improved some syntax and structure of coding
2022-10-10 19:22:51 +05:30
sairajzero
fef11b4712 moving conversion.js into service folder 2022-10-09 23:08:48 +05:30
sairajzero
5344b79cdb Minor Syntax improvements
- Replaced convertDateToString() to new Date() as SQL queries accepts js-object Date
- Pass nested array for bulk insert in backup-restore
2022-10-08 19:13:50 +05:30
sairajzero
a193291bd7 APIs for coin-convert feature 2022-10-07 23:02:59 +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
1e8f2c17e7 Fix: invoking 'collectAndCall' for withdraws 2022-09-26 01:34:26 +05:30
sairajzero
dd232c5a71 Fixes: sinkID and sinkPrivKey usage 2022-09-25 02:28:08 +05:30
sairajzero
65f7a5d94e Improved sink-key management
- multiple sink keys supported
- sink keys are split and shared among nodes (master and slaves)
- when a key is required, master collects the shares from slaves and reconstructs. (key is removed from memory after usage)
2022-09-25 01:06:08 +05:30
sairajzero
078a3af051 Update market.js
- Removed floID field returned by get-transact API (as its already filtered by floID)
2022-05-25 04:14:09 +05:30
sairajzero
166778e7f8 get-transact API
- Get user's deposit and withdraw history (private request: ie, requires signing)
- Update floTokenAPI
2022-05-25 03:55:55 +05:30
sairajzero
56e571606c Update stdop 2022-05-25 02:31:31 +05:30
sairajzero
f73e96bb5a Update _constants.js
MAXIMUM_LAUNCH_SELL_CHIPS reduced to 100000
2022-05-24 17:26:17 +05:30
sairajzero
e09e25fbd4 Updating price up/down percentage 2022-05-14 19:31:16 +05:30
sairajzero
a77f7d77d6 Error codes
- Added error codes for floExchangeAPI
2022-05-12 01:40:31 +05:30
sairajzero
8722b6cb60 Issue Fix
- Trigger coupling on cancel orders
2022-05-08 01:54:10 +05:30
sairajzero
838a12b361 Bug fix
- Fixed: Timeout not called upon initial coupling
- 'Cannot sell below purchased price' incorrectly shown when its actually valid order placement
- UI: parsing of get-rates API (latest update)
2022-05-07 23:17:02 +05:30
sairajzero
09953d252a Optimised blockchainReCheck
- Check if a new block has come at start of blockchainReCheck
- Checks for confirmation of txns only when a new block in the blockchain
2022-05-07 01:23:55 +05:30
sairajzero
d444e96259 checkSellRequirement: sell-chip's base
- Check for sell-chips's base price when placing sell order.
- Returns 'Cannot sell below purchased price' when not enough sell-chips above the base for placing order
2022-05-07 01:04:49 +05:30
sairajzero
fb9ac8080b Fixed: price storeHistory
- price.storeHistory interval will trigger only when node is master
2022-05-07 00:15:34 +05:30
sairajzero
54470b42d7 get-rates API improved
- get-rates API will now give a countDown timer
- this will be time at which next price update will happen unless a trade occurs
- Update: _constants.js for previous update
2022-05-07 00:03:36 +05:30
sairajzero
d3c5682994 Improved Triggers for coupling process
- moved periodic-process start/stop to market.js
- price.getRates() will update price only when updatePrice is true (ie, regular fn call wont update price unnecessarily)
- Trigger coupling for asset on successful order placement
- Return (or wait) if a coupling instance is running for asset
- Reset timeout when price is updated and/or trade has happened.
- Next coupling instance will be set for timeout upon completion of one instance
- Stop all coupling instances on app pause (i.e., node is not master)
2022-05-06 23:43:44 +05:30
sairajzero
d44531211a Bug Fix: list buy/sell giving error
Fixed: only_full_group_by error return by SQL statement
2022-05-04 15:16:18 +05:30
sairajzero
55bd121021 API for ordered list for sell/buy
- The API for Listing sell/buy orders now returns ordered list of the queue (approx).
- list-buyorders, list-sellorders and list-trades API now accepts optional GET parameter 'asset'.
  . If passed, then orders/trades of only given asset will be returned.
  . If asset is not passed, then returns all asset by default as before.
- list buy/sell order API return max of 100 best orders
- list trade API return max of 1000 recent trades
2022-05-02 22:53:57 +05:30
sairajzero
3c97cb4810 Update _constants.js
- dec MAXIMUM_LAUNCH_SELL_CHIPS to 250K
- inc SIGN_EXPIRE_TIME to 5 mins
2022-05-01 20:18:03 +05:30
sairajzero
6c86c0a94b Adding switch for rated-seller check 2022-05-01 19:49:22 +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
e88799f01f update std-op 2022-04-26 03:30:51 +05:30
sairajzero
74b643fc08 Ambiguity fix
Changes to remove ambiguity of data during backup system
- Converted all Float and Decimal to DECIMAL(16, 8)
- Converted Datetime to Timestamp
- Fixed: Storing time data in backup
2022-04-18 21:07:15 +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
9caf3fc9ec Distributor feature and Balance structure change
- Distributor feature allows to mark floIDs as distributors for certain asset.
- Added 2 APIs: add-distributor, remove-distributor
- Changing structure for token balance in exchange system. (requirement for new rule update).
2022-04-13 01:06:01 +05:30
sairajzero
deb746ef9e Increase decimal toFixed(8) 2022-03-30 20:38:08 +05:30
sairajzero
4967d52a88 Bug fix: rate history API not working 2022-03-30 05:49:43 +05:30
sairajzero
6451f02546 rate-history API 2022-03-30 05:38:55 +05:30
sairajzero
fa46e1132f Bug fix: getRate for an asset not working 2022-03-29 15:53:01 +05:30
sairajzero
01dcd9b2d1 Bug fix
Fixed: Unable to process null returned from SQL SUM()
2022-03-22 14:11:55 +05:30
sairajzero
6add4625c8 Renaming files
Renamed tokenAPI to floTokenAPI
Renamed exchangeAPI to floExchangeAPI
2022-03-21 16:24:25 +05:30
sairajzero
5e074f5e1d warping exchange-api functions
- Warped exchange api functions into an object (works with both modules.exports and window (browser))
- Moved K_bucket.js into exchangeAPI.js
2022-03-21 16:20:33 +05:30