Remove max limit check for fiat price and volume

This commit is contained in:
Manfred Karrer 2017-11-14 09:42:42 -05:00
parent 17b36b7b60
commit 16f23cc310
No known key found for this signature in database
GPG key ID: 401250966A6B2C46
6 changed files with 15 additions and 16 deletions

View file

@ -35,8 +35,6 @@ import java.util.stream.Collectors;
public class ProvidersRepository { public class ProvidersRepository {
private static final String NODES = "http://xc3nh4juf2hshy7e.onion/, " + // @emzy private static final String NODES = "http://xc3nh4juf2hshy7e.onion/, " + // @emzy
"http://ceaanhbvluug4we6.onion/"; // @mrosseel "http://ceaanhbvluug4we6.onion/"; // @mrosseel
// old nodes
// private static final String NODES = "http://44mgyoe2b6oqiytt.onion/, http://5bmpx76qllutpcyp.onion/";
private final String providersFromProgramArgs; private final String providersFromProgramArgs;
private final boolean useLocalhostForP2P; private final boolean useLocalhostForP2P;
@ -67,8 +65,7 @@ public class ProvidersRepository {
// If we run in localhost mode we don't have the tor node running, so we need a clearnet host // If we run in localhost mode we don't have the tor node running, so we need a clearnet host
// Use localhost for using a locally running provider // Use localhost for using a locally running provider
// providerAsString = "http://localhost:8080/"; // providerAsString = "http://localhost:8080/";
// providerAsString = "http://localhost:8080/, http://37.139.14.34:8080/"; providerAsString = "http://174.138.104.137:8080/"; // @mrosseel
providerAsString = "http://174.138.104.137:8080/";
} else { } else {
providerAsString = NODES; providerAsString = NODES;
} }

View file

@ -238,7 +238,7 @@ public class WithdrawalView extends ActivatableView<VBox, Void> {
feeEstimationTransaction = walletService.getFeeEstimationTransactionForMultipleAddresses(fromAddresses, feeEstimationTransaction = walletService.getFeeEstimationTransactionForMultipleAddresses(fromAddresses,
withdrawToTextField.getText(), amountOfSelectedItems); withdrawToTextField.getText(), amountOfSelectedItems);
} catch (InsufficientFundsException e) { } catch (InsufficientFundsException e) {
new Popup<>().warning(e.getMessage()).show(); new Popup<>().warning(e.toString()).show();
} catch (Throwable t) { } catch (Throwable t) {
new Popup<>().error(Res.get("popup.error.createTx", t.toString())).show(); new Popup<>().error(Res.get("popup.error.createTx", t.toString())).show();
} }
@ -276,7 +276,7 @@ public class WithdrawalView extends ActivatableView<VBox, Void> {
} catch (Throwable e) { } catch (Throwable e) {
e.printStackTrace(); e.printStackTrace();
log.error(e.toString()); log.error(e.toString());
new Popup<>().warning(e.getMessage()).show(); new Popup<>().warning(e.toString()).show();
} }
} }
} }
@ -367,8 +367,8 @@ public class WithdrawalView extends ActivatableView<VBox, Void> {
log.warn(e.getMessage()); log.warn(e.getMessage());
new Popup<>().warning(Res.get("funds.withdrawal.notEnoughFunds")).show(); new Popup<>().warning(Res.get("funds.withdrawal.notEnoughFunds")).show();
} catch (Throwable e) { } catch (Throwable e) {
log.warn(e.getMessage()); log.warn(e.toString());
new Popup<>().warning(e.getMessage()).show(); new Popup<>().warning(e.toString()).show();
} }
} }

View file

@ -27,8 +27,9 @@ public class FiatPriceValidator extends MonetaryValidator {
@Override @Override
protected double getMaxValue() { protected double getMaxValue() {
// hard to say what the max value should be (zimbabwe dollar....)? // Hard to say what the max value should be (zimbabwe dollar....)?
return 100_000_000; // Lets set it to Double.MAX_VALUE until we find some reasonable number
return Double.MAX_VALUE;
} }
@Inject @Inject

View file

@ -27,8 +27,9 @@ public class FiatVolumeValidator extends MonetaryValidator {
@Override @Override
protected double getMaxValue() { protected double getMaxValue() {
// hard to say what the max value should be (zimbabwe dollar....)? // Hard to say what the max value should be (zimbabwe dollar....)?
return 100_000_000; // Lets set it to Double.MAX_VALUE until we find some reasonable number
return Double.MAX_VALUE;
} }
@Inject @Inject

View file

@ -90,8 +90,7 @@ class Server implements Runnable {
} catch (SocketException e) { } catch (SocketException e) {
log.debug("SocketException at shutdown might be expected " + e.getMessage()); log.debug("SocketException at shutdown might be expected " + e.getMessage());
} catch (IOException e) { } catch (IOException e) {
log.error("Exception at shutdown. " + e.getMessage()); log.debug("Exception at shutdown. " + e.getMessage());
e.printStackTrace();
} finally { } finally {
log.debug("Server shutdown complete"); log.debug("Server shutdown complete");
} }

View file

@ -203,10 +203,11 @@ class RequestDataHandler implements MessageListener {
// Log different data types // Log different data types
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("\n#################################################################"); sb.append("\n#################################################################\n");
sb.append("Connected to node: "+peersNodeAddress.getFullAddress()+"\n");
final int items = dataSet.size() + final int items = dataSet.size() +
(persistableNetworkPayloadSet != null ? persistableNetworkPayloadSet.size() : 0); (persistableNetworkPayloadSet != null ? persistableNetworkPayloadSet.size() : 0);
sb.append("\nReceived ").append(items).append(" instances\n"); sb.append("Received ").append(items).append(" instances\n");
payloadByClassName.entrySet().stream().forEach(e -> sb.append(e.getKey()) payloadByClassName.entrySet().stream().forEach(e -> sb.append(e.getKey())
.append(": ") .append(": ")
.append(e.getValue().size()) .append(e.getValue().size())