fix: replace Nip19.decode to bech32ToHex (TLV decode)

This commit is contained in:
2025-05-12 15:58:13 +01:00
parent 026b2eb85c
commit 77d70e164b
8 changed files with 85 additions and 11 deletions

View File

@ -1,9 +1,9 @@
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:ndk/shared/nips/nip19/nip19.dart';
import 'package:zap_stream_flutter/login.dart';
import 'package:zap_stream_flutter/main.dart';
import 'package:zap_stream_flutter/theme.dart';
import 'package:zap_stream_flutter/utils.dart';
import 'package:zap_stream_flutter/widgets/button.dart';
class LoginInputPage extends StatefulWidget {
@ -30,7 +30,7 @@ class _LoginInputPage extends State<LoginInputPage> {
"Login",
onTap: () async {
try {
final keyData = Nip19.decode(_controller.text);
final keyData = bech32ToHex(_controller.text);
if (keyData.isNotEmpty) {
loginData.value = LoginAccount.nip19(_controller.text);
context.go("/");