return marketListMap;
}
public static NymOfferDetails getNymOfferDetails(String serverID, String nymID, String transactionID) {
NymOfferDetails nymOfferDetails = new NymOfferDetails();
OfferListNym offerListNym = Helpers.getNYMOffer(serverID, nymID);
if (offerListNym == null) {
System.out.println("getNymOfferDetails - offerListNym returns null");
return null;
}
for (int j = 0; j < offerListNym.GetOfferDataNymCount(); j++) {
OfferDataNym offerDataNym = offerListNym.GetOfferDataNym(j);
if (offerDataNym == null || !Utility.VerifyStringVal(transactionID)) {
continue;
}
if (transactionID.equals(offerDataNym.getTransaction_id())) {
nymOfferDetails.setPrice(offerDataNym.getPrice_per_scale());
nymOfferDetails.setMinIncrement(offerDataNym.getMinimum_increment());
nymOfferDetails.setTotalAssetsOnOffer(offerDataNym.getTotal_assets());
double assetCount = -1;
try {
assetCount = Double.parseDouble(offerDataNym.getTotal_assets()) - Double.parseDouble(offerDataNym.getFinished_so_far());
} catch (NumberFormatException nfe) {
nfe.printStackTrace();
}
nymOfferDetails.setAssetsStillOnOffer(assetCount == -1 ? "" : String.valueOf(assetCount));
break;
}
}