diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp index 2d0bd8c38..81370d0b1 100644 --- a/src/rpcblockchain.cpp +++ b/src/rpcblockchain.cpp @@ -386,13 +386,13 @@ uint64_t komodo_paxprice(int32_t height,char *base,char *rel); Value paxprice(const Array& params, bool fHelp) { - if (fHelp || params.size() != 3) + if ( fHelp || params.size() != 3 ) throw runtime_error("paxprice \"base\" \"rel\" height\n"); LOCK(cs_main); Object ret; uint64_t pricetoshis; std::string base = params[0].get_str(); std::string rel = params[1].get_str(); - int height = params[2].get_int(); + int height = atoi(params[2].get_str().c_str()); pricetoshis = komodo_paxprice(height,(char *)base.c_str(),(char *)rel.c_str()); ret.push_back(Pair("base", base)); ret.push_back(Pair("rel", rel));