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>
This commit is contained in:
@@ -45,8 +45,18 @@ bool isTransparentAddress(const std::string& s);
|
||||
// with a valid Bech32 checksum. Distinguishes a payment address from a viewing key (e.g. "zivks…").
|
||||
bool isShieldedAddress(const std::string& s);
|
||||
|
||||
// True if `s` is any address a payment can be sent to (transparent or shielded).
|
||||
// True if `s` is a DragonX address of either kind (transparent or shielded) — "is this an address at all".
|
||||
bool isDragonXAddress(const std::string& s);
|
||||
|
||||
// True if `s` is an address a payment can be sent to. DragonX is a private chain (-ac_private=1): consensus
|
||||
// rejects any non-coinbase output to a transparent address, so only a shielded address can be paid — sends,
|
||||
// payment requests and pool payouts included. A transparent address only ever receives mining rewards.
|
||||
bool isValidRecipientAddress(const std::string& s);
|
||||
|
||||
// What sending to `s` would mean: a shielded address (payable), a mining address (transparent: valid, but
|
||||
// it can only receive mining rewards, so a payment to it is rejected), or not an address.
|
||||
enum class RecipientKind { Invalid, Shielded, MiningOnly };
|
||||
RecipientKind classifyRecipient(const std::string& s);
|
||||
|
||||
} // namespace util
|
||||
} // namespace dragonx
|
||||
|
||||
Reference in New Issue
Block a user