message: [Qt] Fix mn reward showing as zPIV stake
diff: @@ -53,38 +53,34 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet*
  if (!wtx.IsZerocoinSpend() && !ExtractDestination(wtx.vout[1].scriptPubKey, address))
  return parts;
  - //Masternode reward
  - CTxDestination destMN;
  - int nIndexMN = wtx.vout.size() - 1;
  - if (ExtractDestination(wtx.vout[nIndexMN].scriptPubKey, destMN)) {
  - if (IsMine(*wallet, destMN)) {
  - isminetype mine = wallet->IsMine(wtx.vout[nIndexMN]);
  - sub.involvesWatchAddress = mine & ISMINE_WATCH_ONLY;
  - sub.type = TransactionRecord::MNReward;
  - sub.address = CBitcoinAddress(destMN).ToString();
  - sub.credit = wtx.vout[nIndexMN].nValue;
  - }
  - }
  -
  - //stake reward
  - if (wtx.IsZerocoinSpend()) {
  - if (fZSpendFromMe || wallet->zpivTracker->HasMintTx(hash)) {
  + if (wtx.IsZerocoinSpend() && (fZSpendFromMe || wallet->zpivTracker->HasMintTx(hash))) {
  + //zPIV stake reward
  sub.involvesWatchAddress = false;
  sub.type = TransactionRecord::StakeZPIV;
  sub.address = mapValue["zerocoinmint"];
  - sub.credit = nNet;
  + sub.credit = 0;
  for (const CTxOut& out : wtx.vout) {
  if (out.IsZerocoinMint())
  sub.credit += out.nValue;
  }
  sub.debit -= wtx.vin[0].nSequence * COIN;
  - }
  - } else {
  - isminetype mine = wallet->IsMine(wtx.vout[1]);
  + } else if (isminetype mine = wallet->IsMine(wtx.vout[1])) {
  + // PIV stake reward
  sub.involvesWatchAddress = mine & ISMINE_WATCH_ONLY;
  sub.type = TransactionRecord::StakeMint;
  sub.address = CBitcoinAddress(address).ToString();
  - sub.credit = nNet;
  + sub.credit = wtx.vout[1].nValue;
  + } else {
  + //Masternode reward
  + CTxDestination destMN;
  + int nIndexMN = wtx.vout.size() - 1;
  + if (ExtractDestination(wtx.vout[nIndexMN].scriptPubKey, destMN) && IsMine(*wallet, destMN)) {
  + isminetype mine = wallet->IsMine(wtx.vout[nIndexMN]);
  + sub.involvesWatchAddress = mine & ISMINE_WATCH_ONLY;
  + sub.type = TransactionRecord::MNReward;
  + sub.address = CBitcoinAddress(destMN).ToString();
  + sub.credit = wtx.vout[nIndexMN].nValue;
  + }
  }
  parts.append(sub);
  