From 3f95e59ec208f93d0ceb2847b905f4d4868884c3 Mon Sep 17 00:00:00 2001 From: gshaowei6 <47922975+gshaowei6@users.noreply.github.com> Date: Sat, 30 May 2026 02:38:23 +0800 Subject: [PATCH 01/10] feat: add stellar mobile and ui bounty fixes --- .../src/components/TransferNoteInput.tsx | 122 +++++------ .../useSendTransaction.schedule.test.ts | 5 +- .../src/components/TransactionHistoryList.tsx | 7 +- apps/mobile-wallet/src/index.ts | 1 + .../src/linking/__tests__/paymentUri.test.ts | 25 +++ apps/mobile-wallet/src/linking/index.ts | 2 + apps/mobile-wallet/src/linking/paymentUri.ts | 53 +++++ .../navigation/__tests__/onboarding.test.tsx | 3 +- .../__tests__/TransactionHistoryList.test.tsx | 10 + .../history/usePaginatedTransactionHistory.ts | 16 -- .../src/security/hooks/useBiometricUnlock.ts | 11 +- packages/stellar/src/__tests__/client.test.ts | 73 +++++++ packages/stellar/src/client.ts | 49 +++-- packages/stellar/src/errors.ts | 57 +++++- packages/stellar/src/fee-stats.ts | 5 + packages/types/src/index.ts | 3 +- packages/ui-kit/package.json | 1 + .../ui-kit/src/__tests__/Form/Field.test.tsx | 55 +++++ .../ui-kit/src/__tests__/test-utils/a11y.ts | 42 ++++ .../src/components/Form/Field.stories.tsx | 35 ++++ packages/ui-kit/src/components/Form/Field.tsx | 81 ++++++++ packages/ui-kit/src/components/Form/index.ts | 3 + .../components/Toast/NotificationProvider.tsx | 4 +- .../ui-kit/src/components/Toast/Toast.tsx | 1 - .../src/components/Toast/ToastContainer.tsx | 1 - .../ui-kit/src/components/TransactionItem.tsx | 5 +- .../ui-kit/src/components/ui/button.test.tsx | 7 + .../ui-kit/src/components/ui/input.test.tsx | 12 ++ packages/ui-kit/src/index.ts | 3 + packages/ui-kit/tsconfig.json | 2 +- pnpm-lock.yaml | 193 +++++++++++------- 31 files changed, 696 insertions(+), 191 deletions(-) create mode 100644 apps/mobile-wallet/src/linking/__tests__/paymentUri.test.ts create mode 100644 apps/mobile-wallet/src/linking/index.ts create mode 100644 apps/mobile-wallet/src/linking/paymentUri.ts create mode 100644 packages/ui-kit/src/__tests__/Form/Field.test.tsx create mode 100644 packages/ui-kit/src/__tests__/test-utils/a11y.ts create mode 100644 packages/ui-kit/src/components/Form/Field.stories.tsx create mode 100644 packages/ui-kit/src/components/Form/Field.tsx diff --git a/apps/extension-wallet/src/components/TransferNoteInput.tsx b/apps/extension-wallet/src/components/TransferNoteInput.tsx index ad5a14d9..7c9068ec 100644 --- a/apps/extension-wallet/src/components/TransferNoteInput.tsx +++ b/apps/extension-wallet/src/components/TransferNoteInput.tsx @@ -1,15 +1,13 @@ import React from 'react'; -import { - validateTransferNote, - getRemainingCharacters, - MAX_NOTE_LENGTH, -} from '@/utils/note-validation'; +import { getRemainingCharacters, MAX_NOTE_LENGTH } from '@/utils/note-validation'; +import { Field } from '@ancore/ui-kit'; interface TransferNoteInputProps { value: string; onChange: (value: string) => void; error?: string; className?: string; + label?: string; placeholder?: string; disabled?: boolean; required?: boolean; @@ -29,6 +27,7 @@ export function TransferNoteInput({ onChange, error, className = '', + label = 'Note', placeholder = 'Add a note (optional)', disabled = false, required = false, @@ -52,17 +51,40 @@ export function TransferNoteInput({ } }; + const warning = isOverLimit && !error && ( +
+ + + + Note exceeds character limit and will be truncated +
+ ); + return ( -
-
-