diff --git a/apps/mobile/src/components/action-bar/action-bar-container.tsx b/apps/mobile/src/components/action-bar/action-bar-container.tsx index 60873afee..01010b967 100644 --- a/apps/mobile/src/components/action-bar/action-bar-container.tsx +++ b/apps/mobile/src/components/action-bar/action-bar-container.tsx @@ -3,12 +3,10 @@ import { NativeScrollEvent, NativeSyntheticEvent } from 'react-native'; import { useSheetNavigatorContext } from '@/common/sheet-navigator/sheet-navigator-provider'; import { ActionBar, ActionBarMethods } from '@/components/action-bar/action-bar'; -import { AppRoutes } from '@/routes'; import { TestId } from '@/shared/test-id'; import { useWallets } from '@/store/wallets/wallets.read'; import { isFeatureEnabled } from '@/utils/feature-flag'; import { t } from '@lingui/macro'; -import { useRouter } from 'expo-router'; import { ArrowsRepeatLeftRightIcon, @@ -152,7 +150,6 @@ function ActionBarButton({ onPress, icon, label, testID }: ActionBarButtonProps) export const ActionBarContainer = forwardRef((_, ref) => { const { sendSheetRef, receiveSheetRef } = useSheetNavigatorContext(); - const router = useRouter(); const wallets = useWallets(); const addWalletSheetRef = useRef(null); @@ -197,7 +194,10 @@ export const ActionBarContainer = forwardRef((_, ref) => { right={ isFeatureEnabled() && ( router.navigate(AppRoutes.Swap)} + onPress={() => { + // TODO: do nothing for now + //router.navigate(AppRoutes.Swap) + }} icon={} label={t({ id: 'action_bar.swap_label', diff --git a/apps/mobile/src/features/approver/components/memo-card.tsx b/apps/mobile/src/features/approver/components/memo-card.tsx index e08a9845d..a9d305e3e 100644 --- a/apps/mobile/src/features/approver/components/memo-card.tsx +++ b/apps/mobile/src/features/approver/components/memo-card.tsx @@ -1,11 +1,12 @@ import { t } from '@lingui/macro'; -import { Avatar, Box, Cell, ChevronRightIcon, NoteTextIcon, Text } from '@leather.io/ui/native'; +import { Avatar, Box, Cell, ChevronRightIcon, NoteTextIcon } from '@leather.io/ui/native'; interface MemoCardProps { memo: string; onPress(): void; } + export function MemoCard({ memo, onPress }: MemoCardProps) { return ( diff --git a/apps/mobile/src/features/approver/components/nonce-card.tsx b/apps/mobile/src/features/approver/components/nonce-card.tsx index c5a79043d..49534b3f7 100644 --- a/apps/mobile/src/features/approver/components/nonce-card.tsx +++ b/apps/mobile/src/features/approver/components/nonce-card.tsx @@ -6,6 +6,7 @@ interface NonceCardProps { nonce: string; onPress(): void; } + export function NonceCard({ nonce, onPress }: NonceCardProps) { return ( diff --git a/apps/mobile/src/features/psbt-signer/psbt-signer.tsx b/apps/mobile/src/features/psbt-signer/psbt-signer.tsx index ce35bae2d..4daa34924 100644 --- a/apps/mobile/src/features/psbt-signer/psbt-signer.tsx +++ b/apps/mobile/src/features/psbt-signer/psbt-signer.tsx @@ -198,14 +198,24 @@ export function BasePsbtSigner({ }, 1000); }, onError() { - displayToast({ title: 'Failed to broadcast transaction', type: 'error' }); + displayToast({ + title: t({ + id: 'approver.send.btc.error.broadcast', + message: 'Failed to broadcast transaction', + }), + type: 'error', + }); setApproverState('start'); }, }); } catch { - /* eslint-disable-next-line no-console */ - console.log(e); - displayToast({ title: 'Failed to broadcast transaction', type: 'error' }); + displayToast({ + title: t({ + id: 'approver.send.btc.error.broadcast', + message: 'Failed to broadcast transaction', + }), + type: 'error', + }); setApproverState('start'); } } diff --git a/apps/mobile/src/features/stacks-tx-signer/stacks-tx-signer.tsx b/apps/mobile/src/features/stacks-tx-signer/stacks-tx-signer.tsx index 732fe30d5..2ac10b253 100644 --- a/apps/mobile/src/features/stacks-tx-signer/stacks-tx-signer.tsx +++ b/apps/mobile/src/features/stacks-tx-signer/stacks-tx-signer.tsx @@ -135,9 +135,14 @@ export function StacksTxSigner({ setTxHex(newTxHex); setSelectedFeeType(feeType); } - } catch (e) { - displayToast({ title: 'Failed to change fee', type: 'error' }); - console.log(e); + } catch { + displayToast({ + title: t({ + id: 'approver.send.stx.error.change-fee', + message: 'Failed to change fee', + }), + type: 'error', + }); } } @@ -155,7 +160,13 @@ export function StacksTxSigner({ setTxHex(newTxHex); } } catch { - displayToast({ title: 'Failed to change nonce', type: 'error' }); + displayToast({ + title: t({ + id: 'approver.send.stx.error.change-nonce', + message: 'Failed to change nonce', + }), + type: 'error', + }); } } async function onChangeMemo(memo: string) { @@ -171,9 +182,14 @@ export function StacksTxSigner({ const newTxHex = bytesToHex(newTx.serialize()); setTxHex(newTxHex); } - } catch (e) { - displayToast({ title: 'Failed to change memo', type: 'error' }); - console.log(e); + } catch { + displayToast({ + title: t({ + id: 'approver.send.stx.error.change-memo', + message: 'Failed to change memo', + }), + type: 'error', + }); } } if (!account) { @@ -202,9 +218,13 @@ export function StacksTxSigner({ } ); } catch (e) { - /* eslint-disable-next-line no-console */ - console.log(e); - displayToast({ title: 'Failed to broadcast transaction', type: 'error' }); + displayToast({ + title: t({ + id: 'approver.send.stx.error.broadcast', + message: 'Failed to broadcast transaction', + }), + type: 'error', + }); setApproverState('start'); } }