fix(lite): import-key fallback on mis-routed key + clamp shield fee
- importKey routed transparent vs. shielded purely by the first character, which can mis-route (e.g. testnet/regtest WIFs). On failure, try the other import command before reporting an error (each validates the encoding, so a wrong command rejects rather than mis-imports). The key copy is wiped after both tries. - Clamp the shield dialog's fee input to [0, 1] DRGX, mirroring the UTXO-limit clamp, so a negative or fat-fingered huge fee can't be submitted. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -138,6 +138,8 @@ void ShieldDialog::render(App* app)
|
||||
ImGui::Text("%s", TR("fee_label"));
|
||||
ImGui::SetNextItemWidth(feeInput.width);
|
||||
ImGui::InputDouble("##Fee", &s_fee, 0.0001, 0.001, "%.8f");
|
||||
if (s_fee < 0.0) s_fee = 0.0; // no negative fee
|
||||
if (s_fee > 1.0) s_fee = 1.0; // guard a fat-fingered huge fee (mirrors utxo clamp)
|
||||
ImGui::SameLine();
|
||||
ImGui::TextDisabled("DRGX");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user