starknet.dart icon indicating copy to clipboard operation
starknet.dart copied to clipboard

UI unresponsive and no error shown when importing invalid mnemonic using wallet_kit

Open redDwarf03 opened this issue 6 months ago • 0 comments

When testing a dApp using wallet_kit, I encountered an issue during wallet import:

After entering an invalid mnemonic phrase, the UI did not display any error message.

The app navigated to the "Protect your wallet" screen, but the action buttons were disabled and unresponsive.

No user feedback was provided to indicate that the mnemonic was invalid.

However, the console logs showed the following error:

E/flutter (16675): [ERROR:flutter/runtime/dart_vm_initializer.cc(40)] Unhandled Exception: Invalid argument(s): Invalid mnemonic phrase
E/flutter (16675): #0      derivePrivateKey (package:starknet/src/core/crypto/derivation.dart:71:5)
E/flutter (16675): #1      WalletService.derivePrivateKey.<anonymous closure> (package:wallet_kit/services/wallet_service.dart:133:16)
E/flutter (16675): #2      compute.<anonymous closure> (package:flutter/src/foundation/_isolates_io.dart:19:20)
E/flutter (16675): #3      _RemoteRunner._run (dart:isolate:1098:47)
E/flutter (16675): #4      _RemoteRunner._remoteExecute (dart:isolate:1092:12)
E/flutter (16675): #5      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:300:17)
E/flutter (16675): #6      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)

redDwarf03 avatar May 23 '25 12:05 redDwarf03