@oxyhq/services 6.9.4 → 6.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/ui/client.js +0 -7
- package/lib/commonjs/ui/client.js.map +1 -1
- package/lib/commonjs/ui/components/BottomSheet.js +5 -3
- package/lib/commonjs/ui/components/BottomSheet.js.map +1 -1
- package/lib/commonjs/ui/components/FontLoader.js +1 -1
- package/lib/commonjs/ui/components/FontLoader.js.map +1 -1
- package/lib/commonjs/ui/components/Header.js.map +1 -1
- package/lib/commonjs/ui/components/HelperText.js +1 -1
- package/lib/commonjs/ui/components/HelperText.js.map +1 -1
- package/lib/commonjs/ui/components/Icon.js +6 -2
- package/lib/commonjs/ui/components/Icon.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +9 -1
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/QuickActions.js.map +1 -1
- package/lib/commonjs/ui/components/SignInModal.js +5 -4
- package/lib/commonjs/ui/components/SignInModal.js.map +1 -1
- package/lib/commonjs/ui/components/TouchableRipple/Pressable.js.map +1 -1
- package/lib/commonjs/ui/components/feedback/FormInput.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js.map +1 -1
- package/lib/commonjs/ui/components/icon/OxyIcon.js.map +1 -1
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +1 -1
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +26 -20
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js +9 -5
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js +19 -13
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js +9 -5
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js +14 -10
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js.map +1 -1
- package/lib/commonjs/ui/components/types.js +4 -0
- package/lib/commonjs/ui/hooks/useAssets.js +4 -4
- package/lib/commonjs/ui/hooks/useAssets.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAsyncAction.js +2 -2
- package/lib/commonjs/ui/hooks/useAsyncAction.js.map +1 -1
- package/lib/commonjs/ui/hooks/useFollow.js.map +1 -1
- package/lib/commonjs/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSettingToggle.js +2 -2
- package/lib/commonjs/ui/hooks/useSettingToggle.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +3 -3
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +66 -60
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +2 -2
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +139 -79
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +2 -2
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js +22 -17
- package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/OxyAuthScreen.js +2 -2
- package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +6 -2
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +39 -29
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserLinksScreen.js +11 -3
- package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
- package/lib/commonjs/ui/stores/followStore.js +2 -2
- package/lib/commonjs/ui/stores/followStore.js.map +1 -1
- package/lib/commonjs/ui/utils/errorHandlers.js +2 -2
- package/lib/commonjs/ui/utils/errorHandlers.js.map +1 -1
- package/lib/commonjs/ui/utils/fileManagement.js +8 -3
- package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
- package/lib/commonjs/ui/utils/sessionHelpers.js +3 -2
- package/lib/commonjs/ui/utils/sessionHelpers.js.map +1 -1
- package/lib/commonjs/ui/utils/storageHelpers.js +1 -1
- package/lib/commonjs/ui/utils/storageHelpers.js.map +1 -1
- package/lib/commonjs/utils/hookUtils.js +4 -0
- package/lib/commonjs/utils/hookUtils.js.map +1 -1
- package/lib/module/ui/client.js +0 -1
- package/lib/module/ui/client.js.map +1 -1
- package/lib/module/ui/components/BottomSheet.js +5 -3
- package/lib/module/ui/components/BottomSheet.js.map +1 -1
- package/lib/module/ui/components/FontLoader.js +1 -1
- package/lib/module/ui/components/FontLoader.js.map +1 -1
- package/lib/module/ui/components/Header.js.map +1 -1
- package/lib/module/ui/components/HelperText.js +1 -1
- package/lib/module/ui/components/HelperText.js.map +1 -1
- package/lib/module/ui/components/Icon.js +6 -2
- package/lib/module/ui/components/Icon.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +9 -1
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/QuickActions.js.map +1 -1
- package/lib/module/ui/components/SignInModal.js +5 -4
- package/lib/module/ui/components/SignInModal.js.map +1 -1
- package/lib/module/ui/components/TouchableRipple/Pressable.js.map +1 -1
- package/lib/module/ui/components/feedback/FormInput.js.map +1 -1
- package/lib/module/ui/components/fileManagement/AnimatedButton.js.map +1 -1
- package/lib/module/ui/components/icon/OxyIcon.js.map +1 -1
- package/lib/module/ui/components/modals/DeleteAccountModal.js +1 -1
- package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentDetailsStep.js +26 -20
- package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentMethodStep.js +9 -5
- package/lib/module/ui/components/payment/PaymentMethodStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentReviewStep.js +19 -13
- package/lib/module/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSuccessStep.js +9 -5
- package/lib/module/ui/components/payment/PaymentSuccessStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSummaryStep.js +14 -10
- package/lib/module/ui/components/payment/PaymentSummaryStep.js.map +1 -1
- package/lib/module/ui/components/types.js +2 -0
- package/lib/module/ui/hooks/useAssets.js +4 -4
- package/lib/module/ui/hooks/useAssets.js.map +1 -1
- package/lib/module/ui/hooks/useAsyncAction.js +2 -2
- package/lib/module/ui/hooks/useAsyncAction.js.map +1 -1
- package/lib/module/ui/hooks/useFollow.js.map +1 -1
- package/lib/module/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/module/ui/hooks/useSettingToggle.js +2 -2
- package/lib/module/ui/hooks/useSettingToggle.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +3 -3
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +66 -60
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +2 -2
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +139 -79
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +2 -2
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/LearnMoreUsernamesScreen.js +22 -17
- package/lib/module/ui/screens/LearnMoreUsernamesScreen.js.map +1 -1
- package/lib/module/ui/screens/OxyAuthScreen.js +2 -2
- package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +6 -2
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/SessionManagementScreen.js +39 -29
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/UserLinksScreen.js +11 -3
- package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +1 -1
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js +1 -1
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
- package/lib/module/ui/stores/followStore.js +2 -2
- package/lib/module/ui/stores/followStore.js.map +1 -1
- package/lib/module/ui/utils/errorHandlers.js +2 -2
- package/lib/module/ui/utils/errorHandlers.js.map +1 -1
- package/lib/module/ui/utils/fileManagement.js +8 -3
- package/lib/module/ui/utils/fileManagement.js.map +1 -1
- package/lib/module/ui/utils/sessionHelpers.js +3 -2
- package/lib/module/ui/utils/sessionHelpers.js.map +1 -1
- package/lib/module/ui/utils/storageHelpers.js +1 -1
- package/lib/module/ui/utils/storageHelpers.js.map +1 -1
- package/lib/module/utils/hookUtils.js +4 -0
- package/lib/module/utils/hookUtils.js.map +1 -1
- package/lib/typescript/commonjs/ui/client.d.ts +0 -1
- package/lib/typescript/commonjs/ui/client.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/BottomSheet.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/Icon.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/TextField/Adornment/types.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/TextField/Adornment/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/TouchableRipple/Pressable.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/AnimatedButton.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/AnimatedButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/PaymentDetailsStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/PaymentMethodStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/PaymentReviewStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/PaymentSuccessStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/PaymentSummaryStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/types.d.ts +18 -17
- package/lib/typescript/commonjs/ui/components/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +2 -0
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +1 -1
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/sessionHelpers.d.ts +2 -1
- package/lib/typescript/commonjs/ui/utils/sessionHelpers.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/hookUtils.d.ts.map +1 -1
- package/lib/typescript/module/ui/client.d.ts +0 -1
- package/lib/typescript/module/ui/client.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/BottomSheet.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/Icon.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/Adornment/types.d.ts +1 -1
- package/lib/typescript/module/ui/components/TextField/Adornment/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TouchableRipple/Pressable.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/AnimatedButton.d.ts +1 -1
- package/lib/typescript/module/ui/components/fileManagement/AnimatedButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentDetailsStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentMethodStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentReviewStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentSuccessStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentSummaryStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/types.d.ts +18 -17
- package/lib/typescript/module/ui/components/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts +2 -0
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/fileManagement.d.ts +1 -1
- package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/sessionHelpers.d.ts +2 -1
- package/lib/typescript/module/ui/utils/sessionHelpers.d.ts.map +1 -1
- package/lib/typescript/module/utils/hookUtils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/ui/client.ts +0 -1
- package/src/ui/components/BottomSheet.tsx +4 -3
- package/src/ui/components/FontLoader.tsx +1 -1
- package/src/ui/components/Header.tsx +2 -2
- package/src/ui/components/HelperText.tsx +1 -1
- package/src/ui/components/Icon.tsx +2 -0
- package/src/ui/components/OxyProvider.tsx +6 -0
- package/src/ui/components/QuickActions.tsx +1 -1
- package/src/ui/components/SignInModal.tsx +6 -5
- package/src/ui/components/TextField/Adornment/types.tsx +1 -1
- package/src/ui/components/TouchableRipple/Pressable.tsx +1 -0
- package/src/ui/components/feedback/FormInput.tsx +1 -1
- package/src/ui/components/fileManagement/AnimatedButton.tsx +2 -2
- package/src/ui/components/icon/OxyIcon.tsx +1 -1
- package/src/ui/components/modals/DeleteAccountModal.tsx +2 -2
- package/src/ui/components/payment/PaymentDetailsStep.tsx +24 -22
- package/src/ui/components/payment/PaymentMethodStep.tsx +7 -5
- package/src/ui/components/payment/PaymentReviewStep.tsx +15 -13
- package/src/ui/components/payment/PaymentSuccessStep.tsx +7 -5
- package/src/ui/components/payment/PaymentSummaryStep.tsx +12 -10
- package/src/ui/components/types.tsx +19 -17
- package/src/ui/hooks/useAssets.ts +8 -8
- package/src/ui/hooks/useAsyncAction.ts +4 -4
- package/src/ui/hooks/useFollow.ts +1 -1
- package/src/ui/hooks/useProfileEditing.ts +1 -1
- package/src/ui/hooks/useSettingToggle.ts +4 -4
- package/src/ui/screens/AccountOverviewScreen.tsx +6 -6
- package/src/ui/screens/AccountVerificationScreen.tsx +2 -2
- package/src/ui/screens/AppInfoScreen.tsx +63 -61
- package/src/ui/screens/FeedbackScreen.tsx +3 -3
- package/src/ui/screens/FileManagementScreen.tsx +130 -121
- package/src/ui/screens/LanguageSelectorScreen.tsx +3 -3
- package/src/ui/screens/LearnMoreUsernamesScreen.tsx +22 -19
- package/src/ui/screens/OxyAuthScreen.tsx +3 -3
- package/src/ui/screens/PaymentGatewayScreen.tsx +4 -2
- package/src/ui/screens/SessionManagementScreen.tsx +30 -28
- package/src/ui/screens/UserLinksScreen.tsx +5 -3
- package/src/ui/screens/WelcomeNewUserScreen.tsx +2 -2
- package/src/ui/screens/karma/KarmaLeaderboardScreen.tsx +1 -1
- package/src/ui/screens/karma/KarmaRulesScreen.tsx +1 -1
- package/src/ui/stores/followStore.ts +4 -4
- package/src/ui/types/navigation.ts +2 -0
- package/src/ui/utils/errorHandlers.ts +2 -2
- package/src/ui/utils/fileManagement.ts +13 -8
- package/src/ui/utils/sessionHelpers.ts +3 -2
- package/src/ui/utils/storageHelpers.ts +1 -1
- package/src/utils/hookUtils.ts +4 -2
- package/lib/commonjs/ui/components/AnimationExample.js +0 -213
- package/lib/commonjs/ui/components/AnimationExample.js.map +0 -1
- package/lib/commonjs/ui/components/ErrorBoundary.js +0 -145
- package/lib/commonjs/ui/components/ErrorBoundary.js.map +0 -1
- package/lib/commonjs/ui/components/WebOxyProvider.js +0 -106
- package/lib/commonjs/ui/components/WebOxyProvider.js.map +0 -1
- package/lib/module/ui/components/AnimationExample.js +0 -209
- package/lib/module/ui/components/AnimationExample.js.map +0 -1
- package/lib/module/ui/components/ErrorBoundary.js +0 -139
- package/lib/module/ui/components/ErrorBoundary.js.map +0 -1
- package/lib/module/ui/components/WebOxyProvider.js +0 -102
- package/lib/module/ui/components/WebOxyProvider.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/AnimationExample.d.ts +0 -4
- package/lib/typescript/commonjs/ui/components/AnimationExample.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/ErrorBoundary.d.ts +0 -31
- package/lib/typescript/commonjs/ui/components/ErrorBoundary.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/WebOxyProvider.d.ts +0 -52
- package/lib/typescript/commonjs/ui/components/WebOxyProvider.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/AnimationExample.d.ts +0 -4
- package/lib/typescript/module/ui/components/AnimationExample.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ErrorBoundary.d.ts +0 -31
- package/lib/typescript/module/ui/components/ErrorBoundary.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/WebOxyProvider.d.ts +0 -52
- package/lib/typescript/module/ui/components/WebOxyProvider.d.ts.map +0 -1
- package/src/ui/components/AnimationExample.tsx +0 -195
- package/src/ui/components/ErrorBoundary.tsx +0 -154
- package/src/ui/components/WebOxyProvider.tsx +0 -117
|
@@ -94,13 +94,13 @@ const BottomSheet = forwardRef((props: BottomSheetProps, ref: React.ForwardedRef
|
|
|
94
94
|
}, []);
|
|
95
95
|
|
|
96
96
|
// Dismiss callbacks
|
|
97
|
-
const safeClose = () => {
|
|
97
|
+
const safeClose = useCallback(() => {
|
|
98
98
|
if (onDismissAttempt?.()) {
|
|
99
99
|
onDismiss?.();
|
|
100
100
|
} else if (!onDismissAttempt) {
|
|
101
101
|
onDismiss?.();
|
|
102
102
|
}
|
|
103
|
-
};
|
|
103
|
+
}, [onDismiss, onDismissAttempt]);
|
|
104
104
|
|
|
105
105
|
const finishClose = useCallback(() => {
|
|
106
106
|
if (hasClosedRef.current) return;
|
|
@@ -109,6 +109,7 @@ const BottomSheet = forwardRef((props: BottomSheetProps, ref: React.ForwardedRef
|
|
|
109
109
|
setRendered(false);
|
|
110
110
|
}, [safeClose]);
|
|
111
111
|
|
|
112
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: opacity and translateY are Reanimated SharedValues (stable refs) that should not be listed as dependencies
|
|
112
113
|
useEffect(() => {
|
|
113
114
|
if (visible) {
|
|
114
115
|
if (closeTimeoutRef.current) {
|
|
@@ -299,7 +300,7 @@ const BottomSheet = forwardRef((props: BottomSheetProps, ref: React.ForwardedRef
|
|
|
299
300
|
// The sheet extends behind safe area, and screens add padding as needed
|
|
300
301
|
},
|
|
301
302
|
});
|
|
302
|
-
}, [colors.background, detached
|
|
303
|
+
}, [colors.background, detached]);
|
|
303
304
|
|
|
304
305
|
if (!rendered) return null;
|
|
305
306
|
|
|
@@ -154,7 +154,7 @@ export const setupFonts = async () => {
|
|
|
154
154
|
return true;
|
|
155
155
|
} catch (error: unknown) {
|
|
156
156
|
if (__DEV__) {
|
|
157
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
157
|
+
const errorMessage = error instanceof Error ? (error instanceof Error ? error.message : null) : String(error);
|
|
158
158
|
console.warn('Error setting up fonts:', errorMessage);
|
|
159
159
|
}
|
|
160
160
|
return false;
|
|
@@ -177,7 +177,7 @@ const Header: React.FC<HeaderProps> = ({
|
|
|
177
177
|
{action.text}
|
|
178
178
|
</Text>
|
|
179
179
|
) : (
|
|
180
|
-
<Ionicons name={action.icon as
|
|
180
|
+
<Ionicons name={action.icon as React.ComponentProps<typeof Ionicons>['name']} size={18} color={colors.tint} />
|
|
181
181
|
)}
|
|
182
182
|
</TouchableOpacity>
|
|
183
183
|
);
|
|
@@ -359,7 +359,7 @@ const styles = StyleSheet.create({
|
|
|
359
359
|
zIndex: 1000,
|
|
360
360
|
...Platform.select({
|
|
361
361
|
web: {
|
|
362
|
-
position: 'sticky' as
|
|
362
|
+
position: 'sticky' as 'relative',
|
|
363
363
|
top: 0,
|
|
364
364
|
left: 0,
|
|
365
365
|
right: 0,
|
|
@@ -158,6 +158,7 @@ const Icon = ({
|
|
|
158
158
|
: [];
|
|
159
159
|
return (
|
|
160
160
|
<MaterialCommunityIcons
|
|
161
|
+
// biome-ignore lint/suspicious/noExplicitAny: MaterialCommunityIcons name expects literal union; dynamic icon names require cast
|
|
161
162
|
name={s as any}
|
|
162
163
|
size={size}
|
|
163
164
|
color={iconColor}
|
|
@@ -166,6 +167,7 @@ const Icon = ({
|
|
|
166
167
|
transform: [{ scaleX: direction === 'rtl' ? -1 : 1 }],
|
|
167
168
|
},
|
|
168
169
|
...styleArray,
|
|
170
|
+
// biome-ignore lint/suspicious/noExplicitAny: style array type incompatibility with MaterialCommunityIcons style prop
|
|
169
171
|
] as any}
|
|
170
172
|
testID={testID}
|
|
171
173
|
{...accessibilityProps}
|
|
@@ -89,6 +89,7 @@ const OxyProvider: FC<OxyProviderProps> = ({
|
|
|
89
89
|
authWebUrl,
|
|
90
90
|
authRedirectUri,
|
|
91
91
|
queryClient: providedQueryClient,
|
|
92
|
+
skipProviderWrappers = false,
|
|
92
93
|
}) => {
|
|
93
94
|
|
|
94
95
|
// Simple storage initialization for query persistence
|
|
@@ -234,6 +235,11 @@ const OxyProvider: FC<OxyProviderProps> = ({
|
|
|
234
235
|
</QueryClientProvider>
|
|
235
236
|
);
|
|
236
237
|
|
|
238
|
+
// Skip wrapper providers when parent already provides them (e.g., Mention's AppProviders)
|
|
239
|
+
if (skipProviderWrappers) {
|
|
240
|
+
return <KeyboardProvider>{coreContent}</KeyboardProvider>;
|
|
241
|
+
}
|
|
242
|
+
|
|
237
243
|
// All platforms use same wrapper (KeyboardProvider is passthrough on web)
|
|
238
244
|
return (
|
|
239
245
|
<SafeAreaProvider>
|
|
@@ -40,7 +40,7 @@ const QuickActions: React.FC<QuickActionsProps> = ({ actions, theme }) => {
|
|
|
40
40
|
]}
|
|
41
41
|
onPress={action.onPress}
|
|
42
42
|
>
|
|
43
|
-
<Ionicons name={action.icon as
|
|
43
|
+
<Ionicons name={action.icon as React.ComponentProps<typeof Ionicons>['name']} size={24} color={action.iconColor} />
|
|
44
44
|
</TouchableOpacity>
|
|
45
45
|
<Text style={[styles.quickActionText, { color: textColor }]}>{action.title}</Text>
|
|
46
46
|
</View>
|
|
@@ -66,13 +66,13 @@ const visibilityListeners = new Set<(visible: boolean) => void>();
|
|
|
66
66
|
export const showSignInModal = () => {
|
|
67
67
|
modalVisible = true;
|
|
68
68
|
setModalVisibleCallback?.(true);
|
|
69
|
-
|
|
69
|
+
for (const listener of visibilityListeners) listener(true);
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
export const hideSignInModal = () => {
|
|
73
73
|
modalVisible = false;
|
|
74
74
|
setModalVisibleCallback?.(false);
|
|
75
|
-
|
|
75
|
+
for (const listener of visibilityListeners) listener(false);
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
export const isSignInModalVisible = () => modalVisible;
|
|
@@ -111,6 +111,7 @@ const SignInModal: React.FC = () => {
|
|
|
111
111
|
}, []);
|
|
112
112
|
|
|
113
113
|
// Animate in/out
|
|
114
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: opacity and scale are Reanimated SharedValues (stable refs) that should not be listed as dependencies
|
|
114
115
|
useEffect(() => {
|
|
115
116
|
if (visible) {
|
|
116
117
|
opacity.value = withTiming(1, { duration: 250 });
|
|
@@ -199,7 +200,7 @@ const SignInModal: React.FC = () => {
|
|
|
199
200
|
});
|
|
200
201
|
|
|
201
202
|
socket.on('connect_error', (err) => {
|
|
202
|
-
debug.log('Socket connection error, falling back to polling:', err.message);
|
|
203
|
+
debug.log('Socket connection error, falling back to polling:', (err instanceof Error ? err.message : null));
|
|
203
204
|
socket.disconnect();
|
|
204
205
|
startPolling(sessionToken);
|
|
205
206
|
});
|
|
@@ -252,8 +253,8 @@ const SignInModal: React.FC = () => {
|
|
|
252
253
|
setAuthSession({ sessionToken, expiresAt });
|
|
253
254
|
setIsWaiting(true);
|
|
254
255
|
connectSocket(sessionToken);
|
|
255
|
-
} catch (err:
|
|
256
|
-
setError(err.message || 'Failed to create auth session');
|
|
256
|
+
} catch (err: unknown) {
|
|
257
|
+
setError((err instanceof Error ? err.message : null) || 'Failed to create auth session');
|
|
257
258
|
} finally {
|
|
258
259
|
setIsLoading(false);
|
|
259
260
|
}
|
|
@@ -6,6 +6,6 @@ export type AdornmentConfig = {
|
|
|
6
6
|
};
|
|
7
7
|
export type AdornmentStyleAdjustmentForNativeInput = {
|
|
8
8
|
adornmentStyleAdjustmentForNativeInput: Array<
|
|
9
|
-
{ paddingRight: number; paddingLeft: number } |
|
|
9
|
+
{ paddingRight: number; paddingLeft: number } | Record<string, never>
|
|
10
10
|
>;
|
|
11
11
|
};
|
|
@@ -38,4 +38,5 @@ export type PressableProps = Omit<
|
|
|
38
38
|
|
|
39
39
|
export const Pressable: React.ForwardRefExoticComponent<
|
|
40
40
|
PressableProps & React.RefAttributes<View>
|
|
41
|
+
// biome-ignore lint/suspicious/noExplicitAny: PressableNative type must be widened to support web-specific hover/focus state callback types
|
|
41
42
|
> = PressableNative as any;
|
|
@@ -10,7 +10,7 @@ interface AnimatedButtonProps {
|
|
|
10
10
|
icon: string;
|
|
11
11
|
primaryColor: string;
|
|
12
12
|
textColor: string;
|
|
13
|
-
style:
|
|
13
|
+
style: Record<string, unknown>;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -46,7 +46,7 @@ export const AnimatedButton: React.FC<AnimatedButtonProps> = ({
|
|
|
46
46
|
<Animated.View style={[style, { backgroundColor }]}>
|
|
47
47
|
<Animated.View>
|
|
48
48
|
<MaterialCommunityIcons
|
|
49
|
-
name={icon as
|
|
49
|
+
name={icon as React.ComponentProps<typeof MaterialCommunityIcons>['name']}
|
|
50
50
|
size={16}
|
|
51
51
|
color={isSelected ? '#FFFFFF' : textColor}
|
|
52
52
|
/>
|
|
@@ -54,8 +54,8 @@ const DeleteAccountModal: React.FC<DeleteAccountModalProps> = ({
|
|
|
54
54
|
try {
|
|
55
55
|
await onDelete(password);
|
|
56
56
|
// Modal will be closed by parent on success
|
|
57
|
-
} catch (err:
|
|
58
|
-
setError(err
|
|
57
|
+
} catch (err: unknown) {
|
|
58
|
+
setError((err instanceof Error ? err.message : null) || t('deleteAccount.error') || 'Failed to delete account');
|
|
59
59
|
} finally {
|
|
60
60
|
setIsDeleting(false);
|
|
61
61
|
}
|
|
@@ -8,6 +8,7 @@ import { FAIRWalletIcon } from '../icon';
|
|
|
8
8
|
import { createPaymentStyles } from './paymentStyles';
|
|
9
9
|
import { toast } from '../../../lib/sonner';
|
|
10
10
|
import type { CardDetails, PaymentColors, PaymentStepAnimations } from './types';
|
|
11
|
+
import { useI18n } from '../../hooks/useI18n';
|
|
11
12
|
|
|
12
13
|
interface PaymentDetailsStepProps {
|
|
13
14
|
paymentMethod: string;
|
|
@@ -37,11 +38,12 @@ const PaymentDetailsStep: React.FC<PaymentDetailsStepProps> = ({
|
|
|
37
38
|
QRCodeComponent,
|
|
38
39
|
}) => {
|
|
39
40
|
const styles = useMemo(() => createPaymentStyles(colors), [colors]);
|
|
41
|
+
const { t } = useI18n();
|
|
40
42
|
const { fadeAnim, slideAnim, scaleAnim } = animations;
|
|
41
43
|
|
|
42
44
|
const handleCopyAddress = () => {
|
|
43
45
|
Clipboard.setString(faircoinAddress);
|
|
44
|
-
toast('
|
|
46
|
+
toast(t('payment.details.addressCopied'));
|
|
45
47
|
};
|
|
46
48
|
|
|
47
49
|
const handleOpenFairWallet = () => {
|
|
@@ -68,22 +70,22 @@ const PaymentDetailsStep: React.FC<PaymentDetailsStepProps> = ({
|
|
|
68
70
|
>
|
|
69
71
|
<View style={styles.section}>
|
|
70
72
|
<Text style={styles.sectionTitle}>
|
|
71
|
-
{paymentMethod === 'card' ? '
|
|
72
|
-
paymentMethod === 'oxy' ? '
|
|
73
|
-
paymentMethod === 'faircoin' ? '
|
|
73
|
+
{paymentMethod === 'card' ? t('payment.details.cardDetails') :
|
|
74
|
+
paymentMethod === 'oxy' ? t('payment.details.oxyPay') :
|
|
75
|
+
paymentMethod === 'faircoin' ? t('payment.details.faircoinPayment') : t('payment.details.paymentDetails')}
|
|
74
76
|
</Text>
|
|
75
77
|
|
|
76
78
|
{paymentMethod === 'card' && (
|
|
77
79
|
<View style={styles.cardPaymentCard}>
|
|
78
80
|
<View style={styles.cardPaymentContent}>
|
|
79
81
|
<Ionicons name="card-outline" size={64} color={colors.primary} style={styles.cardPaymentIcon} />
|
|
80
|
-
<Text style={styles.cardPaymentMainTitle}>
|
|
81
|
-
<Text style={styles.cardPaymentSubtitle}>
|
|
82
|
+
<Text style={styles.cardPaymentMainTitle}>{t('payment.details.creditCard')}</Text>
|
|
83
|
+
<Text style={styles.cardPaymentSubtitle}>{t('payment.details.enterCardSecurely')}</Text>
|
|
82
84
|
|
|
83
85
|
<View style={styles.cardPaymentFields}>
|
|
84
86
|
<View style={styles.cardRowInfo}>
|
|
85
87
|
<Ionicons name="card-outline" size={24} color={colors.primary} style={styles.cardRowIcon} />
|
|
86
|
-
<Text style={styles.cardRowText}>
|
|
88
|
+
<Text style={styles.cardRowText}>{t('payment.details.acceptedCards')}</Text>
|
|
87
89
|
</View>
|
|
88
90
|
<TextField
|
|
89
91
|
value={cardDetails.number}
|
|
@@ -131,7 +133,7 @@ const PaymentDetailsStep: React.FC<PaymentDetailsStepProps> = ({
|
|
|
131
133
|
</View>
|
|
132
134
|
|
|
133
135
|
<View style={{ height: 18 }} />
|
|
134
|
-
<Text style={styles.cardPaymentWaiting}>
|
|
136
|
+
<Text style={styles.cardPaymentWaiting}>{t('payment.details.readyToProcess')}</Text>
|
|
135
137
|
</View>
|
|
136
138
|
</View>
|
|
137
139
|
)}
|
|
@@ -140,13 +142,13 @@ const PaymentDetailsStep: React.FC<PaymentDetailsStepProps> = ({
|
|
|
140
142
|
<View style={styles.oxyPayCard}>
|
|
141
143
|
<View style={styles.oxyPayContent}>
|
|
142
144
|
<Ionicons name="wallet-outline" size={64} color={colors.primary} style={styles.oxyPayIcon} />
|
|
143
|
-
<Text style={styles.oxyPayMainTitle}>
|
|
144
|
-
<Text style={styles.oxyPaySubtitle}>
|
|
145
|
+
<Text style={styles.oxyPayMainTitle}>{t('payment.details.oxyPay')}</Text>
|
|
146
|
+
<Text style={styles.oxyPaySubtitle}>{t('payment.details.payWithWallet')}</Text>
|
|
145
147
|
<View style={styles.oxyPayBalanceBox}>
|
|
146
|
-
<Text style={styles.oxyPayBalanceText}>
|
|
148
|
+
<Text style={styles.oxyPayBalanceText}>{t('payment.details.balance', { balance: '⊜ 123.45' })}</Text>
|
|
147
149
|
</View>
|
|
148
150
|
<View style={{ height: 18 }} />
|
|
149
|
-
<Text style={styles.oxyPayWaiting}>
|
|
151
|
+
<Text style={styles.oxyPayWaiting}>{t('payment.details.readyToProcess')}</Text>
|
|
150
152
|
</View>
|
|
151
153
|
</View>
|
|
152
154
|
)}
|
|
@@ -156,10 +158,10 @@ const PaymentDetailsStep: React.FC<PaymentDetailsStepProps> = ({
|
|
|
156
158
|
<View style={styles.faircoinContent}>
|
|
157
159
|
<FAIRWalletIcon size={64} style={styles.faircoinIcon} />
|
|
158
160
|
<Text style={styles.faircoinMainTitle}>FAIRWallet</Text>
|
|
159
|
-
<Text style={styles.faircoinSubtitle}>
|
|
161
|
+
<Text style={styles.faircoinSubtitle}>{t('payment.details.payWithFairCoin')}</Text>
|
|
160
162
|
{!isMobile && QRCodeComponent ? (
|
|
161
163
|
<>
|
|
162
|
-
<Text style={styles.faircoinScanText}>
|
|
164
|
+
<Text style={styles.faircoinScanText}>{t('payment.details.scanToPay')}</Text>
|
|
163
165
|
<View style={styles.faircoinQRCard}>
|
|
164
166
|
<QRCodeComponent value={faircoinAddress} size={qrSize - 32} />
|
|
165
167
|
<View style={styles.faircoinQRBadge}>
|
|
@@ -169,30 +171,30 @@ const PaymentDetailsStep: React.FC<PaymentDetailsStepProps> = ({
|
|
|
169
171
|
</>
|
|
170
172
|
) : (
|
|
171
173
|
<>
|
|
172
|
-
<Text style={styles.faircoinTitle}>
|
|
174
|
+
<Text style={styles.faircoinTitle}>{t('payment.details.fairWalletInstructions')}</Text>
|
|
173
175
|
<Text style={styles.faircoinAddress}>{faircoinAddress}</Text>
|
|
174
176
|
<TouchableOpacity
|
|
175
177
|
style={[styles.faircoinButton, { backgroundColor: '#9ffb50', borderRadius: 18, marginTop: 12, width: '90%', flexDirection: 'row', alignItems: 'center', justifyContent: 'center' }]}
|
|
176
178
|
onPress={handleOpenFairWallet}
|
|
177
179
|
accessibilityRole="button"
|
|
178
|
-
accessibilityLabel=
|
|
180
|
+
accessibilityLabel={t('payment.details.openInFairWallet')}
|
|
179
181
|
>
|
|
180
182
|
<FAIRWalletIcon size={20} style={{ marginRight: 8 }} />
|
|
181
|
-
<Text style={[styles.faircoinButtonText, { color: '#1b1f0a', fontWeight: 'bold', fontSize: 16 }]}>
|
|
183
|
+
<Text style={[styles.faircoinButtonText, { color: '#1b1f0a', fontWeight: 'bold', fontSize: 16 }]}>{t('payment.details.openInFairWallet')}</Text>
|
|
182
184
|
</TouchableOpacity>
|
|
183
185
|
<TouchableOpacity
|
|
184
186
|
style={[styles.faircoinButton, { backgroundColor: '#9ffb50', borderRadius: 18, marginTop: 10, width: '90%', flexDirection: 'row', alignItems: 'center', justifyContent: 'center' }]}
|
|
185
187
|
onPress={handleCopyAddress}
|
|
186
188
|
accessibilityRole="button"
|
|
187
|
-
accessibilityLabel=
|
|
189
|
+
accessibilityLabel={t('payment.details.copyAddress')}
|
|
188
190
|
>
|
|
189
191
|
<FAIRWalletIcon size={20} style={{ marginRight: 8 }} />
|
|
190
|
-
<Text style={[styles.faircoinButtonText, { color: '#1b1f0a', fontWeight: 'bold', fontSize: 16 }]}>
|
|
192
|
+
<Text style={[styles.faircoinButtonText, { color: '#1b1f0a', fontWeight: 'bold', fontSize: 16 }]}>{t('payment.details.copyAddress')}</Text>
|
|
191
193
|
</TouchableOpacity>
|
|
192
194
|
</>
|
|
193
195
|
)}
|
|
194
196
|
<View style={{ height: 18 }} />
|
|
195
|
-
<Text style={styles.faircoinWaiting}>
|
|
197
|
+
<Text style={styles.faircoinWaiting}>{t('payment.details.waitingForPayment')}</Text>
|
|
196
198
|
</View>
|
|
197
199
|
</View>
|
|
198
200
|
)}
|
|
@@ -201,13 +203,13 @@ const PaymentDetailsStep: React.FC<PaymentDetailsStepProps> = ({
|
|
|
201
203
|
<GroupedPillButtons
|
|
202
204
|
buttons={[
|
|
203
205
|
{
|
|
204
|
-
text: '
|
|
206
|
+
text: t('payment.actions.back'),
|
|
205
207
|
onPress: onBack,
|
|
206
208
|
icon: 'arrow-back',
|
|
207
209
|
variant: 'transparent',
|
|
208
210
|
},
|
|
209
211
|
{
|
|
210
|
-
text: '
|
|
212
|
+
text: t('payment.actions.continue'),
|
|
211
213
|
onPress: onNext,
|
|
212
214
|
icon: 'arrow-forward',
|
|
213
215
|
variant: 'primary',
|
|
@@ -6,6 +6,7 @@ import GroupedPillButtons from '../internal/GroupedPillButtons';
|
|
|
6
6
|
import { FAIRWalletIcon } from '../icon';
|
|
7
7
|
import { createPaymentStyles } from './paymentStyles';
|
|
8
8
|
import type { PaymentMethod, PaymentColors, PaymentStepAnimations } from './types';
|
|
9
|
+
import { useI18n } from '../../hooks/useI18n';
|
|
9
10
|
|
|
10
11
|
interface PaymentMethodStepProps {
|
|
11
12
|
availablePaymentMethods: PaymentMethod[];
|
|
@@ -27,6 +28,7 @@ const PaymentMethodStep: React.FC<PaymentMethodStepProps> = ({
|
|
|
27
28
|
onNext,
|
|
28
29
|
}) => {
|
|
29
30
|
const styles = useMemo(() => createPaymentStyles(colors), [colors]);
|
|
31
|
+
const { t } = useI18n();
|
|
30
32
|
const { fadeAnim, slideAnim, scaleAnim } = animations;
|
|
31
33
|
|
|
32
34
|
return (
|
|
@@ -45,7 +47,7 @@ const PaymentMethodStep: React.FC<PaymentMethodStepProps> = ({
|
|
|
45
47
|
accessibilityLabel="Choose payment method step"
|
|
46
48
|
>
|
|
47
49
|
<View style={styles.section}>
|
|
48
|
-
<Text style={styles.sectionTitle}>
|
|
50
|
+
<Text style={styles.sectionTitle}>{t('payment.method.title')}</Text>
|
|
49
51
|
|
|
50
52
|
<GroupedSection
|
|
51
53
|
items={availablePaymentMethods.map(method => ({
|
|
@@ -54,8 +56,8 @@ const PaymentMethodStep: React.FC<PaymentMethodStepProps> = ({
|
|
|
54
56
|
iconColor: method.key === 'card' ? '#007AFF' :
|
|
55
57
|
method.key === 'oxy' ? '#32D74B' :
|
|
56
58
|
method.key === 'faircoin' ? '#9ffb50' : colors.primary,
|
|
57
|
-
title: method.label,
|
|
58
|
-
subtitle: method.description,
|
|
59
|
+
title: t(`payment.methods.${method.key}.label`),
|
|
60
|
+
subtitle: t(`payment.methods.${method.key}.description`),
|
|
59
61
|
onPress: () => onSelectMethod(method.key),
|
|
60
62
|
selected: selectedMethod === method.key,
|
|
61
63
|
showChevron: false,
|
|
@@ -69,13 +71,13 @@ const PaymentMethodStep: React.FC<PaymentMethodStepProps> = ({
|
|
|
69
71
|
<GroupedPillButtons
|
|
70
72
|
buttons={[
|
|
71
73
|
{
|
|
72
|
-
text: '
|
|
74
|
+
text: t('payment.actions.back'),
|
|
73
75
|
onPress: onBack,
|
|
74
76
|
icon: 'arrow-back',
|
|
75
77
|
variant: 'transparent',
|
|
76
78
|
},
|
|
77
79
|
{
|
|
78
|
-
text: '
|
|
80
|
+
text: t('payment.actions.continue'),
|
|
79
81
|
onPress: onNext,
|
|
80
82
|
icon: 'arrow-forward',
|
|
81
83
|
variant: 'primary',
|
|
@@ -6,6 +6,7 @@ import GroupedPillButtons from '../internal/GroupedPillButtons';
|
|
|
6
6
|
import { createPaymentStyles } from './paymentStyles';
|
|
7
7
|
import { PAYMENT_METHODS, getCurrencySymbol } from './constants';
|
|
8
8
|
import type { CardDetails, PaymentColors, PaymentStepAnimations } from './types';
|
|
9
|
+
import { useI18n } from '../../hooks/useI18n';
|
|
9
10
|
|
|
10
11
|
interface PaymentReviewStepProps {
|
|
11
12
|
amount: string | number;
|
|
@@ -31,6 +32,7 @@ const PaymentReviewStep: React.FC<PaymentReviewStepProps> = ({
|
|
|
31
32
|
onPay,
|
|
32
33
|
}) => {
|
|
33
34
|
const styles = useMemo(() => createPaymentStyles(colors), [colors]);
|
|
35
|
+
const { t } = useI18n();
|
|
34
36
|
const currencySymbol = getCurrencySymbol(currency);
|
|
35
37
|
const { fadeAnim, slideAnim, scaleAnim } = animations;
|
|
36
38
|
|
|
@@ -52,7 +54,7 @@ const PaymentReviewStep: React.FC<PaymentReviewStepProps> = ({
|
|
|
52
54
|
accessibilityLabel="Review payment step"
|
|
53
55
|
>
|
|
54
56
|
<View style={styles.section}>
|
|
55
|
-
<Text style={styles.sectionTitle}>
|
|
57
|
+
<Text style={styles.sectionTitle}>{t('payment.review.title')}</Text>
|
|
56
58
|
|
|
57
59
|
<GroupedSection
|
|
58
60
|
items={[
|
|
@@ -60,43 +62,43 @@ const PaymentReviewStep: React.FC<PaymentReviewStepProps> = ({
|
|
|
60
62
|
id: 'secure-payment',
|
|
61
63
|
icon: 'shield-check',
|
|
62
64
|
iconColor: colors.success || '#4BB543',
|
|
63
|
-
title: '
|
|
64
|
-
subtitle: '
|
|
65
|
+
title: t('payment.review.securePayment'),
|
|
66
|
+
subtitle: t('payment.review.securePaymentDesc'),
|
|
65
67
|
},
|
|
66
68
|
{
|
|
67
69
|
id: 'amount',
|
|
68
70
|
icon: 'cash',
|
|
69
71
|
iconColor: colors.primary,
|
|
70
|
-
title: '
|
|
72
|
+
title: t('payment.review.amount'),
|
|
71
73
|
subtitle: `${currencySymbol} ${amount}`,
|
|
72
74
|
},
|
|
73
75
|
{
|
|
74
76
|
id: 'payment-method',
|
|
75
77
|
icon: selectedMethod?.icon as any,
|
|
76
78
|
iconColor: colors.primary,
|
|
77
|
-
title: '
|
|
78
|
-
subtitle: selectedMethod
|
|
79
|
+
title: t('payment.review.paymentMethod'),
|
|
80
|
+
subtitle: selectedMethod ? t(`payment.methods.${selectedMethod.key}.label`) : undefined,
|
|
79
81
|
},
|
|
80
82
|
...(paymentMethod === 'card' ? [{
|
|
81
83
|
id: 'card-details',
|
|
82
84
|
icon: 'card' as const,
|
|
83
85
|
iconColor: colors.primary,
|
|
84
|
-
title: '
|
|
86
|
+
title: t('payment.review.card'),
|
|
85
87
|
subtitle: cardDetails.number.replace(/.(?=.{4})/g, '*'),
|
|
86
88
|
}] : []),
|
|
87
89
|
...(paymentMethod === 'oxy' ? [{
|
|
88
90
|
id: 'oxy-balance',
|
|
89
91
|
icon: 'wallet' as const,
|
|
90
92
|
iconColor: colors.primary,
|
|
91
|
-
title: '
|
|
92
|
-
subtitle: '
|
|
93
|
+
title: t('payment.review.oxyPayAccount'),
|
|
94
|
+
subtitle: t('payment.details.balance', { balance: '⊜ 123.45' }),
|
|
93
95
|
}] : []),
|
|
94
96
|
...(paymentMethod === 'faircoin' ? [{
|
|
95
97
|
id: 'faircoin-wallet',
|
|
96
98
|
icon: 'qr-code' as const,
|
|
97
99
|
iconColor: colors.primary,
|
|
98
|
-
title: '
|
|
99
|
-
subtitle: '
|
|
100
|
+
title: t('payment.review.faircoinWallet'),
|
|
101
|
+
subtitle: t('payment.review.paidViaQR'),
|
|
100
102
|
}] : []),
|
|
101
103
|
]}
|
|
102
104
|
/>
|
|
@@ -105,13 +107,13 @@ const PaymentReviewStep: React.FC<PaymentReviewStepProps> = ({
|
|
|
105
107
|
<GroupedPillButtons
|
|
106
108
|
buttons={[
|
|
107
109
|
{
|
|
108
|
-
text: '
|
|
110
|
+
text: t('payment.actions.back'),
|
|
109
111
|
onPress: onBack,
|
|
110
112
|
icon: 'arrow-back',
|
|
111
113
|
variant: 'transparent',
|
|
112
114
|
},
|
|
113
115
|
{
|
|
114
|
-
text: isPaying ? '
|
|
116
|
+
text: isPaying ? t('payment.review.processing') : t('payment.review.payNow'),
|
|
115
117
|
onPress: onPay,
|
|
116
118
|
icon: 'checkmark',
|
|
117
119
|
variant: 'primary',
|
|
@@ -5,6 +5,7 @@ import { Ionicons } from '@expo/vector-icons';
|
|
|
5
5
|
import GroupedPillButtons from '../internal/GroupedPillButtons';
|
|
6
6
|
import { createPaymentStyles } from './paymentStyles';
|
|
7
7
|
import type { PaymentColors, PaymentStepAnimations } from './types';
|
|
8
|
+
import { useI18n } from '../../hooks/useI18n';
|
|
8
9
|
|
|
9
10
|
interface PaymentSuccessStepProps {
|
|
10
11
|
colors: PaymentColors;
|
|
@@ -18,6 +19,7 @@ const PaymentSuccessStep: React.FC<PaymentSuccessStepProps> = ({
|
|
|
18
19
|
onDone,
|
|
19
20
|
}) => {
|
|
20
21
|
const styles = useMemo(() => createPaymentStyles(colors), [colors]);
|
|
22
|
+
const { t } = useI18n();
|
|
21
23
|
const { fadeAnim, slideAnim, scaleAnim } = animations;
|
|
22
24
|
|
|
23
25
|
return (
|
|
@@ -36,7 +38,7 @@ const PaymentSuccessStep: React.FC<PaymentSuccessStepProps> = ({
|
|
|
36
38
|
accessibilityLabel="Payment complete"
|
|
37
39
|
>
|
|
38
40
|
<View style={styles.section}>
|
|
39
|
-
<Text style={styles.sectionTitle}>
|
|
41
|
+
<Text style={styles.sectionTitle}>{t('payment.success.title')}</Text>
|
|
40
42
|
|
|
41
43
|
<View style={styles.successCard}>
|
|
42
44
|
<View style={styles.successContent}>
|
|
@@ -46,10 +48,10 @@ const PaymentSuccessStep: React.FC<PaymentSuccessStepProps> = ({
|
|
|
46
48
|
color={colors.success || '#4BB543'}
|
|
47
49
|
style={styles.successIcon}
|
|
48
50
|
/>
|
|
49
|
-
<Text style={styles.successMainTitle}>
|
|
50
|
-
<Text style={styles.successSubtitle}>
|
|
51
|
+
<Text style={styles.successMainTitle}>{t('payment.success.heading')}</Text>
|
|
52
|
+
<Text style={styles.successSubtitle}>{t('payment.success.thanks')}</Text>
|
|
51
53
|
<View style={{ height: 18 }} />
|
|
52
|
-
<Text style={styles.successMessage}>
|
|
54
|
+
<Text style={styles.successMessage}>{t('payment.success.processed')}</Text>
|
|
53
55
|
</View>
|
|
54
56
|
</View>
|
|
55
57
|
</View>
|
|
@@ -57,7 +59,7 @@ const PaymentSuccessStep: React.FC<PaymentSuccessStepProps> = ({
|
|
|
57
59
|
<GroupedPillButtons
|
|
58
60
|
buttons={[
|
|
59
61
|
{
|
|
60
|
-
text: '
|
|
62
|
+
text: t('payment.actions.done'),
|
|
61
63
|
onPress: onDone,
|
|
62
64
|
icon: 'checkmark',
|
|
63
65
|
variant: 'primary',
|