mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-06 05:34:50 -04:00
Update to tomp2p beta7, UpdateFX 1.6, add Dev mode,...
This commit is contained in:
parent
b5e29d0cf7
commit
27381b0e98
30 changed files with 238 additions and 180 deletions
|
@ -5,7 +5,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>parent</artifactId>
|
<artifactId>parent</artifactId>
|
||||||
<groupId>io.bitsquare</groupId>
|
<groupId>io.bitsquare</groupId>
|
||||||
<version>0.2.1-SNAPSHOT</version>
|
<version>0.2.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,7 @@ public class BootstrapNode {
|
||||||
@Override
|
@Override
|
||||||
public void peerUpdated(PeerAddress peerAddress, PeerStatistic peerStatistics) {
|
public void peerUpdated(PeerAddress peerAddress, PeerStatistic peerStatistics) {
|
||||||
try {
|
try {
|
||||||
log.info("Peer updated: peerAddress=" + peerAddress + ", peerStatistics=" + peerStatistics);
|
//log.info("Peer updated: peerAddress=" + peerAddress + ", peerStatistics=" + peerStatistics);
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
log.error("Exception at peerUpdated " + t.getMessage());
|
log.error("Exception at peerUpdated " + t.getMessage());
|
||||||
}
|
}
|
||||||
|
|
55
core/pom.xml
55
core/pom.xml
|
@ -6,7 +6,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>parent</artifactId>
|
<artifactId>parent</artifactId>
|
||||||
<groupId>io.bitsquare</groupId>
|
<groupId>io.bitsquare</groupId>
|
||||||
<version>0.2.1-SNAPSHOT</version>
|
<version>0.2.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>core</artifactId>
|
<artifactId>core</artifactId>
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.tomp2p</groupId>
|
<groupId>net.tomp2p</groupId>
|
||||||
<artifactId>tomp2p-all</artifactId>
|
<artifactId>tomp2p-all</artifactId>
|
||||||
<version>5.0-Beta6</version>
|
<version>5.0-Beta7</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -56,21 +56,20 @@
|
||||||
<version>1.52</version>
|
<version>1.52</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.inject</groupId>
|
||||||
|
<artifactId>guice</artifactId>
|
||||||
|
<version>3.0</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.guava</groupId>
|
<groupId>com.google.guava</groupId>
|
||||||
<artifactId>guava</artifactId>
|
<artifactId>guava</artifactId>
|
||||||
<version>16.0.1</version>
|
<version>16.0.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ch.qos.logback</groupId>
|
<groupId>com.google.code.gson</groupId>
|
||||||
<artifactId>logback-core</artifactId>
|
<artifactId>gson</artifactId>
|
||||||
<version>1.1.2</version>
|
<version>2.2.4</version>
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>ch.qos.logback</groupId>
|
|
||||||
<artifactId>logback-classic</artifactId>
|
|
||||||
<version>1.1.2</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -88,43 +87,33 @@
|
||||||
<artifactId>jopt-simple</artifactId>
|
<artifactId>jopt-simple</artifactId>
|
||||||
<version>4.8</version>
|
<version>4.8</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.google.inject</groupId>
|
|
||||||
<artifactId>guice</artifactId>
|
|
||||||
<version>3.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.google.code.gson</groupId>
|
|
||||||
<artifactId>gson</artifactId>
|
|
||||||
<version>2.2.4</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.glxn</groupId>
|
<groupId>net.glxn</groupId>
|
||||||
<artifactId>qrgen</artifactId>
|
<artifactId>qrgen</artifactId>
|
||||||
<version>1.3</version>
|
<version>1.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<!-- <dependency>
|
||||||
<groupId>com.google.code.findbugs</groupId>
|
<groupId>com.google.code.findbugs</groupId>
|
||||||
<artifactId>jsr305</artifactId>
|
<artifactId>jsr305</artifactId>
|
||||||
<version>2.0.1</version>
|
<version>2.0.1</version>
|
||||||
</dependency>
|
</dependency>-->
|
||||||
<dependency>
|
<!-- <dependency>
|
||||||
<groupId>net.jcip</groupId>
|
<groupId>net.jcip</groupId>
|
||||||
<artifactId>jcip-annotations</artifactId>
|
<artifactId>jcip-annotations</artifactId>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
</dependency>
|
</dependency>-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jetbrains</groupId>
|
<groupId>org.jetbrains</groupId>
|
||||||
<artifactId>annotations</artifactId>
|
<artifactId>annotations</artifactId>
|
||||||
<version>13.0</version>
|
<version>13.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<!-- <dependency>
|
||||||
<groupId>org.fxmisc.easybind</groupId>
|
<groupId>org.fxmisc.easybind</groupId>
|
||||||
<artifactId>easybind</artifactId>
|
<artifactId>easybind</artifactId>
|
||||||
<version>1.0.2</version>
|
<version>1.0.2</version>
|
||||||
</dependency>
|
</dependency>-->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.codahale.metrics</groupId>
|
<groupId>com.codahale.metrics</groupId>
|
||||||
|
@ -132,5 +121,17 @@
|
||||||
<version>3.0.2</version>
|
<version>3.0.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>ch.qos.logback</groupId>
|
||||||
|
<artifactId>logback-core</artifactId>
|
||||||
|
<version>1.1.2</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>ch.qos.logback</groupId>
|
||||||
|
<artifactId>logback-classic</artifactId>
|
||||||
|
<version>1.1.2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -56,8 +56,8 @@ public class FeePolicy {
|
||||||
takeOfferFeeAddress = "1BVxNn3T12veSK6DgqwU4Hdn7QHcDDRag7";
|
takeOfferFeeAddress = "1BVxNn3T12veSK6DgqwU4Hdn7QHcDDRag7";
|
||||||
break;
|
break;
|
||||||
case REGTEST:
|
case REGTEST:
|
||||||
createOfferFeeAddress = "mxmKZruv9x9JLcEj6rZx6Hnm4LLAcQHtcr";
|
createOfferFeeAddress = "mkNW1omJFA7RD3AZ94mfKqubRff2gx21KE";
|
||||||
takeOfferFeeAddress = "mxmKZruv9x9JLcEj6rZx6Hnm4LLAcQHtcr";
|
takeOfferFeeAddress = "mkNW1omJFA7RD3AZ94mfKqubRff2gx21KE";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new BitsquareException("Unknown bitcoin network: %s", bitcoinNetwork);
|
throw new BitsquareException("Unknown bitcoin network: %s", bitcoinNetwork);
|
||||||
|
|
|
@ -148,34 +148,45 @@ public class CryptoService<T> {
|
||||||
Cipher cipherAsym = Cipher.getInstance(ASYM_CIPHER);
|
Cipher cipherAsym = Cipher.getInstance(ASYM_CIPHER);
|
||||||
cipherAsym.init(Cipher.DECRYPT_MODE, keyRing.getMsgEncryptionKeyPair().getPrivate());
|
cipherAsym.init(Cipher.DECRYPT_MODE, keyRing.getMsgEncryptionKeyPair().getPrivate());
|
||||||
Object secretKeyObject = sealedSecretKey.getObject(cipherAsym);
|
Object secretKeyObject = sealedSecretKey.getObject(cipherAsym);
|
||||||
assert secretKeyObject instanceof SecretKey;
|
if (secretKeyObject instanceof SecretKey) {
|
||||||
SecretKey secretKey = (SecretKey) secretKeyObject;
|
SecretKey secretKey = (SecretKey) secretKeyObject;
|
||||||
|
|
||||||
// Decrypt signedMessage with secretKey
|
// Decrypt signedMessage with secretKey
|
||||||
Cipher cipherSym = Cipher.getInstance(SYM_CIPHER);
|
Cipher cipherSym = Cipher.getInstance(SYM_CIPHER);
|
||||||
cipherSym.init(Cipher.DECRYPT_MODE, secretKey);
|
cipherSym.init(Cipher.DECRYPT_MODE, secretKey);
|
||||||
Object signedMessageObject = sealedMessage.getObject(cipherSym);
|
Object signedMessageObject = sealedMessage.getObject(cipherSym);
|
||||||
assert signedMessageObject instanceof SignedObject;
|
if (signedMessageObject instanceof SignedObject) {
|
||||||
SignedObject signedMessage = (SignedObject) signedMessageObject;
|
SignedObject signedMessage = (SignedObject) signedMessageObject;
|
||||||
|
|
||||||
// Verify message with peers pubKey
|
// Verify message with peers pubKey
|
||||||
if (signedMessage.verify(signaturePubKey, Signature.getInstance(MSG_SIGN_ALGO))) {
|
if (signedMessage.verify(signaturePubKey, Signature.getInstance(MSG_SIGN_ALGO))) {
|
||||||
// Get message
|
// Get message
|
||||||
Object messageObject = signedMessage.getObject();
|
Object messageObject = signedMessage.getObject();
|
||||||
assert messageObject instanceof Message;
|
if (messageObject instanceof Message) {
|
||||||
log.debug("Decryption needed {} ms", System.currentTimeMillis() - ts);
|
log.debug("Decryption needed {} ms", System.currentTimeMillis() - ts);
|
||||||
return new MessageWithPubKey((Message) messageObject, signaturePubKey);
|
return new MessageWithPubKey((Message) messageObject, signaturePubKey);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
throw new CryptoException("messageObject is not instance of Message");
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
throw new CryptoException("Signature is not valid");
|
throw new CryptoException("Signature is not valid");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw new CryptoException("signedMessageObject is not instance of SignedObject");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw new CryptoException("secretKeyObject is not instance of SecretKey");
|
||||||
|
}
|
||||||
} catch (NoSuchPaddingException | NoSuchAlgorithmException | InvalidKeyException | BadPaddingException |
|
} catch (NoSuchPaddingException | NoSuchAlgorithmException | InvalidKeyException | BadPaddingException |
|
||||||
ClassNotFoundException | IllegalBlockSizeException | IOException | SignatureException e) {
|
ClassNotFoundException | IllegalBlockSizeException | IOException | SignatureException e) {
|
||||||
throw new CryptoException(e);
|
throw new CryptoException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public String signMessage(ECKey key, Sha256Hash hash) {
|
public String signMessage(ECKey key, Sha256Hash hash) {
|
||||||
ECKey.ECDSASignature sig = key.sign(hash, null);
|
ECKey.ECDSASignature sig = key.sign(hash, null);
|
||||||
// Now we have to work backwards to figure out the recId needed to recover the signature.
|
// Now we have to work backwards to figure out the recId needed to recover the signature.
|
||||||
|
|
|
@ -171,7 +171,7 @@ public class BootstrappedPeerBuilder {
|
||||||
try {
|
try {
|
||||||
// port is evaluated from btc network. 7366 for mainnet, 7367 for testnet and 7368 for regtest
|
// port is evaluated from btc network. 7366 for mainnet, 7367 for testnet and 7368 for regtest
|
||||||
bootstrapNode = Node.at(bootstrapNode.getName(), bootstrapNode.getIp(), bootstrapNode.getPort() + networkId);
|
bootstrapNode = Node.at(bootstrapNode.getName(), bootstrapNode.getIp(), bootstrapNode.getPort() + networkId);
|
||||||
log.debug("Bootstrap to {}", bootstrapNode.toString());
|
log.debug("Bootstrap to {} with networkId {}", bootstrapNode.toString(), networkId);
|
||||||
|
|
||||||
DefaultEventExecutorGroup eventExecutorGroup = new DefaultEventExecutorGroup(20);
|
DefaultEventExecutorGroup eventExecutorGroup = new DefaultEventExecutorGroup(20);
|
||||||
ChannelClientConfiguration clientConf = PeerBuilder.createDefaultChannelClientConfiguration();
|
ChannelClientConfiguration clientConf = PeerBuilder.createDefaultChannelClientConfiguration();
|
||||||
|
|
|
@ -127,8 +127,8 @@ public class TomP2PNode implements ClientNode {
|
||||||
@Override
|
@Override
|
||||||
public void peerUpdated(PeerAddress peerAddress, PeerStatistic peerStatistic) {
|
public void peerUpdated(PeerAddress peerAddress, PeerStatistic peerStatistic) {
|
||||||
BaseP2PService.getUserThread().execute(() -> numPeers.set(peerDHT.peerBean().peerMap().all().size()));
|
BaseP2PService.getUserThread().execute(() -> numPeers.set(peerDHT.peerBean().peerMap().all().size()));
|
||||||
log.debug("peerUpdated " + peerAddress);
|
// log.debug("peerUpdated " + peerAddress);
|
||||||
log.debug("Number of peers = " + peerDHT.peerBean().peerMap().all().size());
|
// log.debug("Number of peers = " + peerDHT.peerBean().peerMap().all().size());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
/* peerDHT.peerBean().addPeerStatusListener(new PeerStatusListener() {
|
/* peerDHT.peerBean().addPeerStatusListener(new PeerStatusListener() {
|
||||||
|
|
|
@ -256,7 +256,7 @@ abstract public class Trade implements Tradable, Model, Serializable {
|
||||||
abstract public void setFailedState();
|
abstract public void setFailedState();
|
||||||
|
|
||||||
public boolean isCriticalFault() {
|
public boolean isCriticalFault() {
|
||||||
return tradeState.getPhase().ordinal() >= TradeState.Phase.DEPOSIT_PAID.ordinal();
|
return tradeState.getPhase() != null && tradeState.getPhase().ordinal() >= TradeState.Phase.DEPOSIT_PAID.ordinal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ public class TradeManager {
|
||||||
private final CryptoService<MailboxMessage> cryptoService;
|
private final CryptoService<MailboxMessage> cryptoService;
|
||||||
private final OpenOfferManager openOfferManager;
|
private final OpenOfferManager openOfferManager;
|
||||||
private final ClosedTradableManager closedTradableManager;
|
private final ClosedTradableManager closedTradableManager;
|
||||||
private FailedTradesManager failedTradesManager;
|
private final FailedTradesManager failedTradesManager;
|
||||||
private final ArbitrationRepository arbitrationRepository;
|
private final ArbitrationRepository arbitrationRepository;
|
||||||
|
|
||||||
private final Storage<TradableList<Trade>> pendingTradesStorage;
|
private final Storage<TradableList<Trade>> pendingTradesStorage;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>parent</artifactId>
|
<artifactId>parent</artifactId>
|
||||||
<groupId>io.bitsquare</groupId>
|
<groupId>io.bitsquare</groupId>
|
||||||
<version>0.2.1-SNAPSHOT</version>
|
<version>0.2.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
@ -131,11 +131,11 @@
|
||||||
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<!-- <dependency>
|
||||||
<groupId>com.vinumeris</groupId>
|
<groupId>com.vinumeris</groupId>
|
||||||
<artifactId>crashfx-client</artifactId>
|
<artifactId>crashfx-client</artifactId>
|
||||||
<version>1.1</version>
|
<version>1.1</version>
|
||||||
</dependency>
|
</dependency>-->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.controlsfx</groupId>
|
<groupId>org.controlsfx</groupId>
|
||||||
|
|
|
@ -60,6 +60,8 @@ import static io.bitsquare.app.BitsquareEnvironment.APP_NAME_KEY;
|
||||||
public class BitsquareApp extends Application {
|
public class BitsquareApp extends Application {
|
||||||
private static final Logger log = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger(BitsquareApp.class);
|
private static final Logger log = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger(BitsquareApp.class);
|
||||||
|
|
||||||
|
public static final boolean DEV_MODE = true;
|
||||||
|
|
||||||
private static Environment env;
|
private static Environment env;
|
||||||
|
|
||||||
private BitsquareAppModule bitsquareAppModule;
|
private BitsquareAppModule bitsquareAppModule;
|
||||||
|
@ -136,6 +138,7 @@ public class BitsquareApp extends Application {
|
||||||
new KeyCodeCombination(KeyCode.Q, KeyCombination.SHORTCUT_DOWN).match(keyEvent))
|
new KeyCodeCombination(KeyCode.Q, KeyCombination.SHORTCUT_DOWN).match(keyEvent))
|
||||||
stop();
|
stop();
|
||||||
else if (new KeyCodeCombination(KeyCode.D, KeyCombination.SHORTCUT_DOWN).match(keyEvent))
|
else if (new KeyCodeCombination(KeyCode.D, KeyCombination.SHORTCUT_DOWN).match(keyEvent))
|
||||||
|
if (BitsquareApp.DEV_MODE)
|
||||||
showDebugWindow();
|
showDebugWindow();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -160,7 +163,6 @@ public class BitsquareApp extends Application {
|
||||||
// make the UI visible
|
// make the UI visible
|
||||||
primaryStage.show();
|
primaryStage.show();
|
||||||
|
|
||||||
//TODO just temp.
|
|
||||||
//showDebugWindow();
|
//showDebugWindow();
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
showErrorPopup(throwable, true);
|
showErrorPopup(throwable, true);
|
||||||
|
|
|
@ -47,7 +47,7 @@ import rx.subjects.Subject;
|
||||||
public class UpdateProcess {
|
public class UpdateProcess {
|
||||||
private static final Logger log = LoggerFactory.getLogger(UpdateProcess.class);
|
private static final Logger log = LoggerFactory.getLogger(UpdateProcess.class);
|
||||||
|
|
||||||
private static final List<ECPoint> UPDATE_SIGNING_KEYS = Crypto.decode("0296CFF54A8B1611499D4C1024E654140AFBB58C505FE4BB7C847B4F4A7C683DF6");
|
private static final List<ECPoint> UPDATE_SIGNING_KEYS = Crypto.decode("038396415C265C59042AB05A5436356E8D0FA19F13E3DE4915AFF763CB4785345E");
|
||||||
private static final String UPDATES_BASE_URL = "http://bitsquare.io/updateFX/";
|
private static final String UPDATES_BASE_URL = "http://bitsquare.io/updateFX/";
|
||||||
private static final int UPDATE_SIGNING_THRESHOLD = 1;
|
private static final int UPDATE_SIGNING_THRESHOLD = 1;
|
||||||
private static final Path ROOT_CLASS_PATH = UpdateFX.findCodePath(BitsquareAppMain.class);
|
private static final Path ROOT_CLASS_PATH = UpdateFX.findCodePath(BitsquareAppMain.class);
|
||||||
|
|
|
@ -97,19 +97,19 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
|
||||||
@Override
|
@Override
|
||||||
protected void initialize() {
|
protected void initialize() {
|
||||||
ToggleButton homeButton = new NavButton(HomeView.class, "Overview") {{
|
ToggleButton homeButton = new NavButton(HomeView.class, "Overview") {{
|
||||||
setDisable(true); // alpha
|
setDisable(true); // TODO for alpha
|
||||||
}};
|
}};
|
||||||
ToggleButton buyButton = new NavButton(BuyOfferView.class, "Buy BTC");
|
ToggleButton buyButton = new NavButton(BuyOfferView.class, "Buy BTC");
|
||||||
ToggleButton sellButton = new NavButton(SellOfferView.class, "Sell BTC");
|
ToggleButton sellButton = new NavButton(SellOfferView.class, "Sell BTC");
|
||||||
ToggleButton portfolioButton = new NavButton(PortfolioView.class, "Portfolio");
|
ToggleButton portfolioButton = new NavButton(PortfolioView.class, "Portfolio");
|
||||||
ToggleButton fundsButton = new NavButton(FundsView.class, "Funds");
|
ToggleButton fundsButton = new NavButton(FundsView.class, "Funds");
|
||||||
ToggleButton msgButton = new NavButton(MsgView.class, "Messages") {{
|
ToggleButton msgButton = new NavButton(MsgView.class, "Messages") {{
|
||||||
setDisable(true); // alpha
|
setDisable(true); // TODO for alpha
|
||||||
}};
|
}};
|
||||||
ToggleButton settingsButton = new NavButton(SettingsView.class, "Settings");
|
ToggleButton settingsButton = new NavButton(SettingsView.class, "Settings");
|
||||||
ToggleButton accountButton = new NavButton(AccountView.class, "Account"); /*{{
|
ToggleButton accountButton = new NavButton(AccountView.class, "Account") {{
|
||||||
setDisable(true); // alpha
|
setDisable(true); // TODO for alpha
|
||||||
}};*/
|
}};
|
||||||
Pane portfolioButtonHolder = new Pane(portfolioButton);
|
Pane portfolioButtonHolder = new Pane(portfolioButton);
|
||||||
Pane bankAccountComboBoxHolder = new Pane();
|
Pane bankAccountComboBoxHolder = new Pane();
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
|
||||||
blockchainSyncLabel.textProperty().bind(model.blockchainSyncInfo);
|
blockchainSyncLabel.textProperty().bind(model.blockchainSyncInfo);
|
||||||
walletServiceErrorMsgListener = (ov, oldValue, newValue) -> {
|
walletServiceErrorMsgListener = (ov, oldValue, newValue) -> {
|
||||||
blockchainSyncLabel.setId("splash-error-state-msg");
|
blockchainSyncLabel.setId("splash-error-state-msg");
|
||||||
openBTCConnectionErrorPopup(newValue);
|
// error popup is called by error handler at createFooter
|
||||||
};
|
};
|
||||||
model.walletServiceErrorMsg.addListener(walletServiceErrorMsgListener);
|
model.walletServiceErrorMsg.addListener(walletServiceErrorMsgListener);
|
||||||
|
|
||||||
|
@ -257,7 +257,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
|
||||||
bootstrapErrorMsgListener = (ov, oldValue, newValue) -> {
|
bootstrapErrorMsgListener = (ov, oldValue, newValue) -> {
|
||||||
bootstrapStateLabel.setId("splash-error-state-msg");
|
bootstrapStateLabel.setId("splash-error-state-msg");
|
||||||
bootstrapIndicator.setVisible(false);
|
bootstrapIndicator.setVisible(false);
|
||||||
openBTCConnectionErrorPopup(model.bootstrapErrorMsg.get());
|
// error popup is handled by handler at createFooter
|
||||||
};
|
};
|
||||||
model.bootstrapErrorMsg.addListener(bootstrapErrorMsgListener);
|
model.bootstrapErrorMsg.addListener(bootstrapErrorMsgListener);
|
||||||
|
|
||||||
|
@ -490,7 +490,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
|
||||||
vBox.setAlignment(Pos.CENTER);
|
vBox.setAlignment(Pos.CENTER);
|
||||||
vBox.getChildren().setAll(comboBox, titleLabel);
|
vBox.getChildren().setAll(comboBox, titleLabel);
|
||||||
|
|
||||||
// For alpha
|
// TODO for alpha
|
||||||
vBox.setDisable(true);
|
vBox.setDisable(true);
|
||||||
|
|
||||||
return vBox;
|
return vBox;
|
||||||
|
@ -559,7 +559,7 @@ public class MainView extends InitializableView<StackPane, MainViewModel> {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void openBTCConnectionErrorPopup(String errorMsg) {
|
private void openBTCConnectionErrorPopup(String errorMsg) {
|
||||||
Popups.openErrorPopup("Error", "Connecting to the bitcoin network failed. \n" + errorMsg
|
Popups.openErrorPopup("Error", "Connecting to the bitcoin network failed. \n" + errorMsg);
|
||||||
+ "\nPlease check your internet connection.");
|
// + "\nPlease check your internet connection."
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -64,8 +64,9 @@ import rx.Observable;
|
||||||
class MainViewModel implements ViewModel {
|
class MainViewModel implements ViewModel {
|
||||||
private static final Logger log = LoggerFactory.getLogger(MainViewModel.class);
|
private static final Logger log = LoggerFactory.getLogger(MainViewModel.class);
|
||||||
|
|
||||||
private static final long BLOCKCHAIN_SYNC_TIMEOUT = 30000;
|
private static final long BLOCKCHAIN_SYNC_TIMEOUT = 60000;
|
||||||
private static final long LOST_CONNECTION_TIMEOUT = 10000;
|
private static final long LOST_P2P_CONNECTION_TIMEOUT = 5000;
|
||||||
|
private static final long LOST_BTC_CONNECTION_TIMEOUT = 2000;
|
||||||
|
|
||||||
private final User user;
|
private final User user;
|
||||||
private final KeyRing keyRing;
|
private final KeyRing keyRing;
|
||||||
|
@ -112,7 +113,8 @@ class MainViewModel implements ViewModel {
|
||||||
final String bitcoinNetworkAsString;
|
final String bitcoinNetworkAsString;
|
||||||
|
|
||||||
private Timer blockchainSyncTimeoutTimer;
|
private Timer blockchainSyncTimeoutTimer;
|
||||||
private Timer lostConnectionTimeoutTimer;
|
private Timer lostP2PConnectionTimeoutTimer;
|
||||||
|
private Timer lostBTCConnectionTimeoutTimer;
|
||||||
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
|
@ -160,11 +162,23 @@ class MainViewModel implements ViewModel {
|
||||||
setBitcoinNetworkSyncProgress(walletService.downloadPercentageProperty().get());
|
setBitcoinNetworkSyncProgress(walletService.downloadPercentageProperty().get());
|
||||||
|
|
||||||
walletService.numPeersProperty().addListener((observable, oldValue, newValue) -> {
|
walletService.numPeersProperty().addListener((observable, oldValue, newValue) -> {
|
||||||
|
|
||||||
numBTCPeers.set(String.valueOf(newValue) + " peers");
|
numBTCPeers.set(String.valueOf(newValue) + " peers");
|
||||||
if ((int) newValue < 1)
|
if ((int) newValue < 1) {
|
||||||
|
if (lostBTCConnectionTimeoutTimer != null)
|
||||||
|
lostBTCConnectionTimeoutTimer.cancel();
|
||||||
|
lostBTCConnectionTimeoutTimer = Utilities.setTimeout(LOST_BTC_CONNECTION_TIMEOUT, () -> {
|
||||||
|
log.trace("Connection lost timeout reached");
|
||||||
walletServiceErrorMsg.set("We lost connection to the last peer.");
|
walletServiceErrorMsg.set("We lost connection to the last peer.");
|
||||||
else
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (lostBTCConnectionTimeoutTimer != null) {
|
||||||
|
lostBTCConnectionTimeoutTimer.cancel();
|
||||||
|
lostBTCConnectionTimeoutTimer = null;
|
||||||
|
}
|
||||||
walletServiceErrorMsg.set(null);
|
walletServiceErrorMsg.set(null);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Set executor for all P2PServices
|
// Set executor for all P2PServices
|
||||||
|
@ -173,17 +187,17 @@ class MainViewModel implements ViewModel {
|
||||||
clientNode.numPeersProperty().addListener((observable, oldValue, newValue) -> {
|
clientNode.numPeersProperty().addListener((observable, oldValue, newValue) -> {
|
||||||
numDHTPeers.set(String.valueOf(newValue) + " peers");
|
numDHTPeers.set(String.valueOf(newValue) + " peers");
|
||||||
if ((int) newValue == 0) {
|
if ((int) newValue == 0) {
|
||||||
if (lostConnectionTimeoutTimer != null)
|
if (lostP2PConnectionTimeoutTimer != null)
|
||||||
lostConnectionTimeoutTimer.cancel();
|
lostP2PConnectionTimeoutTimer.cancel();
|
||||||
lostConnectionTimeoutTimer = Utilities.setTimeout(LOST_CONNECTION_TIMEOUT, () -> {
|
lostP2PConnectionTimeoutTimer = Utilities.setTimeout(LOST_P2P_CONNECTION_TIMEOUT, () -> {
|
||||||
log.trace("Connection lost timeout reached");
|
log.trace("Connection lost timeout reached");
|
||||||
bootstrapErrorMsg.set("We lost connection to the last peer.");
|
bootstrapErrorMsg.set("We lost connection to the last peer.");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if ((int) oldValue == 0 && (int) newValue > 0) {
|
else if ((int) oldValue == 0 && (int) newValue > 0) {
|
||||||
if (lostConnectionTimeoutTimer != null) {
|
if (lostP2PConnectionTimeoutTimer != null) {
|
||||||
lostConnectionTimeoutTimer.cancel();
|
lostP2PConnectionTimeoutTimer.cancel();
|
||||||
lostConnectionTimeoutTimer = null;
|
lostP2PConnectionTimeoutTimer = null;
|
||||||
}
|
}
|
||||||
bootstrapErrorMsg.set(null);
|
bootstrapErrorMsg.set(null);
|
||||||
}
|
}
|
||||||
|
@ -243,7 +257,7 @@ class MainViewModel implements ViewModel {
|
||||||
updateNumPendingTrades();
|
updateNumPendingTrades();
|
||||||
showAppScreen.set(true);
|
showAppScreen.set(true);
|
||||||
|
|
||||||
// For alpha version
|
// TODO for alpha version
|
||||||
if (!user.isRegistered()) {
|
if (!user.isRegistered()) {
|
||||||
FiatAccount fiatAccount = new FiatAccount(FiatAccount.Type.IRC,
|
FiatAccount fiatAccount = new FiatAccount(FiatAccount.Type.IRC,
|
||||||
"EUR",
|
"EUR",
|
||||||
|
@ -400,7 +414,6 @@ class MainViewModel implements ViewModel {
|
||||||
log.trace("startBlockchainSyncTimeout");
|
log.trace("startBlockchainSyncTimeout");
|
||||||
stopBlockchainSyncTimeout();
|
stopBlockchainSyncTimeout();
|
||||||
|
|
||||||
|
|
||||||
blockchainSyncTimeoutTimer = Utilities.setTimeout(BLOCKCHAIN_SYNC_TIMEOUT, () -> {
|
blockchainSyncTimeoutTimer = Utilities.setTimeout(BLOCKCHAIN_SYNC_TIMEOUT, () -> {
|
||||||
log.trace("Timeout reached");
|
log.trace("Timeout reached");
|
||||||
setWalletServiceException(new TimeoutException());
|
setWalletServiceException(new TimeoutException());
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
package io.bitsquare.gui.main.offer.createoffer;
|
package io.bitsquare.gui.main.offer.createoffer;
|
||||||
|
|
||||||
|
import io.bitsquare.app.BitsquareApp;
|
||||||
import io.bitsquare.gui.Navigation;
|
import io.bitsquare.gui.Navigation;
|
||||||
import io.bitsquare.gui.OverlayManager;
|
import io.bitsquare.gui.OverlayManager;
|
||||||
import io.bitsquare.gui.common.view.ActivatableViewAndModel;
|
import io.bitsquare.gui.common.view.ActivatableViewAndModel;
|
||||||
|
@ -279,10 +280,11 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
|
||||||
};
|
};
|
||||||
|
|
||||||
showTransactionPublishedScreen = (o, oldValue, newValue) -> {
|
showTransactionPublishedScreen = (o, oldValue, newValue) -> {
|
||||||
// TODO temp just for testing
|
if (BitsquareApp.DEV_MODE) {
|
||||||
newValue = false;
|
newValue = false;
|
||||||
close();
|
close();
|
||||||
navigation.navigateTo(MainView.class, PortfolioView.class, OpenOffersView.class);
|
navigation.navigateTo(MainView.class, PortfolioView.class, OpenOffersView.class);
|
||||||
|
}
|
||||||
|
|
||||||
if (newValue) {
|
if (newValue) {
|
||||||
overlayManager.blurContent();
|
overlayManager.blurContent();
|
||||||
|
@ -386,8 +388,8 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
void onShowPayFundsScreen() {
|
void onShowPayFundsScreen() {
|
||||||
// TODO deactivate for testing the moment
|
if (!BitsquareApp.DEV_MODE) {
|
||||||
/* if (model.getDisplaySecurityDepositInfo()) {
|
if (model.getDisplaySecurityDepositInfo()) {
|
||||||
overlayManager.blurContent();
|
overlayManager.blurContent();
|
||||||
List<Action> actions = new ArrayList<>();
|
List<Action> actions = new ArrayList<>();
|
||||||
actions.add(new AbstractAction(BSResources.get("shared.close")) {
|
actions.add(new AbstractAction(BSResources.get("shared.close")) {
|
||||||
|
@ -403,8 +405,9 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
|
||||||
"\nIt will be refunded to you after the trade has successfully completed.",
|
"\nIt will be refunded to you after the trade has successfully completed.",
|
||||||
actions);
|
actions);
|
||||||
|
|
||||||
model.securityDepositInfoDisplayed();
|
model.onSecurityDepositInfoDisplayed();
|
||||||
}*/
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
priceAmountPane.setInactive();
|
priceAmountPane.setInactive();
|
||||||
|
|
|
@ -58,8 +58,6 @@ import org.controlsfx.dialog.Dialog;
|
||||||
|
|
||||||
import static javafx.beans.binding.Bindings.createStringBinding;
|
import static javafx.beans.binding.Bindings.createStringBinding;
|
||||||
|
|
||||||
// Note: countryColumn is deactivated in alpha version
|
|
||||||
|
|
||||||
@FxmlView
|
@FxmlView
|
||||||
public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookViewModel> {
|
public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookViewModel> {
|
||||||
|
|
||||||
|
@ -110,7 +108,8 @@ public class OfferBookView extends ActivatableViewAndModel<GridPane, OfferBookVi
|
||||||
setAmountColumnCellFactory();
|
setAmountColumnCellFactory();
|
||||||
setPriceColumnCellFactory();
|
setPriceColumnCellFactory();
|
||||||
setVolumeColumnCellFactory();
|
setVolumeColumnCellFactory();
|
||||||
/* setCountryColumnCellFactory();*/
|
// TODO: countryColumn is deactivated in alpha version
|
||||||
|
// setCountryColumnCellFactory();
|
||||||
setBankAccountTypeColumnCellFactory();
|
setBankAccountTypeColumnCellFactory();
|
||||||
setDirectionColumnCellFactory();
|
setDirectionColumnCellFactory();
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
package io.bitsquare.gui.main.offer.offerbook;
|
package io.bitsquare.gui.main.offer.offerbook;
|
||||||
|
|
||||||
|
import io.bitsquare.app.BitsquareApp;
|
||||||
import io.bitsquare.common.handlers.ErrorMessageHandler;
|
import io.bitsquare.common.handlers.ErrorMessageHandler;
|
||||||
import io.bitsquare.common.handlers.ResultHandler;
|
import io.bitsquare.common.handlers.ResultHandler;
|
||||||
import io.bitsquare.gui.common.model.ActivatableWithDataModel;
|
import io.bitsquare.gui.common.model.ActivatableWithDataModel;
|
||||||
|
@ -143,11 +144,13 @@ class OfferBookViewModel extends ActivatableWithDataModel<OfferBookDataModel> im
|
||||||
price.addListener(priceListener);
|
price.addListener(priceListener);
|
||||||
volume.addListener(volumeListener);
|
volume.addListener(volumeListener);
|
||||||
|
|
||||||
|
if (BitsquareApp.DEV_MODE) {
|
||||||
amount.set("1");
|
amount.set("1");
|
||||||
price.set("300");
|
price.set("300");
|
||||||
setAmountToModel();
|
setAmountToModel();
|
||||||
setPriceToModel();
|
setPriceToModel();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void removeListeners() {
|
private void removeListeners() {
|
||||||
amount.removeListener(amountListener);
|
amount.removeListener(amountListener);
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
package io.bitsquare.gui.main.offer.takeoffer;
|
package io.bitsquare.gui.main.offer.takeoffer;
|
||||||
|
|
||||||
|
|
||||||
|
import io.bitsquare.app.BitsquareApp;
|
||||||
import io.bitsquare.gui.Navigation;
|
import io.bitsquare.gui.Navigation;
|
||||||
import io.bitsquare.gui.OverlayManager;
|
import io.bitsquare.gui.OverlayManager;
|
||||||
import io.bitsquare.gui.common.view.ActivatableViewAndModel;
|
import io.bitsquare.gui.common.view.ActivatableViewAndModel;
|
||||||
|
@ -203,10 +204,11 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
showTransactionPublishedScreenListener = (o, oldValue, newValue) -> {
|
showTransactionPublishedScreenListener = (o, oldValue, newValue) -> {
|
||||||
// TODO temp just for testing
|
if (BitsquareApp.DEV_MODE) {
|
||||||
newValue = false;
|
newValue = false;
|
||||||
close();
|
close();
|
||||||
navigation.navigateTo(MainView.class, PortfolioView.class, PendingTradesView.class);
|
navigation.navigateTo(MainView.class, PortfolioView.class, PendingTradesView.class);
|
||||||
|
}
|
||||||
|
|
||||||
if (newValue) {
|
if (newValue) {
|
||||||
overlayManager.blurContent();
|
overlayManager.blurContent();
|
||||||
|
@ -371,8 +373,8 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupPaymentScreen() {
|
private void setupPaymentScreen() {
|
||||||
// TODO deactivate for testing the moment
|
if (!BitsquareApp.DEV_MODE) {
|
||||||
/* if (model.getDisplaySecurityDepositInfo()) {
|
if (model.getDisplaySecurityDepositInfo()) {
|
||||||
overlayManager.blurContent();
|
overlayManager.blurContent();
|
||||||
List<Action> actions = new ArrayList<>();
|
List<Action> actions = new ArrayList<>();
|
||||||
actions.add(new AbstractAction(BSResources.get("shared.close")) {
|
actions.add(new AbstractAction(BSResources.get("shared.close")) {
|
||||||
|
@ -387,8 +389,9 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
|
||||||
"\nIt will be refunded to you after the trade has successfully completed.",
|
"\nIt will be refunded to you after the trade has successfully completed.",
|
||||||
actions);
|
actions);
|
||||||
|
|
||||||
model.securityDepositInfoDisplayed();
|
model.onSecurityDepositInfoDisplayed();
|
||||||
}*/
|
}
|
||||||
|
}
|
||||||
|
|
||||||
priceAmountPane.setInactive();
|
priceAmountPane.setInactive();
|
||||||
takeOfferButton.setVisible(true);
|
takeOfferButton.setVisible(true);
|
||||||
|
|
|
@ -455,7 +455,7 @@ class TakeOfferViewModel extends ActivatableWithDataModel<TakeOfferDataModel> im
|
||||||
return dataModel.getDirection() == Offer.Direction.BUY;
|
return dataModel.getDirection() == Offer.Direction.BUY;
|
||||||
}
|
}
|
||||||
|
|
||||||
void securityDepositInfoDisplayed() {
|
void onSecurityDepositInfoDisplayed() {
|
||||||
dataModel.onSecurityDepositInfoDisplayed();
|
dataModel.onSecurityDepositInfoDisplayed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,5 @@
|
||||||
<Tab fx:id="openOffersTab" text="Open offers"/>
|
<Tab fx:id="openOffersTab" text="Open offers"/>
|
||||||
<Tab fx:id="pendingTradesTab" text="Open trades"/>
|
<Tab fx:id="pendingTradesTab" text="Open trades"/>
|
||||||
<Tab fx:id="closedTradesTab" text="History"/>
|
<Tab fx:id="closedTradesTab" text="History"/>
|
||||||
<Tab fx:id="failedTradesTab" text="Failed"/>
|
|
||||||
|
|
||||||
</TabPane>
|
</TabPane>
|
||||||
|
|
|
@ -29,29 +29,34 @@ import io.bitsquare.gui.main.portfolio.closedtrades.ClosedTradesView;
|
||||||
import io.bitsquare.gui.main.portfolio.failedtrades.FailedTradesView;
|
import io.bitsquare.gui.main.portfolio.failedtrades.FailedTradesView;
|
||||||
import io.bitsquare.gui.main.portfolio.openoffer.OpenOffersView;
|
import io.bitsquare.gui.main.portfolio.openoffer.OpenOffersView;
|
||||||
import io.bitsquare.gui.main.portfolio.pendingtrades.PendingTradesView;
|
import io.bitsquare.gui.main.portfolio.pendingtrades.PendingTradesView;
|
||||||
|
import io.bitsquare.trade.Trade;
|
||||||
|
import io.bitsquare.trade.failed.FailedTradesManager;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import javafx.beans.value.ChangeListener;
|
import javafx.beans.value.ChangeListener;
|
||||||
|
import javafx.collections.ListChangeListener;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.scene.control.*;
|
import javafx.scene.control.*;
|
||||||
|
|
||||||
@FxmlView
|
@FxmlView
|
||||||
public class PortfolioView extends ActivatableViewAndModel<TabPane, Activatable> {
|
public class PortfolioView extends ActivatableViewAndModel<TabPane, Activatable> {
|
||||||
|
|
||||||
@FXML Tab openOffersTab, pendingTradesTab, closedTradesTab, failedTradesTab;
|
@FXML Tab openOffersTab, pendingTradesTab, closedTradesTab;
|
||||||
|
private Tab failedTradesTab = new Tab("Failed");
|
||||||
private Tab currentTab;
|
private Tab currentTab;
|
||||||
private Navigation.Listener navigationListener;
|
private Navigation.Listener navigationListener;
|
||||||
private ChangeListener<Tab> tabChangeListener;
|
private ChangeListener<Tab> tabChangeListener;
|
||||||
|
|
||||||
private final ViewLoader viewLoader;
|
private final ViewLoader viewLoader;
|
||||||
private final Navigation navigation;
|
private final Navigation navigation;
|
||||||
|
private FailedTradesManager failedTradesManager;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public PortfolioView(CachingViewLoader viewLoader, Navigation navigation) {
|
public PortfolioView(CachingViewLoader viewLoader, Navigation navigation, FailedTradesManager failedTradesManager) {
|
||||||
this.viewLoader = viewLoader;
|
this.viewLoader = viewLoader;
|
||||||
this.navigation = navigation;
|
this.navigation = navigation;
|
||||||
|
this.failedTradesManager = failedTradesManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -77,6 +82,16 @@ public class PortfolioView extends ActivatableViewAndModel<TabPane, Activatable>
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doActivate() {
|
public void doActivate() {
|
||||||
|
failedTradesManager.getFailedTrades().addListener((ListChangeListener<Trade>) c -> {
|
||||||
|
if (failedTradesManager.getFailedTrades().size() > 0 && root.getTabs().size() == 3)
|
||||||
|
root.getTabs().add(failedTradesTab);
|
||||||
|
else
|
||||||
|
root.getTabs().remove(failedTradesTab);
|
||||||
|
});
|
||||||
|
if (failedTradesManager.getFailedTrades().size() > 0 && root.getTabs().size() == 3)
|
||||||
|
root.getTabs().add(failedTradesTab);
|
||||||
|
else
|
||||||
|
root.getTabs().remove(failedTradesTab);
|
||||||
root.getSelectionModel().selectedItemProperty().addListener(tabChangeListener);
|
root.getSelectionModel().selectedItemProperty().addListener(tabChangeListener);
|
||||||
navigation.addListener(navigationListener);
|
navigation.addListener(navigationListener);
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
package io.bitsquare.gui.main.portfolio.pendingtrades.steps;
|
package io.bitsquare.gui.main.portfolio.pendingtrades.steps;
|
||||||
|
|
||||||
|
import io.bitsquare.app.BitsquareApp;
|
||||||
import io.bitsquare.gui.components.InfoDisplay;
|
import io.bitsquare.gui.components.InfoDisplay;
|
||||||
import io.bitsquare.gui.components.InputTextField;
|
import io.bitsquare.gui.components.InputTextField;
|
||||||
import io.bitsquare.gui.main.portfolio.pendingtrades.PendingTradesViewModel;
|
import io.bitsquare.gui.main.portfolio.pendingtrades.PendingTradesViewModel;
|
||||||
|
@ -131,8 +132,8 @@ public class CompletedView extends TradeStepDetailsView {
|
||||||
withdrawAddressTextField = getAndAddLabelInputTextFieldPair(gridPane, gridRow++, "Withdraw to address:").inputTextField;
|
withdrawAddressTextField = getAndAddLabelInputTextFieldPair(gridPane, gridRow++, "Withdraw to address:").inputTextField;
|
||||||
withdrawButton = getAndAddButton(gridPane, gridRow++, "Withdraw to external wallet", this::onWithdrawRequest);
|
withdrawButton = getAndAddButton(gridPane, gridRow++, "Withdraw to external wallet", this::onWithdrawRequest);
|
||||||
|
|
||||||
//TODO just temp for testing
|
if (BitsquareApp.DEV_MODE)
|
||||||
withdrawAddressTextField.setText("mxmKZruv9x9JLcEj6rZx6Hnm4LLAcQHtcr");
|
withdrawAddressTextField.setText("mkNW1omJFA7RD3AZ94mfKqubRff2gx21KE");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBtcTradeAmountLabelText(String text) {
|
public void setBtcTradeAmountLabelText(String text) {
|
||||||
|
|
|
@ -42,7 +42,7 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
|
||||||
btcDenominationComboBox.setItems(model.getBtcDenominationItems());
|
btcDenominationComboBox.setItems(model.getBtcDenominationItems());
|
||||||
btcDenominationComboBox.getSelectionModel().select(model.btcDenomination().get());
|
btcDenominationComboBox.getSelectionModel().select(model.btcDenomination().get());
|
||||||
|
|
||||||
// For alpha
|
// TODO for alpha
|
||||||
btcDenominationComboBox.setDisable(true);
|
btcDenominationComboBox.setDisable(true);
|
||||||
|
|
||||||
useAnimationsCheckBox.selectedProperty().bindBidirectional(model.useAnimations());
|
useAnimationsCheckBox.selectedProperty().bindBidirectional(model.useAnimations());
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>package/mac/Bitsquare.icns</string>
|
<string>package/mac/Bitsquare.icns</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>io.bitsquare</string>
|
<string>io.bitsquare.Bitsquare</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
|
@ -21,17 +21,23 @@
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>19</string>
|
<string>1</string>
|
||||||
|
|
||||||
|
<!-- CFBundleSignature exists only for compatibility with Classic Mac OS apps and documents. Modern Mac OS X apps don't need to worry about assigning a Bundle
|
||||||
|
Signature.-->
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<!-- See http://developer.apple.com/library/mac/#releasenotes/General/SubmittingToMacAppStore/_index.html
|
|
||||||
for list of AppStore categories -->
|
|
||||||
<key>LSApplicationCategoryType</key>
|
<key>LSApplicationCategoryType</key>
|
||||||
<string>Unknown</string>
|
<string>public.app-category.finance</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>100</string>
|
<string>1</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string>Copyright (C) 2015</string>
|
<string>Copyright (C) 2015</string>
|
||||||
|
|
||||||
|
<key>NSHighResolutionCapable</key>
|
||||||
|
<string>true</string>
|
||||||
|
|
||||||
<key>JVMRuntime</key>
|
<key>JVMRuntime</key>
|
||||||
<string>..</string>
|
<string>..</string>
|
||||||
<key>JVMMainClassName</key>
|
<key>JVMMainClassName</key>
|
||||||
|
@ -44,13 +50,10 @@
|
||||||
<string>bitsquare</string>
|
<string>bitsquare</string>
|
||||||
<key>JVMOptions</key>
|
<key>JVMOptions</key>
|
||||||
<array>
|
<array>
|
||||||
|
|
||||||
</array>
|
</array>
|
||||||
<key>JVMUserOptions</key>
|
<key>JVMUserOptions</key>
|
||||||
<dict>
|
<dict>
|
||||||
|
</dict>
|
||||||
|
|
||||||
</dict>
|
</dict>
|
||||||
<key>NSHighResolutionCapable</key>
|
|
||||||
<string>true</string>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
</plist>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>package/mac/Bitsquare.icns</string>
|
<string>package/mac/Bitsquare.icns</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>io.bitsquare</string>
|
<string>io.bitsquare.Bitsquare</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
|
@ -21,17 +21,23 @@
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>19</string>
|
<string>1</string>
|
||||||
|
|
||||||
|
<!-- CFBundleSignature exists only for compatibility with Classic Mac OS apps and documents. Modern Mac OS X apps don't need to worry about assigning a Bundle
|
||||||
|
Signature.-->
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<!-- See http://developer.apple.com/library/mac/#releasenotes/General/SubmittingToMacAppStore/_index.html
|
|
||||||
for list of AppStore categories -->
|
|
||||||
<key>LSApplicationCategoryType</key>
|
<key>LSApplicationCategoryType</key>
|
||||||
<string>Unknown</string>
|
<string>public.app-category.finance</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>100</string>
|
<string>1</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string>Copyright (C) 2015</string>
|
<string>Copyright (C) 2015</string>
|
||||||
|
|
||||||
|
<key>NSHighResolutionCapable</key>
|
||||||
|
<string>true</string>
|
||||||
|
|
||||||
<key>JVMRuntime</key>
|
<key>JVMRuntime</key>
|
||||||
<string>..</string>
|
<string>..</string>
|
||||||
<key>JVMMainClassName</key>
|
<key>JVMMainClassName</key>
|
||||||
|
@ -44,13 +50,10 @@
|
||||||
<string>bitsquare</string>
|
<string>bitsquare</string>
|
||||||
<key>JVMOptions</key>
|
<key>JVMOptions</key>
|
||||||
<array>
|
<array>
|
||||||
|
|
||||||
</array>
|
</array>
|
||||||
<key>JVMUserOptions</key>
|
<key>JVMUserOptions</key>
|
||||||
<dict>
|
<dict>
|
||||||
|
</dict>
|
||||||
|
|
||||||
</dict>
|
</dict>
|
||||||
<key>NSHighResolutionCapable</key>
|
|
||||||
<string>true</string>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
</plist>
|
||||||
|
|
|
@ -31,7 +31,9 @@ sed "s|JAR_NAME_STRING_GOES_HERE|$patchVersion.jar|" package/mac/Info.template.p
|
||||||
mvn clean package -DskipTests -Dmaven.javadoc.skip=true
|
mvn clean package -DskipTests -Dmaven.javadoc.skip=true
|
||||||
cp gui/target/shaded.jar gui/updatefx/builds/$patchVersion.jar
|
cp gui/target/shaded.jar gui/updatefx/builds/$patchVersion.jar
|
||||||
|
|
||||||
java -jar ./updatefx/updatefx-app-1.2.jar --url=http://bitsquare.io/updateFX/ gui/updatefx
|
java -jar ./updatefx/updatefx-app-1.6.jar --url=http://bitsquare.io/updateFX/ gui/updatefx
|
||||||
|
# using trezor
|
||||||
|
#java -jar ./updatefx/updatefx-app-1.6.jar --url=http://bitsquare.io/updateFX/ gui/updatefx --trezor
|
||||||
|
|
||||||
$JAVA_HOME/bin/javapackager \
|
$JAVA_HOME/bin/javapackager \
|
||||||
-deploy \
|
-deploy \
|
||||||
|
|
|
@ -9,7 +9,7 @@ mkdir gui/updatefx/site
|
||||||
mkdir gui/deploy
|
mkdir gui/deploy
|
||||||
|
|
||||||
# create key/wallet. Copy wallet key to UpdateProcess and use wallet for other OS builds
|
# create key/wallet. Copy wallet key to UpdateProcess and use wallet for other OS builds
|
||||||
java -jar ./updatefx/updatefx-app-1.2.jar --url=http://bitsquare.io/updateFX/ gui/updatefx
|
java -jar ./updatefx/updatefx-app-1.6.jar --url=http://bitsquare.io/updateFX/ gui/updatefx
|
||||||
|
|
||||||
cd package/mac
|
cd package/mac
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,6 @@ echo patchVersion = $patchVersion
|
||||||
|
|
||||||
mvn clean package -DskipTests -Dmaven.javadoc.skip=true
|
mvn clean package -DskipTests -Dmaven.javadoc.skip=true
|
||||||
cp gui/target/shaded.jar gui/updatefx/builds/$patchVersion.jar
|
cp gui/target/shaded.jar gui/updatefx/builds/$patchVersion.jar
|
||||||
java -jar ./updatefx/updatefx-app-1.2.jar --url=http://bitsquare.io/updateFX/ gui/updatefx
|
java -jar ./updatefx/updatefx-app-1.6.jar --url=http://bitsquare.io/updateFX/ gui/updatefx
|
||||||
|
|
||||||
cd package/mac
|
cd package/mac
|
2
pom.xml
2
pom.xml
|
@ -6,7 +6,7 @@
|
||||||
<groupId>io.bitsquare</groupId>
|
<groupId>io.bitsquare</groupId>
|
||||||
<artifactId>parent</artifactId>
|
<artifactId>parent</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>0.2.1-SNAPSHOT</version>
|
<version>0.2.1</version>
|
||||||
<description>The decentralized bitcoin exchange</description>
|
<description>The decentralized bitcoin exchange</description>
|
||||||
<url>https://bitsquare.io</url>
|
<url>https://bitsquare.io</url>
|
||||||
|
|
||||||
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue