Commit Graph

44 Commits

Author SHA1 Message Date
sairajzero
e4adaf7ed7 Minor changes and Bug fixes
- deduce BTC fee from users
- If timeout rejected tx are confirmed, refund the asset
- Blockchain bond and Bob's fund withdraw now sends equivalent BTC to users (via BTC blockchain)
- Fixed minor bugs
- Changed toFixed (fn to limit the decimal) to toStandardDecimal (set_global.js)
2022-11-05 03:56:40 +05:30
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
a7747a2ecf Bug fix
- Fixed: Bob's fund data not read from blockchain
- Fixed: incorrect senders list passed to readData from blockchain
- Fixed: when data is not saved in DB correctly, do not update LastTx, hence in next refresh, it might get resolved
- Fixed: bugs in Blockchain bonds closing and bob's fund closing
- Merged parse.main and parse.end in Bob's fund module
2022-10-26 04:55:50 +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
4b26ad60bd Bug fix
- Adding rate column to DirectConvert table to store the rate of conversion
- Fixed: withdrawConvertFundCurrency not working correctly
- Fixed: closeBlockchainBond and closeBobsFundInvestment syntax bugs
- Adding request_timeout after with convert request will expire if tx from user is still unconfirmed
- Fixed: conversion result value has more than 8 decimal places
- Fixed minor syntax bugs
2022-10-25 02:12:58 +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
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
970b4547cb Update Std_op 2022-10-18 04:46:15 +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
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
a193291bd7 APIs for coin-convert feature 2022-10-07 23:02:59 +05:30
sairajzero
87e6bc01de Update floExchangeAPI.js 2022-10-07 23:01:09 +05:30
sairajzero
bdd79a1a76 Adding support for BTC withdrawal 2022-09-30 05:52:30 +05:30
sairajzero
d2f1ba8cda Update std_ops 2022-09-30 04:21:58 +05:30
sairaj mote
2c344c4614 UI/UX and feature update
-- implemented new UI for portfolio assets deposit/withdraw/transfer and view asset specific history
-- minor bug fixes
2022-06-04 16:51:23 +05:30
sairaj mote
b5c20be089 minor UI fixes 2022-05-26 17:52:59 +05:30
sairaj mote
fdc93ae18a removed PWA assets 2022-05-25 20:01:28 +05:30
sairaj mote
142eb0d22f testing pwa functionality 2022-05-25 19:41:19 +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
sairaj mote
44541513ef Feature and UI/UX update
-- added lazy loading to market trades
-- trading view is default view when opening asset page
-- removed popup trading panel UX
2022-05-24 18:06:08 +05:30
sairaj mote
83df56f259 Bug fixes and UI improvements
-- fixed calculation error when rounding to 8 decimal places
2022-05-15 00:12:10 +05:30
sairajzero
a77f7d77d6 Error codes
- Added error codes for floExchangeAPI
2022-05-12 01:40:31 +05:30
sairajzero
7a4261c5a0 floExchangeAPI_v1.1.2
- Changing version number for previous update
2022-05-02 23:30:56 +05:30
sairajzero
ac2b4c3c1c Update floExchangeAPI.js
- Store asset and tag list in localStorage when refreshing data from blockchain
- localStorage keys:
exchange-assets
exchange-tags
2022-05-02 23:28:15 +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
sairaj mote
eaa7d8011d Added loading when refreshing wallet balance 2022-05-01 17:27:19 +05:30
sairajzero
e88799f01f update std-op 2022-04-26 03:30:51 +05:30
sairajzero
38cc9659ce floExchangeAPI v1.1.1
- All rejected errors are now an instance of ExchangeError
2022-04-21 02:49:02 +05:30
sairajzero
9331373faf Merge branch 'main' of https://github.com/ranchimall/exchange-market 2022-04-17 03:48:16 +05:30
sairaj mote
237e2498b3 Typo fixes 2022-04-15 18:15:00 +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
6451f02546 rate-history API 2022-03-30 05:38:55 +05:30
sairajzero
6702541254 minor bug fix
Fixed: K_Bucket not defined bug in user page
2022-03-21 16:30:25 +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
sairajzero
ef0599d915 get-balance API
Added: get-balance API to fetch total balance
- accepts 2 parameters: floID and token. Requires atleast one of them for the API to work
/get-balance?floID=<floID>&token=<token> : responses balance of a specific token for a floID
/get-balance?floID=<floID> : responses all token balance for a floID
/get-balance?token=<token> : reponses balance of a specific token for every floID

Note (optional): in GET request
- floID=<floID> can be replaced with addr=<floID>
- token=<token> can be replaced with asset=<asset>
Both responses the same result as above
2022-03-18 00:50:39 +05:30
sairajzero
a18ccf426e Added clearLocalStorage
- Added a UI button that clears local data
 . Useful to clear login credentials, nodelist, lastTx when stuck in some version change bugs
2022-03-17 19:17:52 +05:30
sairajzero
eed495ab83 Bug fixes
- Fixed: transferToken not processed by server
- blockchainReCheck stops and adds itself to Timeout callback when sinkID is not loaded (uses MINI_PERIOD_INTERVAL = PERIOD_INTERVAL/10 for timeout ms)
- Fixed: confirmDepositFLO - asset attribute missing in SQL syntax
- When sinkID is not loaded, cancel check for confirmDepositFLO and confirmDepositToken
- Fixed: Incorrect receiver (sinkID) bug in confirmDepositFLO.checkTx
- Uncommented loaded, received, retrived sink logs
- Changed (SQL schema) sign field in RequestLog table to VARCHAR(160)
- Fixed: minor syntax errors and typos bugs
2022-03-17 03:06:00 +05:30
sairajzero
4c6ae601ea Update lib.js 2022-03-16 02:20:56 +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