mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-03-15 10:26:37 -04:00
update
This commit is contained in:
parent
08d5639a95
commit
ee9205fec9
13
README.md
13
README.md
@ -29,13 +29,13 @@ You can change the network mode in the guice module: BitSquareModule.java
|
||||
* 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)
|
||||
* Arbitrator integration concept
|
||||
* Conceptual refinements
|
||||
* Develop funding model
|
||||
|
||||
### Next steps:
|
||||
* 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
|
||||
* Other trade variants (Buy BTC taker, Sell BTC offerer, Sell BTC offerer)
|
||||
|
||||
|
||||
### Screenshots of basic the use cases:
|
||||
@ -60,8 +60,9 @@ Deposit tx: https://blockchain.info/de/tx/98c6ae55963022871216a6a124c1e1ed7f6308
|
||||
Payout tx: https://blockchain.info/tx/498e2c299ca991b27f61b63fb6ee457819ee9e33ee5a1d250fde47eb15199adc
|
||||
|
||||
|
||||
### Links:
|
||||
### Resources:
|
||||
* Web: http://bitsquare.io
|
||||
* Whitepaper: https://docs.google.com/document/d/1d3EiWZdaM89-P6MVhS53unXv2-pDpSFsN3W4kCGXKgY/edit?pli=1
|
||||
* Overview: http://bitsquare.io/images/overview.png
|
||||
* Discussion: https://bitcointalk.org/index.php?topic=462236
|
||||
* Discussion: https://bitcointalk.org/index.php?topic=647457
|
||||
* Video of POC prototype: https://www.youtube.com/watch?v=ByfnzJzi0bo
|
||||
|
13
TODO.txt
13
TODO.txt
@ -1,13 +0,0 @@
|
||||
- arbitration integration
|
||||
- settings
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
@ -9,7 +9,7 @@ public class Fees
|
||||
{
|
||||
// min dust value lead to exception at for non standard to address pay scripts, so we use a value >= 7860 instead
|
||||
public static BigInteger TX_FEE = Transaction.REFERENCE_DEFAULT_MIN_TX_FEE;
|
||||
public static BigInteger ACCOUNT_REGISTRATION_FEE = Utils.toNanoCoins("0.0002");
|
||||
public static BigInteger OFFER_CREATION_FEE = Utils.toNanoCoins("0.0002");
|
||||
public static BigInteger ACCOUNT_REGISTRATION_FEE = Utils.toNanoCoins("0.01");
|
||||
public static BigInteger OFFER_CREATION_FEE = Utils.toNanoCoins("0.001");
|
||||
public static BigInteger OFFER_TAKER_FEE = OFFER_CREATION_FEE;
|
||||
}
|
||||
|
@ -508,7 +508,7 @@ public class WalletFacade
|
||||
}
|
||||
|
||||
// 4 step deposit tx: Offerer send deposit tx to taker
|
||||
public void takerCommitDepositTx(String depositTxAsHex)
|
||||
public String takerCommitDepositTx(String depositTxAsHex)
|
||||
{
|
||||
log.trace("takerCommitDepositTx");
|
||||
log.trace("inputs: ");
|
||||
@ -528,6 +528,8 @@ public class WalletFacade
|
||||
throw new RuntimeException(e); // Cannot happen, we already called multisigContract.verify()
|
||||
}
|
||||
|
||||
return depositTx.getHashAsString();
|
||||
|
||||
}
|
||||
|
||||
// 5. step payout tx: Offerer creates payout tx and signs it
|
||||
|
@ -94,10 +94,10 @@ public class CreateOfferController implements Initializable, ChildController
|
||||
|
||||
|
||||
//TODO
|
||||
amountTextField.setText("0,001");
|
||||
minAmountTextField.setText("0,001");
|
||||
priceTextField.setText("300");
|
||||
collateralTextField.setText("50");
|
||||
/* amountTextField.setText(""+(int)(new Random().nextDouble()*100/10+1));
|
||||
priceTextField.setText(""+ (int)(499 - new Random().nextDouble()*1000/100)); */
|
||||
minAmountTextField.setText("0,1");
|
||||
collateralTextField.setText("10");
|
||||
updateVolume();
|
||||
|
||||
amountTextField.textProperty().addListener(new ChangeListener<String>()
|
||||
|
@ -171,7 +171,7 @@ public class TakerTradeController implements Initializable, ChildController
|
||||
totalLabel = FormBuilder.addTextField(gridPane, "Total (" + offer.getCurrency() + "):", Formatter.formatVolume(getVolume()), ++row);
|
||||
collateralTextField = FormBuilder.addTextField(gridPane, "Collateral (BTC):", "", ++row);
|
||||
applyCollateral();
|
||||
FormBuilder.addTextField(gridPane, "Offer fee (BTC):", Utils.bitcoinValueToFriendlyString(Fees.OFFER_TAKER_FEE.add(Transaction.MIN_NONDUST_OUTPUT).add(Fees.TX_FEE)), ++row);
|
||||
FormBuilder.addTextField(gridPane, "Offer fee (BTC):", Utils.bitcoinValueToFriendlyString(Fees.OFFER_TAKER_FEE.add(Fees.TX_FEE)), ++row);
|
||||
totalToPayLabel = FormBuilder.addTextField(gridPane, "Total to pay (BTC):", getTotalToPay(), ++row);
|
||||
|
||||
isOnlineTextField = FormBuilder.addTextField(gridPane, "Online status:", "Checking offerers online status...", ++row);
|
||||
|
@ -98,7 +98,7 @@ public class MessageFacade
|
||||
try
|
||||
{
|
||||
createMyPeerInstance(keyName, port);
|
||||
//setupStorage();
|
||||
setupStorage();
|
||||
//TODO save periodically or get informed if network address changes
|
||||
saveMyAddressToDHT();
|
||||
setupReplyHandler();
|
||||
@ -160,10 +160,11 @@ public class MessageFacade
|
||||
public void addOffer(Offer offer) throws IOException
|
||||
{
|
||||
Number160 locationKey = Number160.createHash(offer.getCurrency().getCurrencyCode());
|
||||
Number160 contentKey = Number160.createHash(offer.getUid());
|
||||
final Number160 contentKey = Number160.createHash(offer.getUid());
|
||||
final Data offerData = new Data(offer);
|
||||
//offerData.setTTLSeconds(5);
|
||||
final FutureDHT addFuture = myPeer.put(locationKey).setData(contentKey, offerData).start();
|
||||
//final FutureDHT addFuture = myPeer.add(locationKey).setData(offerData).start();
|
||||
addFuture.addListener(new BaseFutureAdapter<BaseFuture>()
|
||||
{
|
||||
@Override
|
||||
|
@ -197,6 +197,7 @@ public class OrderBook implements OrderBookListener
|
||||
if (success && dataMap != null)
|
||||
{
|
||||
allOffers.clear();
|
||||
|
||||
for (Data offerData : dataMap.values())
|
||||
{
|
||||
try
|
||||
|
@ -471,9 +471,9 @@ public class TakerPaymentProtocol
|
||||
{
|
||||
log.debug("3.6 DepositTxID received: " + tradeMessage.getDepositTxAsHex());
|
||||
|
||||
walletFacade.takerCommitDepositTx(tradeMessage.getDepositTxAsHex());
|
||||
String txID = walletFacade.takerCommitDepositTx(tradeMessage.getDepositTxAsHex());
|
||||
takerPaymentProtocolListener.onProgress(getProgress());
|
||||
takerPaymentProtocolListener.onDepositTxPublished(tradeMessage.getDepositTxAsHex());
|
||||
takerPaymentProtocolListener.onDepositTxPublished(txID);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user