From 55bc4fb256d2b530acb6fa4d16bef49e9c59675e Mon Sep 17 00:00:00 2001 From: "Nelson R. Perez" Date: Wed, 5 Apr 2017 14:32:59 -0500 Subject: [PATCH] Using the LimitOrder.getForSale() method --- .../src/main/java/de/bitsharesmunich/graphenej/OrderBook.java | 2 +- .../de/bitsharesmunich/graphenej/api/GetLimitOrdersTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/graphenej/src/main/java/de/bitsharesmunich/graphenej/OrderBook.java b/graphenej/src/main/java/de/bitsharesmunich/graphenej/OrderBook.java index 2d66b06..aec67b7 100644 --- a/graphenej/src/main/java/de/bitsharesmunich/graphenej/OrderBook.java +++ b/graphenej/src/main/java/de/bitsharesmunich/graphenej/OrderBook.java @@ -72,7 +72,7 @@ public class OrderBook { // If the base asset is the same as our quote asset, we have a match if(order.getSellPrice().base.getAsset().getObjectId().equals(quoteAmount.getAsset().getObjectId())){ // My quote amount, is the order's base amount - long orderAmount = order.getSellPrice().base.getAmount().longValue(); + long orderAmount = order.getForSale(); // The amount of the quote asset we still need long stillNeed = quoteAmount.getAmount().longValue() - totalBought; diff --git a/graphenej/src/test/java/de/bitsharesmunich/graphenej/api/GetLimitOrdersTest.java b/graphenej/src/test/java/de/bitsharesmunich/graphenej/api/GetLimitOrdersTest.java index 78ccfd9..d16356e 100644 --- a/graphenej/src/test/java/de/bitsharesmunich/graphenej/api/GetLimitOrdersTest.java +++ b/graphenej/src/test/java/de/bitsharesmunich/graphenej/api/GetLimitOrdersTest.java @@ -35,7 +35,7 @@ public class GetLimitOrdersTest { private String BLOCK_PAY_DE = System.getenv("BLOCKPAY_DE"); private UserAccount seller = new UserAccount("1.2.143563"); private final Asset base = new Asset("1.3.0", "BTS", 5); - private final Asset quote = new Asset("1.3.121", "USD", 4); + private final Asset quote = new Asset("1.3.120", "EUR", 4); private SSLContext context; private WebSocket mWebSocket;