- Added: fee_from_receiver option to create transaction.
- change_address and fee_from_receiver are passed as options for createTx, createSignedTx, sendTx and createMultiSigTx
- Fixed: getTx not rejecting properly when txid is invalid
- Added API to check the balance and closing-amount needed for blockchain-bonds and bobs fund (checkBlockchainBond, checkBobsFund) in floExchangeAPI.
- API resolves values in
.pending: bond/fund closed by user, but not yet finished processing
.ready: bond/fund ready to close by users
.upcoming: bond/fund that will be out of lockin period (by given prior_time parameter)
- Fixed: Bonds and Funds closing data not written to DB due to async
- Fixed: floExchangeAPI not reading trusted-id list from blockchain
- Added floExchangeAPI.config: getters for trustedList, assetList and tagList
- Fixed: keys.addShare unhandled on reject
- Fixed: sinks in Cooldown period not added in sink_chest (for market to verify tx that already occurred) on master process start.
- Fixed: sink list from slaves not handled properly for reconstruct (if needed)
- Fixed: minor syntax bugs
- Added file lock using proper-lockfile module to prevent data corruption when multiple shares are queued to write at the same time
- Fixed: sinkShares Table num value throwing error when random number is negative. (Updated 'num' column to Unsigned)
- Changed INT_MIN, INT_MAX to UNSIGNED_INT_MIN, UNSIGNED_INT_MAX
- Added: support for multi-instance in keys module
- Fixed: index_dir and prime_file throwing error on startup
- Added: on init, create index directory if not exist
- Fixed: sink_chest. pick and active_pick returning undefined sometimes
- Fixed: various syntax bugs
- Fixed: get-sink, generate-sink, reshare-sink, discard-sink API not working
- Fixed: API not working
- Fixed: SQL syntax in to_refund_sql in verifyConvert for timeout requests
- Fixed: key management init not invoked
- Fixed: Minor bug in getConvertValues. Also, have null value if not available.
- Added console.debug to rejected promise (SQL write) on readDataFromBlockchain in Blockchain bonds and Bob's fund
- generateSink: generates a sinkID for given group
- reshareSink: regenerate the shares for given id and distribute
- discardSink: discards the given sink id
Note: All these APIs are admin-only
- floExchangeAPI.getSink: resolves an active sink id (for a service, default: exchange)
- services can be listed in floExchangeAPI.serviceList
- floExchangeAPI.getConvertValues: resolves the available convert values
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
- Updated database module so that other modules can use it directly by require()
- use path module where-ever needed
- Fixed: public directory not viewed in browser when opening the link
- 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)
- 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
- 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
- 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
- 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
- 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
- Changed broadcastTx to coinb API to eliminate $.ajax requirement
- Set default value for fee=null (automatic fee) to createSignedTx and createMultiSigTx
- 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
- 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