message: Format getwatchonlytxes
diff: @@ -1208,15 +1208,16 @@ static UniValue getwatchonlytxes(const JSONRPCRequest& request)
  FetchWatchOnlyTransactions(scan_secret, vTxes);
  int current_count = 0;
  - UniValue txes(UniValue::VOBJ);
  + UniValue txes(UniValue::VARR);
  if (GetWatchOnlyKeyCount(scan_secret, current_count)) {
  for (int i = 0; i <= current_count; i++) {
  + UniValue object(UniValue::VOBJ);
  CWatchOnlyTx watchonlytx;
  if (ReadWatchOnlyTransaction(scan_secret, i, watchonlytx)) {
  -
  if (!spend_secret.IsValid()) {
  pblocktree->ReadRCTOutputLink(watchonlytx.ringctout.pk, watchonlytx.ringctIndex);
  - txes.pushKV(std::to_string(i), watchonlytx.GetUniValue());
  + object.pushKV(std::to_string(i), watchonlytx.GetUniValue());
  + txes.push_back(object);
  } else {
  auto txout = watchonlytx.ringctout;
  @@ -1270,10 +1271,11 @@ static UniValue getwatchonlytxes(const JSONRPCRequest& request)
  // Check if keyimage is used
  uint256 txhashKI;
  if (pblocktree->ReadRCTKeyImage(ki, txhashKI)) {
  - txes.pushKV(std::to_string(i), watchonlytx.GetUniValue(true, HexStr(ki), txhashKI, false, amountOut));
  + object.pushKV(std::to_string(i), watchonlytx.GetUniValue(true, HexStr(ki), txhashKI, false, amountOut));
  } else {
  - txes.pushKV(std::to_string(i), watchonlytx.GetUniValue(false, HexStr(ki), txhashKI, false, amountOut));
  + object.pushKV(std::to_string(i), watchonlytx.GetUniValue(false, HexStr(ki), txhashKI, false, amountOut));
  }
  + txes.push_back(object);
  }
  }
  }
  