From 6b6b09c4d4e5a0e65e093f6fa539ad0610f901da Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 12 Jul 2019 02:54:09 -1100 Subject: [PATCH] Autodetect missing tokens address --- src/cc/CCtokens.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cc/CCtokens.cpp b/src/cc/CCtokens.cpp index 289549c36..5da6e97c8 100644 --- a/src/cc/CCtokens.cpp +++ b/src/cc/CCtokens.cpp @@ -870,7 +870,12 @@ std::string TokenTransfer(int64_t txfee, uint256 tokenid, vscript_t destpubkey, if (txfee == 0) txfee = 10000; mypk = pubkey2pk(Mypubkey()); - if (AddNormalinputs(mtx, mypk, txfee, 3) > 0) + if ( cp->tokens1of2addr[0] == 0 ) + { + GetTokensCCaddress(cp, cp->tokens1of2addr, mypk); + fprintf(stderr,"set tokens1of2addr <- %s\n",cp->tokens1of2addr); + } + if (AddNormalinputs(mtx, mypk, txfee, 3) > 0) { mask = ~((1LL << mtx.vin.size()) - 1); // seems, mask is not used anymore