Files
ObsidianDragon/src/ui/windows/send_tab.h
T
DanSandClaude Opus 5.5 5246898968 feat(ui): treat transparent addresses as mining-only addresses
DragonX is a private chain (-ac_private=1): consensus rejects any
non-coinbase output to a transparent address, so a t-address can only
ever receive mining rewards, and its coins can only move to a shielded
address. The wallet treated them like ordinary recipients.

Block paying one:
- Send: a transparent recipient shows "Mining address - can't be paid"
  and disables Review Send (tooltip explains; ask for a zs... address).
  Typing, paste, contacts and payment URIs all go through this field.
- Overview drag-to-transfer: a mining-address row is never a transfer
  target (it only reorders).
- Pool payout must be shielded (pools pay with ordinary transactions):
  field tooltip, disabled Start button and the start check say why.
- isValidRecipientAddress() is now shielded-only; new isDragonXAddress()
  and classifyRecipient() (Shielded / MiningOnly / Invalid).

Call them mining addresses:
- Overview: "Mining rewards" card (amber "Not yet shielded" when there
  is a balance; hover explains; click opens the Shield dialog), "New
  mining address" button with a tooltip, rows typed "Mining".
- QR / label dialogs, portfolio filter, contact badge ("Mining only"),
  Receive notifications.

i18n: 17 new keys in all 8 languages, 12 dead keys removed, CJK subset
rebuilt. Tests: recipient classification, translation completeness.
UI sweep: new "send-mining-recipient" target.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 20:08:14 -05:00

44 lines
1.2 KiB
C++

// DragonX Wallet - ImGui Edition
// Copyright 2024-2026 The Hush Developers
// Released under the GPLv3
#pragma once
#include <string>
namespace dragonx {
class App;
namespace ui {
/**
* @brief Render the Send tab
* Form for sending transactions
*/
void RenderSendTab(App* app);
/**
* @brief Render the send-confirm modal popup.
* Must be called at the top-level window scope (after ImGui::End of the main
* window) so the modal dim layer blocks ALL input — sidebar, tabs, etc.
*/
void RenderSendConfirmPopup(App* app);
/**
* @brief Debug/screenshot-sweep hook: force the send-confirm popup open with demo values (show=true)
* or close it (show=false). The popup's state lives in send_tab file statics, so this hook is
* the only way an external driver (the full UI sweep) can reveal it. Fires no send.
*/
void SweepShowSendConfirm(App* app, bool show);
// UI sweep: put `to` (nullptr: clear) in the recipient field, e.g. a mining address to show it can't be paid.
void SweepSetSendRecipient(App* app, const char* to);
/**
* @brief Pre-fill the "from" address in the send tab
* @param address The address to send from
*/
void SetSendFromAddress(const std::string& address);
} // namespace ui
} // namespace dragonx