edit tx note fix

This commit is contained in:
julian 2023-11-09 12:26:15 -06:00
parent 4a71e54b6b
commit 255d9a7813
2 changed files with 3 additions and 4 deletions

View file

@ -197,7 +197,7 @@ class _EditNoteViewState extends ConsumerState<EditNoteView> {
_note?.copyWith(value: _noteController.text) ??
TransactionNote(
walletId: widget.walletId,
txid: widget.walletId,
txid: widget.txid,
value: _noteController.text,
),
);
@ -215,7 +215,7 @@ class _EditNoteViewState extends ConsumerState<EditNoteView> {
_note?.copyWith(value: _noteController.text) ??
TransactionNote(
walletId: widget.walletId,
txid: widget.walletId,
txid: widget.txid,
value: _noteController.text,
),
);

View file

@ -30,7 +30,6 @@ class _TransactionNoteWatcher extends ChangeNotifier {
.txidWalletIdEqualTo(key.txid, key.walletId)
.watch(fireImmediately: true)
.listen((event) {
print("AAAAAA $event");
if (event.isEmpty) {
_value = null;
} else {
@ -70,6 +69,6 @@ final _wiProvider = ChangeNotifierProvider.family<_TransactionNoteWatcher,
final pTransactionNote =
Provider.family<TransactionNote?, ({String walletId, String txid})>(
(ref, key) {
return ref.watch(_wiProvider(key)).value;
return ref.watch(_wiProvider(key).select((value) => value.value));
},
);