From 7807fc9882da170792eb45915ffd634b718003b3 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 29 Jan 2018 17:25:07 +0400 Subject: [PATCH] Use actual trader for instandex calc instead of 0 --- iguana/exchanges/LP_instantdex.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/iguana/exchanges/LP_instantdex.c b/iguana/exchanges/LP_instantdex.c index 7463accaf..e10f991ea 100644 --- a/iguana/exchanges/LP_instantdex.c +++ b/iguana/exchanges/LP_instantdex.c @@ -510,11 +510,13 @@ int64_t LP_dynamictrust(int64_t credits,bits256 pubkey,int64_t kmdvalue) int64_t LP_instantdex_proofcheck(char *symbol,char *coinaddr,cJSON *proof,int32_t num) { - uint8_t rmd160[20],addrtype; int64_t credits=0; int32_t i,j; bits256 prevtxid,txid; char othersmartaddr[64]; struct iguana_info *coin; struct LP_address *ap = 0; + uint8_t rmd160[20],addrtype,taddr=0; int64_t credits=0; int32_t i,j; bits256 prevtxid,txid; char othersmartaddr[64]; struct iguana_info *coin,*origcoin; struct LP_address *ap = 0; if ( (coin= LP_coinfind("KMD")) != 0 ) { - bitcoin_addr2rmd160(symbol,0,&addrtype,rmd160,coinaddr); - bitcoin_address("KMD",othersmartaddr,0,60,rmd160,20); + if ( (origcoin= LP_coinfind(symbol)) != 0 ) + taddr = origcoin->taddr; + bitcoin_addr2rmd160(symbol,taddr,&addrtype,rmd160,coinaddr); + bitcoin_address("KMD",othersmartaddr,coin->taddr,coin->pubtype,rmd160,20); //printf("proofcheck addrtype.%d (%s) -> %s\n",addrtype,coinaddr,othersmartaddr); if ((ap= LP_address(coin,othersmartaddr)) != 0 ) {