feat(ui): explain mining addresses everywhere and stop offering them for payment
Follow-up to 5246898. A transparent address only ever receives mining
rewards on DragonX (private chain), so:
- One explainer ("Receives solo-mining rewards only - the network rejects
payments to it. Rewards are shielded automatically once they mature.")
on the Overview row hover, the Receive picker hover, the Receive card
and the Validate Address result (now typed "Mining address
(transparent)").
- Receive: a selected mining address shows the explainer and a "Use a
shielded address" button (creates one if none exists) instead of the
payment request, and a "Not for payments" panel instead of a QR code.
The default selection prefers a shielded address; the "All" filter
hides empty mining addresses unless solo mining or marked as a mining
address; the filter reads All / Shielded / Mining.
- Request Payment: no transparent section, never prefilled with one.
- Overview: no "Mining - Mining" tag on a marked transparent row.
- FAQ: address answers rewritten; the send and memo answers no longer
imply you can pay a transparent address. All 8 languages.
i18n: 4 new keys, 6 FAQ answers updated in place, 2 dead keys removed,
CJK subset rebuilt. UI sweep: receive-mining-address and
modal-validate-mining targets.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -22,6 +22,7 @@ bool ValidateAddressDialog::s_validating = false;
|
||||
char ValidateAddressDialog::s_address_input[512] = "";
|
||||
bool ValidateAddressDialog::s_is_valid = false;
|
||||
bool ValidateAddressDialog::s_is_mine = false;
|
||||
bool ValidateAddressDialog::s_is_mining = false;
|
||||
std::string ValidateAddressDialog::s_address_type;
|
||||
std::string ValidateAddressDialog::s_error_message;
|
||||
|
||||
@@ -33,10 +34,22 @@ void ValidateAddressDialog::show()
|
||||
s_address_input[0] = '\0';
|
||||
s_is_valid = false;
|
||||
s_is_mine = false;
|
||||
s_is_mining = false;
|
||||
s_address_type.clear();
|
||||
s_error_message.clear();
|
||||
}
|
||||
|
||||
void ValidateAddressDialog::sweepShowMiningResult(const char* address)
|
||||
{
|
||||
show();
|
||||
snprintf(s_address_input, sizeof(s_address_input), "%s", address);
|
||||
s_validated = true;
|
||||
s_is_valid = true;
|
||||
s_is_mine = true;
|
||||
s_is_mining = true;
|
||||
s_address_type = TR("validate_mining_type");
|
||||
}
|
||||
|
||||
bool ValidateAddressDialog::isOpen()
|
||||
{
|
||||
return s_open;
|
||||
@@ -112,6 +125,7 @@ void ValidateAddressDialog::render(App* app)
|
||||
s_is_valid = valid;
|
||||
s_is_mine = mine;
|
||||
s_address_type = TR("validate_shielded_type");
|
||||
s_is_mining = false;
|
||||
} else {
|
||||
s_error_message = error;
|
||||
s_is_valid = false;
|
||||
@@ -138,7 +152,8 @@ void ValidateAddressDialog::render(App* app)
|
||||
if (error.empty()) {
|
||||
s_is_valid = valid;
|
||||
s_is_mine = mine;
|
||||
s_address_type = TR("validate_transparent_type");
|
||||
s_address_type = TR("validate_mining_type");
|
||||
s_is_mining = true;
|
||||
} else {
|
||||
s_error_message = error;
|
||||
s_is_valid = false;
|
||||
@@ -204,6 +219,12 @@ void ValidateAddressDialog::render(App* app)
|
||||
} else {
|
||||
ImGui::TextDisabled("%s", TR("validate_not_mine"));
|
||||
}
|
||||
if (s_is_mining) { // valid, but not for payments
|
||||
ImGui::Spacing();
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImGui::ColorConvertU32ToFloat4(material::Warning()));
|
||||
ImGui::TextWrapped("%s", TR("mining_addr_explainer"));
|
||||
ImGui::PopStyleColor();
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (!app->isConnected()) {
|
||||
|
||||
Reference in New Issue
Block a user