validateRecipient method

  1. @override
ValidatedAddress validateRecipient(
  1. String address
)
override

Classify a recipient address against the wallet's OWN network โ€” its memo capability (the ยง5.1 SHIELDED-vs-TRANSPARENT / private-vs-public axis) โ€” WITHOUT composing or proposing anything. Drives the send form's LIVE recipient feedback + memo gating. The screen never needs to know mainnet/testnet (the same network-hiding seam as composePaymentUri, so a host-supplied network can never be a footgun). SYNCHRONOUS, local, NO network, no money movement โ€” safe to call on every keystroke and fully offline (the same audited Address::parse gate propose lowers through, so the live check can never disagree with what a send will accept). Throws a typed WalletApiError (addressInvalid for malformed, networkMismatch for an other-network address) the host maps to an honest inline status.

Implementation

@override
ValidatedAddress validateRecipient(String address) {
  validateRecipientCount++;
  lastValidatedRecipient = address;
  if (validateRecipientThrows != null) throw validateRecipientThrows!;
  return validateRecipientResult;
}