With this pull request, the daemon can process swaps. It pauses the market once the SwapAccept message has been crafted and unpauses the market once the SwapComplete message is received from clients.
Support for concurrent users will be addressed later.
CHANGELOG
Add TradePropose service
Add TradeComplete service
Add Swaps data model
Add market making function for calculating amountR given balances and proposed amount.
Add pushTx helper function
Add payFees method to wallet
There is a catch: The market entry in the database need to be inserted manually after a deposit of both base and quoted assets. The deposit addresses are printed in the log when the daemon is started.
With this pull request, the daemon can process swaps. It pauses the market once the
SwapAccept
message has been crafted and unpauses the market once theSwapComplete
message is received from clients.Support for concurrent users will be addressed later.
CHANGELOG
TradePropose
serviceTradeComplete
serviceSwaps
data modelpushTx
helper functionpayFees
method to walletThere is a catch: The market entry in the database need to be inserted manually after a deposit of both base and quoted assets. The deposit addresses are printed in the log when the daemon is started.