From 08e8a48138a0d48a2a895a16ff71022f6239afaf Mon Sep 17 00:00:00 2001 From: m2049r Date: Sun, 10 Nov 2019 12:13:06 +0100 Subject: [PATCH] scan only for 0.15 nodes (#634) --- app/src/main/java/com/m2049r/xmrwallet/data/NodeInfo.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/m2049r/xmrwallet/data/NodeInfo.java b/app/src/main/java/com/m2049r/xmrwallet/data/NodeInfo.java index b4d3b1b..614f709 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/data/NodeInfo.java +++ b/app/src/main/java/com/m2049r/xmrwallet/data/NodeInfo.java @@ -235,10 +235,10 @@ public class NodeInfo extends Node { String rpcVersion = json.getString("jsonrpc"); if (!RPC_VERSION.equals(rpcVersion)) return false; - if (!json.has("credits")) // introduced in monero v0.15.0 + final JSONObject result = json.getJSONObject("result"); + if (!result.has("credits")) // introduced in monero v0.15.0 return false; - final JSONObject header = json.getJSONObject( - "result").getJSONObject("block_header"); + final JSONObject header = result.getJSONObject("block_header"); height = header.getLong("height"); timestamp = header.getLong("timestamp"); majorVersion = header.getInt("major_version");