diff --git a/README.md b/README.md index 115f834a69..2f48d28cc6 100644 --- a/README.md +++ b/README.md @@ -3,43 +3,45 @@ Bitsquare is a P2P Fiat-BTC Exchange, extensible to a generic P2P trading platform (include commodities and cryptocurrencies) -This is just a first very basic GUI prototype with mock data. -There is only the trade process for Sell BTC and the role of the offer taker modelled yet. +This is just a proof of concept prototype for demonstrating the basic workflow of the trader process. +It is not at all production code style (no tests, verifications missing, very limited use cases,...). The project use Java 8 and Maven. We use the bitcoinj library and TomP2P for DHT and messaging. ### Implemented (prototype level): -* Screen for orderbook with filtering mock offers by amount, price and order type (buy, sell) -* Screen for creating an offer -* Screen for offer taking and payment process (needs update) +* Orderbook with filtering offers by amount, price, order type, trading account(buy, sell) +* Create offer +* Take offer * Simple persistence * bitcoinj integration * Setup with account registration and tx with OP_RETURN + embedded and blinded bank account data * Offer fee payment with a OP_RETURN tx and fees to miners * Pay in to MS fund * Payout from MS fund -* TomP2P as messaging lib integrated and basic use cases in msg screen implemented: orderbook, add order, remove order, find peer, chat with peer -* Payment process until wait for bank transfer implemented with messaging +* TomP2P as messaging lib integrated and basic use cases in msg screen implemented: orderbook, add order, remove order, peer interaction +* Payment process implemented with messaging for Offerer buy BTC case +* Hash of contract data embedded into tx (OP_RETURN) ### Next steps: -* Payment process after wait for bank transfer implemented with messaging -* Arbitrator integration +* Conceptual refinements +* Arbitrator integration concept * Other trade variants (Buy BTC taker, Sell BTC offerer, Sell BTC offerer) -* ... +* Develop funding model +* Start development of production version ### Screenshots of basic screens: -* [Registration screen 1](https://github.com/bitsquare/bitsquare/tree/master/screenshots/reg1.png) -* [Registration screen 2](https://github.com/bitsquare/bitsquare/tree/master/screenshots/reg2.png) -* [Registration screen 3](https://github.com/bitsquare/bitsquare/tree/master/screenshots/reg3.png) +* [Registration screen 1](https://github.com/bitsquare/bitsquare/tree/master/screenshots/registration_3.png) +* [Registration screen 2](https://github.com/bitsquare/bitsquare/tree/master/screenshots/registration_bank_account.png) * [Orderbook screen 1](https://github.com/bitsquare/bitsquare/tree/master/screenshots/orderbook1.png) * [Orderbook screen 2](https://github.com/bitsquare/bitsquare/tree/master/screenshots/orderbook2.png) -* [Create Offer screen 1](https://github.com/bitsquare/bitsquare/tree/master/screenshots/newOffer1.png) -* [Create Offer screen 2](https://github.com/bitsquare/bitsquare/tree/master/screenshots/newOffer2.png) -* [Trade screen](https://github.com/bitsquare/bitsquare/tree/master/screenshots/trade.png) -* [Bank transfer screen](https://github.com/bitsquare/bitsquare/tree/master/screenshots/bank_transfer.png) -* [Trade completed screen](https://github.com/bitsquare/bitsquare/tree/master/screenshots/completed.png) +* [Create Offer screen](https://github.com/bitsquare/bitsquare/tree/master/screenshots/create_offer_2.png) +* [Take offer screen](https://github.com/bitsquare/bitsquare/tree/master/screenshots/take_offer.png) +* [Deposit tx screen](https://github.com/bitsquare/bitsquare/tree/master/screenshots/deposit_conf.png) +* [Check bank tx screen](https://github.com/bitsquare/bitsquare/tree/master/screenshots/bank_tx_inited.png) +* [Trade completed screen](https://github.com/bitsquare/bitsquare/tree/master/screenshots/trade_complete.png) +* [More screenshots](https://github.com/bitsquare/bitsquare/tree/master/screenshots) ### Links: diff --git a/TODO.txt b/TODO.txt index 805e4623fc..b4decedf5d 100644 --- a/TODO.txt +++ b/TODO.txt @@ -5,6 +5,7 @@ low prio: - start with orderbook and open registration when user interacts with orderbook (take offer, create offer) - settings screen - return to setup when unregistered, change/add bank accounts from settings +- refactor trade process - formatting - validation diff --git a/screenshots/bank_transfer.png b/screenshots/bank_transfer.png deleted file mode 100644 index b8a5069dce..0000000000 Binary files a/screenshots/bank_transfer.png and /dev/null differ diff --git a/screenshots/bank_tx_inited.png b/screenshots/bank_tx_inited.png new file mode 100644 index 0000000000..7eaa3dec83 Binary files /dev/null and b/screenshots/bank_tx_inited.png differ diff --git a/screenshots/completed.png b/screenshots/completed.png deleted file mode 100644 index cb876cd2c6..0000000000 Binary files a/screenshots/completed.png and /dev/null differ diff --git a/screenshots/create_offer.png b/screenshots/create_offer.png new file mode 100644 index 0000000000..5857c5bf90 Binary files /dev/null and b/screenshots/create_offer.png differ diff --git a/screenshots/create_offer_2.png b/screenshots/create_offer_2.png new file mode 100644 index 0000000000..9c3ba6139f Binary files /dev/null and b/screenshots/create_offer_2.png differ diff --git a/screenshots/deposit.png b/screenshots/deposit.png new file mode 100644 index 0000000000..0a9004345b Binary files /dev/null and b/screenshots/deposit.png differ diff --git a/screenshots/deposit_conf.png b/screenshots/deposit_conf.png new file mode 100644 index 0000000000..eff6ff3c41 Binary files /dev/null and b/screenshots/deposit_conf.png differ diff --git a/screenshots/funds.png b/screenshots/funds.png new file mode 100644 index 0000000000..bd5d917de3 Binary files /dev/null and b/screenshots/funds.png differ diff --git a/screenshots/funds_conf.png b/screenshots/funds_conf.png new file mode 100644 index 0000000000..483b9a898b Binary files /dev/null and b/screenshots/funds_conf.png differ diff --git a/screenshots/funds_pending.png b/screenshots/funds_pending.png new file mode 100644 index 0000000000..2cac4a8c70 Binary files /dev/null and b/screenshots/funds_pending.png differ diff --git a/screenshots/newOffer1.png b/screenshots/newOffer1.png deleted file mode 100644 index 60af81a858..0000000000 Binary files a/screenshots/newOffer1.png and /dev/null differ diff --git a/screenshots/newOffer2.png b/screenshots/newOffer2.png deleted file mode 100644 index b1c1927dc3..0000000000 Binary files a/screenshots/newOffer2.png and /dev/null differ diff --git a/screenshots/offerer_remove_offer.png b/screenshots/offerer_remove_offer.png new file mode 100644 index 0000000000..14f8a789fa Binary files /dev/null and b/screenshots/offerer_remove_offer.png differ diff --git a/screenshots/offerer_taker.png b/screenshots/offerer_taker.png new file mode 100644 index 0000000000..8a2fce0c9d Binary files /dev/null and b/screenshots/offerer_taker.png differ diff --git a/screenshots/reg1.png b/screenshots/reg1.png deleted file mode 100644 index 72220fad8a..0000000000 Binary files a/screenshots/reg1.png and /dev/null differ diff --git a/screenshots/reg2.png b/screenshots/reg2.png deleted file mode 100644 index 5eec6f7adf..0000000000 Binary files a/screenshots/reg2.png and /dev/null differ diff --git a/screenshots/reg3.png b/screenshots/reg3.png deleted file mode 100644 index 0ce4d3c912..0000000000 Binary files a/screenshots/reg3.png and /dev/null differ diff --git a/screenshots/reg4.png b/screenshots/reg4.png deleted file mode 100644 index 3663be0b57..0000000000 Binary files a/screenshots/reg4.png and /dev/null differ diff --git a/screenshots/registration_1.png b/screenshots/registration_1.png new file mode 100644 index 0000000000..720633c7ec Binary files /dev/null and b/screenshots/registration_1.png differ diff --git a/screenshots/registration_2.png b/screenshots/registration_2.png new file mode 100644 index 0000000000..5e3e99d74b Binary files /dev/null and b/screenshots/registration_2.png differ diff --git a/screenshots/registration_3.png b/screenshots/registration_3.png new file mode 100644 index 0000000000..7d3d076ac6 Binary files /dev/null and b/screenshots/registration_3.png differ diff --git a/screenshots/registration_bank_account.png b/screenshots/registration_bank_account.png new file mode 100644 index 0000000000..09316cf604 Binary files /dev/null and b/screenshots/registration_bank_account.png differ diff --git a/screenshots/registration_pref.png b/screenshots/registration_pref.png new file mode 100644 index 0000000000..7734d69836 Binary files /dev/null and b/screenshots/registration_pref.png differ diff --git a/screenshots/take_offer.png b/screenshots/take_offer.png new file mode 100644 index 0000000000..b6495fcbdc Binary files /dev/null and b/screenshots/take_offer.png differ diff --git a/screenshots/taker_see_offer.png b/screenshots/taker_see_offer.png new file mode 100644 index 0000000000..70eb498099 Binary files /dev/null and b/screenshots/taker_see_offer.png differ diff --git a/screenshots/trade.png b/screenshots/trade.png deleted file mode 100644 index 01c857258f..0000000000 Binary files a/screenshots/trade.png and /dev/null differ diff --git a/screenshots/trade_complete.png b/screenshots/trade_complete.png new file mode 100644 index 0000000000..9a0ba36732 Binary files /dev/null and b/screenshots/trade_complete.png differ diff --git a/src/main/java/io/bitsquare/gui/market/trade/TakerTradeController.java b/src/main/java/io/bitsquare/gui/market/trade/TakerTradeController.java index 862755f8ff..e075709874 100644 --- a/src/main/java/io/bitsquare/gui/market/trade/TakerTradeController.java +++ b/src/main/java/io/bitsquare/gui/market/trade/TakerTradeController.java @@ -362,7 +362,7 @@ public class TakerTradeController implements Initializable, ChildController row = -1; FormBuilder.addHeaderLabel(gridPane, "Trade successfully completed", ++row); - String fiatReceived = Formatter.formatVolume(trade.getOffer().getPrice() * trade.getTradeAmount().doubleValue()); + String fiatReceived = Formatter.formatVolume(trade.getOffer().getPrice() * BtcFormatter.satoshiToBTC(trade.getTradeAmount())); FormBuilder.addTextField(gridPane, "You have sold (BTC):", Utils.bitcoinValueToFriendlyString(trade.getTradeAmount()), ++row); if (takerIsSelling()) diff --git a/src/main/java/io/bitsquare/gui/orders/OrdersController.java b/src/main/java/io/bitsquare/gui/orders/OrdersController.java index 7d5820690f..594ae0cb31 100644 --- a/src/main/java/io/bitsquare/gui/orders/OrdersController.java +++ b/src/main/java/io/bitsquare/gui/orders/OrdersController.java @@ -7,6 +7,7 @@ import de.jensd.fx.fontawesome.AwesomeDude; import de.jensd.fx.fontawesome.AwesomeIcon; import io.bitsquare.bank.BankAccount; import io.bitsquare.bank.BankAccountType; +import io.bitsquare.btc.BtcFormatter; import io.bitsquare.btc.Fees; import io.bitsquare.btc.WalletFacade; import io.bitsquare.gui.ChildController; @@ -308,7 +309,7 @@ public class OrdersController implements Initializable, ChildController primaryBankAccountIDTitleLabel.setText("Total fees (offer fee + tx fee):"); secondaryBankAccountIDTitleLabel.setText("Refunded collateral:"); - String fiatPayed = Formatter.formatVolume(trade.getOffer().getPrice() * trade.getTradeAmount().doubleValue()); + String fiatPayed = Formatter.formatVolume(trade.getOffer().getPrice() * BtcFormatter.satoshiToBTC(trade.getTradeAmount())); bankAccountTypeTextField.setText(Utils.bitcoinValueToFriendlyString(trade.getTradeAmount())); holderNameTextField.setText(fiatPayed);