diff --git a/iguana/iguana_payments.c b/iguana/iguana_payments.c index c0be62d4b..a8b45faf2 100755 --- a/iguana/iguana_payments.c +++ b/iguana/iguana_payments.c @@ -560,7 +560,14 @@ char *iguana_calcutxorawtx(struct supernet_info *myinfo,struct iguana_info *coin printf("insufficient total %.8f vs (%.8f + %.8f)\n",dstr(total),dstr(satoshis),dstr(txfee)); return(0); } - total += interests; + if ( strcmp(coin->symbol,"KMD") == 0 ) + { + if ( (interests= iguana_interests(myinfo,coin,vins)) != 0 ) + { + total += interests; + printf("boost total by interest %.8f\n",dstr(interests)); + } + } if ( (change= (total - (satoshis + txfee))) > 10000 && (changeaddr == 0 || changeaddr[0] == 0) ) { printf("no changeaddr for %.8f\n",dstr(change)); diff --git a/iguana/tests/dexgetO b/iguana/tests/dexgetO index 9c187166b..6f4290b48 100755 --- a/iguana/tests/dexgetO +++ b/iguana/tests/dexgetO @@ -1,2 +1,2 @@ #!/bin/bash -curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"gettxout\",\"vout\":1,\"txid\":\"fa3321ed55e8e96ba7221e9cc4bc54b735616649abcc9734bb73f505ee712884\",\"symbol\":\"KMD\"}" +curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"gettxout\",\"vout\":1,\"txid\":\"4a1a2026718ac10bd11ccccbdd85f29faa5f0b7c3ab95a57dcf7040c5ca0420c\",\"symbol\":\"KMD\"}" diff --git a/iguana/tests/dexsendrawtransaction b/iguana/tests/dexsendrawtransaction index d60706f4d..f3796ea37 100755 --- a/iguana/tests/dexsendrawtransaction +++ b/iguana/tests/dexsendrawtransaction @@ -1,2 +1,2 @@ #!/bin/bash -curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"sendrawtransaction\",\"signedtx\":\"0100000001372105704c1303f4c928b788becce75b653b5e83d56fc25893f682875f9df00e010000006a47304402203c3e71c309fcf70d1b1b42207824b37cfec918930000b8d812844be9a8d06bae02202eafe0515f6cd775ba06be0fab6cea667a23508e69334310b959ebd7eade38c9012102320228e3f6f9b8db3d905bc21cefde46e72d622021b8fd40344ac2ab8346c287ffffffff02b0e20d000000000017a914077fa9d41d53cc38118b8280e97e4aee576d6e5a87c08c8a00000000001976a914838f4ea2f88f24b87247b72a1d66da225653e39788ac00000000\",\"symbol\":\"USD\"}" +curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"dex\",\"method\":\"sendrawtransaction\",\"signedtx\":\"01000000010c42a05c0c04f7dc575ab93a7c0b5faa9ff285ddcbcc1cd10bc18a7126201a4a010000006b483045022100814b44c4af1beeb7ab3abdd7dfd95216b48da2f47ded4137f3dca366db4a94bc0220686108f29cc1eea5c845b7571e01412a373e5077d448e021bac7e8a19ec451a20121025879c9eaa100984ee1faaeb55bcbafed5b1f565c35ed7ebaadcce0a8416e6263ffffffff0240420f00000000001976a914c5a58530ee7bec4f5ab9a8c0c63069484273276c88ac34955836020000001976a914971f98b33fb838faee190e2fab799440d8c5170288acf70ab858\",\"symbol\":\"KMD\"}"