File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -322,22 +322,18 @@ class _SolTokenSendViewState extends ConsumerState<SolTokenSendView> {
322322 return null ;
323323 }
324324 if (address.isNotEmpty) {
325- // TODO: Implement Solana address validation.
326- // For now, perform basic length check (44 chars is typical for Solana addresses).
327- if (address.length < 32 || address.length > 44 ) {
325+ if (! Solana (CryptoCurrencyNetwork .main).validateAddress (address)) {
328326 return "Invalid address" ;
329327 }
330328 }
331329 return null ;
332330 }
333331
334332 void _updatePreviewButtonState (String ? address, Amount ? amount) {
335- // TODO: Implement Solana address validation.
336333 final isValidAddress =
337334 address != null &&
338335 address.isNotEmpty &&
339- address.length >= 32 &&
340- address.length <= 44 ;
336+ Solana (CryptoCurrencyNetwork .main).validateAddress (address);
341337 ref.read (previewTokenTxButtonStateProvider.state).state =
342338 (isValidAddress && amount != null && amount > Amount .zero);
343339 }
You can’t perform that action at this time.
0 commit comments