react-native-fpay 0.3.5 → 0.3.7

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.
Files changed (155) hide show
  1. package/lib/module/FountainPayProvider.js +108 -18
  2. package/lib/module/FountainPayProvider.js.map +1 -1
  3. package/lib/module/core/api/client.js +13 -1
  4. package/lib/module/core/api/client.js.map +1 -1
  5. package/lib/module/core/api/index.js +66 -24
  6. package/lib/module/core/api/index.js.map +1 -1
  7. package/lib/module/engine/BLEReceiverService.js.map +1 -1
  8. package/lib/module/engine/BLESenderService.js.map +1 -1
  9. package/lib/module/engine/FPEngine.js +164 -43
  10. package/lib/module/engine/FPEngine.js.map +1 -1
  11. package/lib/module/engine/NearbyUsersService.js +1 -1
  12. package/lib/module/engine/NearbyUsersService.js.map +1 -1
  13. package/lib/module/index.js +1 -0
  14. package/lib/module/index.js.map +1 -1
  15. package/lib/module/store/FPStore.js +155 -0
  16. package/lib/module/store/FPStore.js.map +1 -0
  17. package/lib/module/ui/components/AnimatedDots.js +3 -3
  18. package/lib/module/ui/components/AnimatedDots.js.map +1 -1
  19. package/lib/module/ui/components/ConfirmScreen.js +137 -123
  20. package/lib/module/ui/components/ConfirmScreen.js.map +1 -1
  21. package/lib/module/ui/components/FPButton.js.map +1 -1
  22. package/lib/module/ui/components/LoadingAnimation/InLoading.js +3 -3
  23. package/lib/module/ui/components/LoadingAnimation/InLoading.js.map +1 -1
  24. package/lib/module/ui/components/LoadingAnimation/index.js +3 -3
  25. package/lib/module/ui/components/LoadingAnimation/index.js.map +1 -1
  26. package/lib/module/ui/components/OtpInput/OTPInputView.js +11 -11
  27. package/lib/module/ui/components/OtpInput/OTPInputView.js.map +1 -1
  28. package/lib/module/ui/components/OtpInput/Styles.js +1 -1
  29. package/lib/module/ui/components/OtpInput/helpers/codeToArray.js +1 -1
  30. package/lib/module/ui/components/OtpInput/helpers/device.js.map +1 -1
  31. package/lib/module/ui/components/OtpInput/helpers/styles.js.map +1 -1
  32. package/lib/module/ui/components/OtpInput/index.js +3 -1
  33. package/lib/module/ui/components/OtpInput/index.js.map +1 -1
  34. package/lib/module/ui/components/PulseAnimation.js +2 -2
  35. package/lib/module/ui/components/PulseAnimation.js.map +1 -1
  36. package/lib/module/ui/modals/FPPaymentRequestModal.js +8 -7
  37. package/lib/module/ui/modals/FPPaymentRequestModal.js.map +1 -1
  38. package/lib/module/ui/modals/FPShell.js +2 -0
  39. package/lib/module/ui/modals/FPShell.js.map +1 -1
  40. package/lib/module/ui/screens/ReceiveScreen.js +8 -9
  41. package/lib/module/ui/screens/ReceiveScreen.js.map +1 -1
  42. package/lib/module/ui/screens/SendScreen.js +43 -94
  43. package/lib/module/ui/screens/SendScreen.js.map +1 -1
  44. package/lib/module/ui/screens/styles.js +15 -3
  45. package/lib/module/ui/screens/styles.js.map +1 -1
  46. package/lib/module/ui/screens/sub/receivePayment/Nfc/index.js +4 -4
  47. package/lib/module/ui/screens/sub/receivePayment/Nfc/index.js.map +1 -1
  48. package/lib/module/ui/screens/sub/receivePayment/Qr/index.js +5 -5
  49. package/lib/module/ui/screens/sub/receivePayment/Qr/index.js.map +1 -1
  50. package/lib/module/ui/screens/sub/receivePayment/Transfer/index.js +10 -11
  51. package/lib/module/ui/screens/sub/receivePayment/Transfer/index.js.map +1 -1
  52. package/lib/module/ui/screens/sub/sendPayment/BluetoothSubScreen.js +31 -8
  53. package/lib/module/ui/screens/sub/sendPayment/BluetoothSubScreen.js.map +1 -1
  54. package/lib/module/ui/screens/sub/sendPayment/NFCSubScreen.js +12 -8
  55. package/lib/module/ui/screens/sub/sendPayment/NFCSubScreen.js.map +1 -1
  56. package/lib/module/ui/screens/sub/sendPayment/NQRSubScreen.js +17 -5
  57. package/lib/module/ui/screens/sub/sendPayment/NQRSubScreen.js.map +1 -1
  58. package/lib/module/ui/screens/sub/sendPayment/ProximitySubScreen.js +67 -35
  59. package/lib/module/ui/screens/sub/sendPayment/ProximitySubScreen.js.map +1 -1
  60. package/lib/module/ui/screens/sub/sendPayment/TransferSubScreen.js +110 -34
  61. package/lib/module/ui/screens/sub/sendPayment/TransferSubScreen.js.map +1 -1
  62. package/lib/module/ui/theme/index.js.map +1 -1
  63. package/lib/typescript/src/FountainPayProvider.d.ts +1 -1
  64. package/lib/typescript/src/FountainPayProvider.d.ts.map +1 -1
  65. package/lib/typescript/src/core/api/client.d.ts.map +1 -1
  66. package/lib/typescript/src/core/api/index.d.ts +42 -26
  67. package/lib/typescript/src/core/api/index.d.ts.map +1 -1
  68. package/lib/typescript/src/core/types/index.d.ts +53 -28
  69. package/lib/typescript/src/core/types/index.d.ts.map +1 -1
  70. package/lib/typescript/src/engine/BLEReceiverService.d.ts +2 -0
  71. package/lib/typescript/src/engine/BLEReceiverService.d.ts.map +1 -1
  72. package/lib/typescript/src/engine/BLESenderService.d.ts.map +1 -1
  73. package/lib/typescript/src/engine/FPEngine.d.ts +5 -3
  74. package/lib/typescript/src/engine/FPEngine.d.ts.map +1 -1
  75. package/lib/typescript/src/engine/useIsForeground.d.ts.map +1 -1
  76. package/lib/typescript/src/index.d.ts +2 -1
  77. package/lib/typescript/src/index.d.ts.map +1 -1
  78. package/lib/typescript/src/store/FPStore.d.ts +60 -0
  79. package/lib/typescript/src/store/FPStore.d.ts.map +1 -0
  80. package/lib/typescript/src/ui/components/AnimatedDots.d.ts.map +1 -1
  81. package/lib/typescript/src/ui/components/ConfirmScreen.d.ts +5 -5
  82. package/lib/typescript/src/ui/components/ConfirmScreen.d.ts.map +1 -1
  83. package/lib/typescript/src/ui/components/FPButton.d.ts +1 -1
  84. package/lib/typescript/src/ui/components/FPButton.d.ts.map +1 -1
  85. package/lib/typescript/src/ui/components/LoadingAnimation/InLoading.d.ts.map +1 -1
  86. package/lib/typescript/src/ui/components/LoadingAnimation/index.d.ts.map +1 -1
  87. package/lib/typescript/src/ui/components/OtpInput/OTPInputView.d.ts.map +1 -1
  88. package/lib/typescript/src/ui/components/OtpInput/helpers/codeToArray.d.ts.map +1 -1
  89. package/lib/typescript/src/ui/components/OtpInput/helpers/device.d.ts.map +1 -1
  90. package/lib/typescript/src/ui/components/OtpInput/helpers/styles.d.ts.map +1 -1
  91. package/lib/typescript/src/ui/components/OtpInput/helpers/types.d.ts +1 -2
  92. package/lib/typescript/src/ui/components/OtpInput/helpers/types.d.ts.map +1 -1
  93. package/lib/typescript/src/ui/components/OtpInput/index.d.ts +3 -1
  94. package/lib/typescript/src/ui/components/OtpInput/index.d.ts.map +1 -1
  95. package/lib/typescript/src/ui/components/PulseAnimation.d.ts.map +1 -1
  96. package/lib/typescript/src/ui/modals/FPPaymentRequestModal.d.ts.map +1 -1
  97. package/lib/typescript/src/ui/modals/FPShell.d.ts.map +1 -1
  98. package/lib/typescript/src/ui/screens/ReceiveScreen.d.ts +1 -1
  99. package/lib/typescript/src/ui/screens/ReceiveScreen.d.ts.map +1 -1
  100. package/lib/typescript/src/ui/screens/SendScreen.d.ts +1 -1
  101. package/lib/typescript/src/ui/screens/SendScreen.d.ts.map +1 -1
  102. package/lib/typescript/src/ui/screens/styles.d.ts +197 -0
  103. package/lib/typescript/src/ui/screens/styles.d.ts.map +1 -1
  104. package/lib/typescript/src/ui/screens/sub/receivePayment/Nfc/index.d.ts.map +1 -1
  105. package/lib/typescript/src/ui/screens/sub/receivePayment/Qr/index.d.ts.map +1 -1
  106. package/lib/typescript/src/ui/screens/sub/receivePayment/Transfer/index.d.ts.map +1 -1
  107. package/lib/typescript/src/ui/screens/sub/sendPayment/BluetoothSubScreen.d.ts.map +1 -1
  108. package/lib/typescript/src/ui/screens/sub/sendPayment/NFCSubScreen.d.ts +1 -1
  109. package/lib/typescript/src/ui/screens/sub/sendPayment/NFCSubScreen.d.ts.map +1 -1
  110. package/lib/typescript/src/ui/screens/sub/sendPayment/NQRSubScreen.d.ts +1 -1
  111. package/lib/typescript/src/ui/screens/sub/sendPayment/NQRSubScreen.d.ts.map +1 -1
  112. package/lib/typescript/src/ui/screens/sub/sendPayment/ProximitySubScreen.d.ts +1 -1
  113. package/lib/typescript/src/ui/screens/sub/sendPayment/ProximitySubScreen.d.ts.map +1 -1
  114. package/lib/typescript/src/ui/screens/sub/sendPayment/TransferSubScreen.d.ts +1 -1
  115. package/lib/typescript/src/ui/screens/sub/sendPayment/TransferSubScreen.d.ts.map +1 -1
  116. package/lib/typescript/src/ui/theme/index.d.ts.map +1 -1
  117. package/package.json +4 -4
  118. package/src/FountainPayProvider.tsx +163 -24
  119. package/src/core/api/client.ts +26 -4
  120. package/src/core/api/index.ts +170 -49
  121. package/src/core/types/index.ts +81 -48
  122. package/src/engine/BLEReceiverService.ts +86 -28
  123. package/src/engine/BLESenderService.ts +133 -69
  124. package/src/engine/FPEngine.ts +316 -97
  125. package/src/engine/NearbyUsersService.ts +6 -6
  126. package/src/engine/useIsForeground.ts +12 -12
  127. package/src/index.ts +10 -4
  128. package/src/store/FPStore.ts +216 -0
  129. package/src/ui/components/AnimatedDots.tsx +4 -5
  130. package/src/ui/components/ConfirmScreen.tsx +182 -169
  131. package/src/ui/components/FPButton.tsx +50 -9
  132. package/src/ui/components/LoadingAnimation/InLoading.tsx +23 -27
  133. package/src/ui/components/LoadingAnimation/index.tsx +3 -7
  134. package/src/ui/components/OtpInput/OTPInputView.tsx +254 -205
  135. package/src/ui/components/OtpInput/Styles.ts +1 -1
  136. package/src/ui/components/OtpInput/helpers/codeToArray.ts +2 -2
  137. package/src/ui/components/OtpInput/helpers/device.ts +4 -3
  138. package/src/ui/components/OtpInput/helpers/styles.ts +13 -14
  139. package/src/ui/components/OtpInput/helpers/types.ts +83 -79
  140. package/src/ui/components/OtpInput/index.tsx +18 -15
  141. package/src/ui/components/PulseAnimation.tsx +3 -5
  142. package/src/ui/modals/FPPaymentRequestModal.tsx +111 -28
  143. package/src/ui/modals/FPShell.tsx +60 -34
  144. package/src/ui/screens/ReceiveScreen.tsx +245 -84
  145. package/src/ui/screens/SendScreen.tsx +419 -167
  146. package/src/ui/screens/styles.ts +17 -5
  147. package/src/ui/screens/sub/receivePayment/Nfc/index.tsx +17 -25
  148. package/src/ui/screens/sub/receivePayment/Qr/index.tsx +21 -20
  149. package/src/ui/screens/sub/receivePayment/Transfer/index.tsx +34 -28
  150. package/src/ui/screens/sub/sendPayment/BluetoothSubScreen.tsx +135 -67
  151. package/src/ui/screens/sub/sendPayment/NFCSubScreen.tsx +188 -112
  152. package/src/ui/screens/sub/sendPayment/NQRSubScreen.tsx +102 -69
  153. package/src/ui/screens/sub/sendPayment/ProximitySubScreen.tsx +225 -99
  154. package/src/ui/screens/sub/sendPayment/TransferSubScreen.tsx +209 -89
  155. package/src/ui/theme/index.ts +14 -2
@@ -4,7 +4,15 @@
4
4
  // relevant sub-screen in the same modal sheet
5
5
  // ─────────────────────────────────────────────
6
6
  import React, { useState } from 'react';
7
- import { View, Text, TouchableOpacity, StyleSheet, ScrollView, Dimensions, TextInput } from 'react-native';
7
+ import {
8
+ View,
9
+ Text,
10
+ TouchableOpacity,
11
+ StyleSheet,
12
+ ScrollView,
13
+ Dimensions,
14
+ TextInput,
15
+ } from 'react-native';
8
16
  import { C, R, S, F, shadow } from '../theme';
9
17
  import { FPButton } from '../components/FPButton';
10
18
  import { TransferSubScreen } from './sub/sendPayment/TransferSubScreen';
@@ -12,21 +20,39 @@ import { NQRSubScreen } from './sub/sendPayment/NQRSubScreen';
12
20
  import { ProximitySubScreen } from './sub/sendPayment/ProximitySubScreen';
13
21
  import { BluetoothSubScreen } from './sub/sendPayment/BluetoothSubScreen';
14
22
  import { NFCSubScreen } from './sub/sendPayment/NFCSubScreen';
15
- import type { FPCurrency, FPCallbacks, FPTransaction, FPError, FPSendPaymentRequest, FPUserInfo, FPTransferRecipient } from '../../core/types';
23
+ import type {
24
+ FPCurrency,
25
+ FPCallbacks,
26
+ FPTransaction,
27
+ FPError,
28
+ FPSendPaymentRequest,
29
+ FPUserInfo,
30
+ FPTransferRecipient,
31
+ FPSendWalletPaymentRequest,
32
+ FPTransactionResponse,
33
+ } from '../../core/types';
16
34
  import styled from 'styled-components/native';
17
35
  import Ionicons from 'react-native-vector-icons/Ionicons';
18
36
  import Svg, { Path } from 'react-native-svg';
19
37
  import { nfcAPI, nqrAPI, transferAPI } from '../../core/api';
20
- import { ButtonContainer, ContentContainer, CTAButton, CTAText, InputBox, InputContainer, StyledTextInput } from './styles';
38
+ import {
39
+ ButtonContainer,
40
+ ContentContainer,
41
+ CTAButton,
42
+ CTAText,
43
+ InputBox,
44
+ InputContainer,
45
+ StyledTextInput,
46
+ } from './styles';
21
47
  import OTPInputs from '../components/OtpInput';
22
48
  import ConfirmScreen from '../components/ConfirmScreen';
23
49
  import LoadingAnimation from '../components/LoadingAnimation';
50
+ import { getFPStore } from '../../store/FPStore';
24
51
 
25
52
  const { width, height } = Dimensions.get('window');
26
53
 
27
54
  type Channel = 'TRANSFER' | 'QRCODE' | 'NFC' | 'BTH' | 'PXTR';
28
55
 
29
-
30
56
  interface Props extends FPCallbacks {
31
57
  user: FPUserInfo | null;
32
58
  account: FPTransferRecipient | null;
@@ -35,13 +61,11 @@ interface Props extends FPCallbacks {
35
61
  onClose: () => void;
36
62
  }
37
63
 
38
-
39
64
  const Container = styled(View)`
40
65
  flex: 1;
41
66
  background-color: #000000;
42
67
  `;
43
68
 
44
-
45
69
  // Bottom Sheet Styles
46
70
  const BottomSheet = styled(View)`
47
71
  position: absolute;
@@ -73,6 +97,19 @@ const SheetScrollView = styled(ScrollView)`
73
97
  flex: 1;
74
98
  `;
75
99
 
100
+ const SheetHeader = styled(View)`
101
+ flex-direction: row;
102
+ justify-content: space-between;
103
+ align-items: center;
104
+ margin-bottom: 16px;
105
+ `;
106
+
107
+ const CloseBtn = styled(TouchableOpacity)`
108
+ padding: 8px;
109
+ border-radius: 50px;
110
+ background-color: #f3f4f6;
111
+ `;
112
+
76
113
  const SectionTitle = styled(Text)`
77
114
  font-size: 18px;
78
115
  font-weight: 700;
@@ -96,7 +133,7 @@ const ActionIconContainer = styled(View)<{ color: string }>`
96
133
  width: 56px;
97
134
  height: 56px;
98
135
  border-radius: 100%;
99
- background-color: ${props => props.color};
136
+ background-color: ${(props) => props.color};
100
137
  justify-content: center;
101
138
  align-items: center;
102
139
  elevation: 3;
@@ -106,8 +143,6 @@ const ActionIconContainer = styled(View)<{ color: string }>`
106
143
  shadow-radius: 4px;
107
144
  `;
108
145
 
109
-
110
-
111
146
  const ActionLabel = styled(Text)`
112
147
  font-size: 11px;
113
148
  color: #374151;
@@ -139,12 +174,11 @@ const AddContactButton = styled.TouchableOpacity`
139
174
 
140
175
  flex-direction: row;
141
176
  gap: 20px;
142
-
143
177
  `;
144
178
 
145
179
  const Icon = styled(Text)<{ size?: number; color?: string }>`
146
- font-size: ${props => props.size || 24}px;
147
- color: ${props => props.color || '#000000'};
180
+ font-size: ${(props) => props.size || 24}px;
181
+ color: ${(props) => props.color || '#000000'};
148
182
  `;
149
183
 
150
184
  const AddCircle = styled.View`
@@ -164,7 +198,7 @@ const PrxyIconContainer = styled(View)<{ color: string }>`
164
198
  width: 44px;
165
199
  height: 44px;
166
200
  border-radius: 100%;
167
- background-color: ${props => props.color};
201
+ background-color: ${(props) => props.color};
168
202
  justify-content: center;
169
203
  align-items: center;
170
204
  elevation: 3;
@@ -179,147 +213,399 @@ const ContactName = styled.Text`
179
213
  color: #000;
180
214
  `;
181
215
 
182
- const ScanIcon = ({ color = "#111", size = 22 }) => (
183
- <Svg width={size} height={size} strokeWidth="0.9" viewBox="0 0 24 24" fill="none" color={color}>
184
- <Path d="M6 3H3V6" stroke="#000000" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
185
- <Path d="M2 12H12L22 12" stroke="#000000" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
186
- <Path d="M9 19V17V15" stroke="#000000" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
187
- <Path d="M12 16V15.5V15" stroke="#000000" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
188
- <Path d="M15 17V16V15" stroke="#000000" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
189
- <Path d="M12 21V19.5V18" stroke="#000000" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
190
- <Path d="M18 3H21V6" stroke="#000000" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
191
- <Path d="M6 21H3V18" stroke="#000000" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
192
- <Path d="M18 21H21V18" stroke="#000000" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
193
- </Svg>
216
+ const ScanIcon = ({ color = '#111', size = 22 }) => (
217
+ <Svg
218
+ width={size}
219
+ height={size}
220
+ strokeWidth="0.9"
221
+ viewBox="0 0 24 24"
222
+ fill="none"
223
+ color={color}
224
+ >
225
+ <Path
226
+ d="M6 3H3V6"
227
+ stroke="#000000"
228
+ strokeWidth="0.9"
229
+ strokeLinecap="round"
230
+ strokeLinejoin="round"
231
+ />
232
+ <Path
233
+ d="M2 12H12L22 12"
234
+ stroke="#000000"
235
+ strokeWidth="0.9"
236
+ strokeLinecap="round"
237
+ strokeLinejoin="round"
238
+ />
239
+ <Path
240
+ d="M9 19V17V15"
241
+ stroke="#000000"
242
+ strokeWidth="0.9"
243
+ strokeLinecap="round"
244
+ strokeLinejoin="round"
245
+ />
246
+ <Path
247
+ d="M12 16V15.5V15"
248
+ stroke="#000000"
249
+ strokeWidth="0.9"
250
+ strokeLinecap="round"
251
+ strokeLinejoin="round"
252
+ />
253
+ <Path
254
+ d="M15 17V16V15"
255
+ stroke="#000000"
256
+ strokeWidth="0.9"
257
+ strokeLinecap="round"
258
+ strokeLinejoin="round"
259
+ />
260
+ <Path
261
+ d="M12 21V19.5V18"
262
+ stroke="#000000"
263
+ strokeWidth="0.9"
264
+ strokeLinecap="round"
265
+ strokeLinejoin="round"
266
+ />
267
+ <Path
268
+ d="M18 3H21V6"
269
+ stroke="#000000"
270
+ strokeWidth="0.9"
271
+ strokeLinecap="round"
272
+ strokeLinejoin="round"
273
+ />
274
+ <Path
275
+ d="M6 21H3V18"
276
+ stroke="#000000"
277
+ strokeWidth="0.9"
278
+ strokeLinecap="round"
279
+ strokeLinejoin="round"
280
+ />
281
+ <Path
282
+ d="M18 21H21V18"
283
+ stroke="#000000"
284
+ strokeWidth="0.9"
285
+ strokeLinecap="round"
286
+ strokeLinejoin="round"
287
+ />
288
+ </Svg>
194
289
  );
195
290
 
196
- const BluetoothIcon =({ color = "#111", size = 22 })=>(
197
- <Svg width={size} height={size} strokeWidth="0.9" viewBox="0 0 24 24" fill="none" color={color}>
198
- <Path d="M6 19.0007C3.57111 17.1763 2 14.2716 2 11C2 5.47715 6.47715 1 12 1C17.5228 1 22 5.47715 22 11C22 14.2716 20.4289 17.1763 18 19.0007" stroke="#fff" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
199
- <Path d="M6 19.0007C3.57111 17.1763 2 14.2716 2 11C2 5.47715 6.47715 1 12 1C17.5228 1 22 5.47715 22 11C22 14.2716 20.4289 17.1763 18 19.0007" stroke="#fff" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
200
- <Path d="M7.52779 15C6.57771 13.9385 6 12.5367 6 11C6 7.68629 8.68629 5 12 5C15.3137 5 18 7.68629 18 11C18 12.5367 17.4223 13.9385 16.4722 15" stroke="#fff" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
201
- <Path fillRule="evenodd" clipRule="evenodd" d="M9.25 11C9.25 9.48122 10.4812 8.25 12 8.25C13.5188 8.25 14.75 9.48122 14.75 11C14.75 12.5188 13.5188 13.75 12 13.75C10.4812 13.75 9.25 12.5188 9.25 11Z" fill="#fff" />
202
- <Path d="M15.0776 21.4865C14.8566 22.8126 13.7093 23.7844 12.365 23.7844H11.7536C10.4093 23.7844 9.262 22.8126 9.041 21.4865L8.53213 18.4333C8.29232 16.9946 9.43086 15.8854 10.5339 15.15C11.9123 14.231 12.3864 14.3406 13.5847 15.1396C14.6421 15.8445 15.8263 16.9946 15.5865 18.4333L15.0776 21.4865Z" fill="#fff" />
203
- </Svg>
204
- )
205
-
206
- const NFCIcon =({ color = "#111", size = 22 })=>(
207
- <Svg width={size} height={size} strokeWidth="0.9" viewBox="0 0 24 24" fill="none" color={color}>
208
- <Path d="M12 19.51L12.01 19.4989" stroke="#fff" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
209
- <Path d="M2 8C8 3.5 16 3.5 22 8" stroke="#fff" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
210
- <Path d="M5 12C9 9 15 9 19 12" stroke="#fff" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
211
- <Path d="M8.5 15.5C10.7504 14.1 13.2498 14.0996 15.5001 15.5" stroke="#fff" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
212
- </Svg>
213
- )
214
-
215
- const QRIcon =({ color = "#111", size = 22 })=>(
216
- <Svg width={size} height={size} strokeWidth="0.9" viewBox="0 0 24 24" fill="none" color={color}>
217
- <Path fillRule="evenodd" clipRule="evenodd" d="M2.25 3C2.25 2.58579 2.58579 2.25 3 2.25H6C6.41421 2.25 6.75 2.58579 6.75 3C6.75 3.41421 6.41421 3.75 6 3.75H3.75V6C3.75 6.41421 3.41421 6.75 3 6.75C2.58579 6.75 2.25 6.41421 2.25 6V3Z" fill="#fff" />
218
- <Path fillRule="evenodd" clipRule="evenodd" d="M17.25 3C17.25 2.58579 17.5858 2.25 18 2.25H21C21.4142 2.25 21.75 2.58579 21.75 3V6C21.75 6.41421 21.4142 6.75 21 6.75C20.5858 6.75 20.25 6.41421 20.25 6V3.75H18C17.5858 3.75 17.25 3.41421 17.25 3Z" fill="#fff" />
219
- <Path fillRule="evenodd" clipRule="evenodd" d="M3 17.25C3.41421 17.25 3.75 17.5858 3.75 18V20.25H6C6.41421 20.25 6.75 20.5858 6.75 21C6.75 21.4142 6.41421 21.75 6 21.75H3C2.58579 21.75 2.25 21.4142 2.25 21V18C2.25 17.5858 2.58579 17.25 3 17.25Z" fill="#fff" />
220
- <Path fillRule="evenodd" clipRule="evenodd" d="M21 17.25C21.4142 17.25 21.75 17.5858 21.75 18V21C21.75 21.4142 21.4142 21.75 21 21.75H18C17.5858 21.75 17.25 21.4142 17.25 21C17.25 20.5858 17.5858 20.25 18 20.25H20.25V18C20.25 17.5858 20.5858 17.25 21 17.25Z" fill="#fff" />
221
- <Path fillRule="evenodd" clipRule="evenodd" d="M12.9004 6.6654C12.3462 6.33289 11.6538 6.33289 11.0996 6.6654L7.09963 9.0654C6.57252 9.38167 6.25 9.95131 6.25 10.566V14.4336C6.25 15.0483 6.57252 15.618 7.09963 15.9342L11.0996 18.3342C11.6538 18.6668 12.3462 18.6668 12.9004 18.3342L16.9004 15.9342C17.4275 15.618 17.75 15.0483 17.75 14.4336V10.566C17.75 9.95131 17.4275 9.38167 16.9004 9.0654L12.9004 6.6654ZM9.3642 10.6785C9.00209 10.4773 8.5455 10.6078 8.34437 10.9699C8.14324 11.332 8.27373 11.7886 8.63583 11.9898L11.25 13.4418V16.0001C11.25 16.4144 11.5858 16.7501 12 16.7501C12.4142 16.7501 12.75 16.4144 12.75 16.0001V13.4456C12.9152 13.3554 13.1243 13.241 13.3607 13.1115C13.9447 12.7916 14.6961 12.3787 15.3642 12.0077C15.7263 11.8066 15.8568 11.35 15.6557 10.9879C15.4546 10.6257 14.998 10.4952 14.6359 10.6964C13.9716 11.0653 13.223 11.4766 12.6401 11.796C12.3908 11.9325 12.172 12.0521 12.0032 12.1443L9.3642 10.6785Z" fill="#fff" />
222
- </Svg>
291
+ const BluetoothIcon = ({ color = '#111', size = 22 }) => (
292
+ <Svg
293
+ width={size}
294
+ height={size}
295
+ strokeWidth="0.9"
296
+ viewBox="0 0 24 24"
297
+ fill="none"
298
+ color={color}
299
+ >
300
+ <Path
301
+ d="M6 19.0007C3.57111 17.1763 2 14.2716 2 11C2 5.47715 6.47715 1 12 1C17.5228 1 22 5.47715 22 11C22 14.2716 20.4289 17.1763 18 19.0007"
302
+ stroke="#fff"
303
+ strokeWidth="0.9"
304
+ strokeLinecap="round"
305
+ strokeLinejoin="round"
306
+ />
307
+ <Path
308
+ d="M6 19.0007C3.57111 17.1763 2 14.2716 2 11C2 5.47715 6.47715 1 12 1C17.5228 1 22 5.47715 22 11C22 14.2716 20.4289 17.1763 18 19.0007"
309
+ stroke="#fff"
310
+ strokeWidth="0.9"
311
+ strokeLinecap="round"
312
+ strokeLinejoin="round"
313
+ />
314
+ <Path
315
+ d="M7.52779 15C6.57771 13.9385 6 12.5367 6 11C6 7.68629 8.68629 5 12 5C15.3137 5 18 7.68629 18 11C18 12.5367 17.4223 13.9385 16.4722 15"
316
+ stroke="#fff"
317
+ strokeWidth="0.9"
318
+ strokeLinecap="round"
319
+ strokeLinejoin="round"
320
+ />
321
+ <Path
322
+ fillRule="evenodd"
323
+ clipRule="evenodd"
324
+ d="M9.25 11C9.25 9.48122 10.4812 8.25 12 8.25C13.5188 8.25 14.75 9.48122 14.75 11C14.75 12.5188 13.5188 13.75 12 13.75C10.4812 13.75 9.25 12.5188 9.25 11Z"
325
+ fill="#fff"
326
+ />
327
+ <Path
328
+ d="M15.0776 21.4865C14.8566 22.8126 13.7093 23.7844 12.365 23.7844H11.7536C10.4093 23.7844 9.262 22.8126 9.041 21.4865L8.53213 18.4333C8.29232 16.9946 9.43086 15.8854 10.5339 15.15C11.9123 14.231 12.3864 14.3406 13.5847 15.1396C14.6421 15.8445 15.8263 16.9946 15.5865 18.4333L15.0776 21.4865Z"
329
+ fill="#fff"
330
+ />
331
+ </Svg>
223
332
  );
224
333
 
225
- const ProximityIcon =({ color = "#111", size = 22 })=>(
226
- <Svg width={size} height={size} strokeWidth="0.9" viewBox="0 0 24 24" fill="none" color={color}>
227
- <Path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke={color} strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round"/>
228
- <Path d="M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z" fill={color} stroke={color} strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round"/>
229
- <Path d="M19 19L17.5 17.5" stroke={color} strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round"/>
230
- <Path d="M15.5 15.5L14.5 14.5" stroke={color} strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round"/>
231
- </Svg>
232
- )
334
+ const NFCIcon = ({ color = '#111', size = 22 }) => (
335
+ <Svg
336
+ width={size}
337
+ height={size}
338
+ strokeWidth="0.9"
339
+ viewBox="0 0 24 24"
340
+ fill="none"
341
+ color={color}
342
+ >
343
+ <Path
344
+ d="M12 19.51L12.01 19.4989"
345
+ stroke="#fff"
346
+ strokeWidth="0.9"
347
+ strokeLinecap="round"
348
+ strokeLinejoin="round"
349
+ />
350
+ <Path
351
+ d="M2 8C8 3.5 16 3.5 22 8"
352
+ stroke="#fff"
353
+ strokeWidth="0.9"
354
+ strokeLinecap="round"
355
+ strokeLinejoin="round"
356
+ />
357
+ <Path
358
+ d="M5 12C9 9 15 9 19 12"
359
+ stroke="#fff"
360
+ strokeWidth="0.9"
361
+ strokeLinecap="round"
362
+ strokeLinejoin="round"
363
+ />
364
+ <Path
365
+ d="M8.5 15.5C10.7504 14.1 13.2498 14.0996 15.5001 15.5"
366
+ stroke="#fff"
367
+ strokeWidth="0.9"
368
+ strokeLinecap="round"
369
+ strokeLinejoin="round"
370
+ />
371
+ </Svg>
372
+ );
233
373
 
374
+ const QRIcon = ({ color = '#111', size = 22 }) => (
375
+ <Svg
376
+ width={size}
377
+ height={size}
378
+ strokeWidth="0.9"
379
+ viewBox="0 0 24 24"
380
+ fill="none"
381
+ color={color}
382
+ >
383
+ <Path
384
+ fillRule="evenodd"
385
+ clipRule="evenodd"
386
+ d="M2.25 3C2.25 2.58579 2.58579 2.25 3 2.25H6C6.41421 2.25 6.75 2.58579 6.75 3C6.75 3.41421 6.41421 3.75 6 3.75H3.75V6C3.75 6.41421 3.41421 6.75 3 6.75C2.58579 6.75 2.25 6.41421 2.25 6V3Z"
387
+ fill="#fff"
388
+ />
389
+ <Path
390
+ fillRule="evenodd"
391
+ clipRule="evenodd"
392
+ d="M17.25 3C17.25 2.58579 17.5858 2.25 18 2.25H21C21.4142 2.25 21.75 2.58579 21.75 3V6C21.75 6.41421 21.4142 6.75 21 6.75C20.5858 6.75 20.25 6.41421 20.25 6V3.75H18C17.5858 3.75 17.25 3.41421 17.25 3Z"
393
+ fill="#fff"
394
+ />
395
+ <Path
396
+ fillRule="evenodd"
397
+ clipRule="evenodd"
398
+ d="M3 17.25C3.41421 17.25 3.75 17.5858 3.75 18V20.25H6C6.41421 20.25 6.75 20.5858 6.75 21C6.75 21.4142 6.41421 21.75 6 21.75H3C2.58579 21.75 2.25 21.4142 2.25 21V18C2.25 17.5858 2.58579 17.25 3 17.25Z"
399
+ fill="#fff"
400
+ />
401
+ <Path
402
+ fillRule="evenodd"
403
+ clipRule="evenodd"
404
+ d="M21 17.25C21.4142 17.25 21.75 17.5858 21.75 18V21C21.75 21.4142 21.4142 21.75 21 21.75H18C17.5858 21.75 17.25 21.4142 17.25 21C17.25 20.5858 17.5858 20.25 18 20.25H20.25V18C20.25 17.5858 20.5858 17.25 21 17.25Z"
405
+ fill="#fff"
406
+ />
407
+ <Path
408
+ fillRule="evenodd"
409
+ clipRule="evenodd"
410
+ d="M12.9004 6.6654C12.3462 6.33289 11.6538 6.33289 11.0996 6.6654L7.09963 9.0654C6.57252 9.38167 6.25 9.95131 6.25 10.566V14.4336C6.25 15.0483 6.57252 15.618 7.09963 15.9342L11.0996 18.3342C11.6538 18.6668 12.3462 18.6668 12.9004 18.3342L16.9004 15.9342C17.4275 15.618 17.75 15.0483 17.75 14.4336V10.566C17.75 9.95131 17.4275 9.38167 16.9004 9.0654L12.9004 6.6654ZM9.3642 10.6785C9.00209 10.4773 8.5455 10.6078 8.34437 10.9699C8.14324 11.332 8.27373 11.7886 8.63583 11.9898L11.25 13.4418V16.0001C11.25 16.4144 11.5858 16.7501 12 16.7501C12.4142 16.7501 12.75 16.4144 12.75 16.0001V13.4456C12.9152 13.3554 13.1243 13.241 13.3607 13.1115C13.9447 12.7916 14.6961 12.3787 15.3642 12.0077C15.7263 11.8066 15.8568 11.35 15.6557 10.9879C15.4546 10.6257 14.998 10.4952 14.6359 10.6964C13.9716 11.0653 13.223 11.4766 12.6401 11.796C12.3908 11.9325 12.172 12.0521 12.0032 12.1443L9.3642 10.6785Z"
411
+ fill="#fff"
412
+ />
413
+ </Svg>
414
+ );
234
415
 
416
+ const ProximityIcon = ({ color = '#111', size = 22 }) => (
417
+ <Svg
418
+ width={size}
419
+ height={size}
420
+ strokeWidth="0.9"
421
+ viewBox="0 0 24 24"
422
+ fill="none"
423
+ color={color}
424
+ >
425
+ <Path
426
+ d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"
427
+ stroke={color}
428
+ strokeWidth="0.9"
429
+ strokeLinecap="round"
430
+ strokeLinejoin="round"
431
+ />
432
+ <Path
433
+ d="M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z"
434
+ fill={color}
435
+ stroke={color}
436
+ strokeWidth="0.9"
437
+ strokeLinecap="round"
438
+ strokeLinejoin="round"
439
+ />
440
+ <Path
441
+ d="M19 19L17.5 17.5"
442
+ stroke={color}
443
+ strokeWidth="0.9"
444
+ strokeLinecap="round"
445
+ strokeLinejoin="round"
446
+ />
447
+ <Path
448
+ d="M15.5 15.5L14.5 14.5"
449
+ stroke={color}
450
+ strokeWidth="0.9"
451
+ strokeLinecap="round"
452
+ strokeLinejoin="round"
453
+ />
454
+ </Svg>
455
+ );
235
456
 
236
- const SendScreen = ({ user, account, amount, currency, onClose, onPaymentSent, onError }: Props) => {
457
+ const SendScreen = ({
458
+ user,
459
+ account,
460
+ amount,
461
+ currency,
462
+ onClose,
463
+ onPaymentSent,
464
+ onError,
465
+ }: Props) => {
237
466
  const [channel, setChannel] = useState<Channel>('TRANSFER');
238
467
  const [transactionAmount, setTransactionAmount] = useState<string>('');
239
468
  const [loading, setLoading] = useState<boolean>(false);
240
469
  const [showAmountModal, setShowAmountModal] = useState<boolean>(false);
241
- const [showConfirmationModal, setShowConfirmationModal] = useState<boolean>(false);
242
-
470
+ const [showConfirmationModal, setShowConfirmationModal] =
471
+ useState<boolean>(false);
243
472
 
244
- const [transactionPayload, setTransactionPayload] = useState<FPSendPaymentRequest>({} as FPSendPaymentRequest);
473
+ const [transactionPayload, setTransactionPayload] = useState<
474
+ FPSendPaymentRequest | FPSendWalletPaymentRequest
475
+ >({} as FPSendPaymentRequest | FPSendWalletPaymentRequest);
245
476
 
246
- const formatted = `${currency} ${(amount).toLocaleString('en-NG', { minimumFractionDigits: 2 })}`;
477
+ const formatted = `${currency} ${amount.toLocaleString('en-NG', { minimumFractionDigits: 2 })}`;
247
478
 
248
479
  // { id: result.reference, reference: result.reference, type: 'debit', channel: 'transfer', amount: result.amount, currency: result.currency, status: result.status, recipient: { accountName: result.recipient.accountName }, createdAt: result.createdAt }
249
-
250
- const handleContinue = (tx: FPSendPaymentRequest) => {
251
-
252
- setTransactionPayload({...tx, sender: user ?? undefined});
253
- if(tx.amount === 0){
254
- setShowAmountModal(true);
255
- }else{
256
- setShowConfirmationModal(true);
257
- }
258
- }
259
480
 
260
- const handleAmountContinue =()=>{
261
- const updatedPayload: any = {...transactionPayload, amount: parseFloat(transactionAmount)}
262
- setTransactionPayload(updatedPayload as FPSendPaymentRequest);
481
+ const handleContinue = (
482
+ tx: FPSendPaymentRequest | FPSendWalletPaymentRequest | null
483
+ ) => {
484
+ console.log('Transaction Payload: ', tx);
485
+ setTransactionPayload(
486
+ tx as FPSendPaymentRequest | FPSendWalletPaymentRequest
487
+ );
263
488
  setShowConfirmationModal(true);
264
- }
265
-
266
- const validateOtp = async(otp: string)=>{
489
+ };
267
490
 
268
- }
269
-
270
- const handleProcessingTransaction = async () => {
491
+ const handleProcessingTransaction = async (temptId: string) => {
492
+ console.log('Got in here for processing');
271
493
  try {
272
494
  setLoading(true);
273
- let response: FPTransaction | null= null;
274
- switch(transactionPayload?.channel){
495
+ setShowConfirmationModal(false);
496
+ let response: FPTransactionResponse | null = null;
497
+ switch (transactionPayload?.channel) {
275
498
  case 'transfer':
276
499
  case 'bluetooth':
277
500
  case 'proximity':
278
- response = await transferAPI.send({...transactionPayload, sender: user ?? undefined, narration: `Send ${formatted} to ${transactionPayload.recipient.accountName}`})
279
- break;
501
+ if ('isBank' in transactionPayload && transactionPayload.isBank) {
502
+ response = await transferAPI.sendToBank(
503
+ transactionPayload as FPSendPaymentRequest,
504
+ temptId
505
+ );
506
+ } else {
507
+ response = await transferAPI.sendToWallet(
508
+ transactionPayload as FPSendWalletPaymentRequest,
509
+ temptId
510
+ );
511
+ }
512
+ break;
280
513
  case 'nqr':
281
- response = await nqrAPI.pay({...transactionPayload, sender: user ?? undefined, narration: `Send ${formatted} to ${transactionPayload.recipient.accountName}`})
282
- break;
514
+ response = await nqrAPI.pay(
515
+ {
516
+ ...transactionPayload,
517
+ sender: user ?? undefined,
518
+ narration: `Send ${formatted} to ${transactionPayload.recipient.accountName}`,
519
+ },
520
+ temptId
521
+ );
522
+ break;
283
523
  case 'nfc':
284
- response = await nfcAPI.pay({...transactionPayload, sender: user ?? undefined, narration: `Send ${formatted} to ${transactionPayload.recipient.accountName}`})
285
- break;
524
+ response = await nfcAPI.pay(
525
+ {
526
+ ...transactionPayload,
527
+ sender: user ?? undefined,
528
+ narration: `Send ${formatted} to ${transactionPayload.recipient.accountName}`,
529
+ },
530
+ temptId
531
+ );
532
+ break;
286
533
  default:
287
- onError?.({message: 'Invalid channel'} as FPError);
288
- break;
534
+ onError?.({ message: 'Invalid channel' } as FPError);
535
+ break;
289
536
  }
290
537
 
291
- if(response?.status !== 'successful'){
292
- onError?.({message: 'Transaction failed'} as FPError);
538
+ if (response?.status) {
539
+ onError?.({
540
+ message: response?.message || 'Transaction failed',
541
+ } as FPError);
293
542
  return;
294
543
  }
295
544
 
296
- onPaymentSent?.(response);
545
+ onPaymentSent?.(response?.payload as FPTransaction);
297
546
  } catch (error) {
298
547
  onError?.(error as FPError);
299
- }finally{
548
+ } finally {
300
549
  setLoading(false);
301
550
  }
302
- }
303
-
304
-
551
+ };
305
552
 
306
553
  return (
307
554
  <Container>
308
- {loading && (
309
- <LoadingAnimation />
555
+ {loading && <LoadingAnimation />}
556
+ {channel === 'TRANSFER' && (
557
+ <TransferSubScreen
558
+ amount={amount}
559
+ currency={currency}
560
+ onClose={onClose}
561
+ onProcessTransaction={handleContinue}
562
+ onError={onError}
563
+ />
310
564
  )}
311
- {channel === 'TRANSFER' && (<TransferSubScreen amount={amount} currency={currency} onClose={onClose} onProcessTransaction={handleContinue} onError={onError} />)}
312
- {channel === 'QRCODE' && (<NQRSubScreen amount={amount} currency={currency} onClose={onClose} onProcessTransaction={handleContinue} onError={onError} />)}
313
- {channel === 'NFC' && (<NFCSubScreen amount={amount} currency={currency} onClose={onClose} onProcessTransaction={handleContinue} onError={onError} />)}
314
- {channel === 'BTH' && (<BluetoothSubScreen amount={amount} currency={currency} onClose={onClose} onProcessTransaction={handleContinue} onError={onError} />)}
315
- {channel === 'PXTR' && (<ProximitySubScreen amount={amount} currency={currency} onClose={onClose} onProcessTransaction={handleContinue} onError={onError} />)}
316
-
565
+ {channel === 'QRCODE' && (
566
+ <NQRSubScreen
567
+ amount={amount}
568
+ currency={currency}
569
+ onClose={onClose}
570
+ onProcessTransaction={handleContinue}
571
+ onError={onError}
572
+ />
573
+ )}
574
+ {channel === 'NFC' && (
575
+ <NFCSubScreen
576
+ amount={amount}
577
+ currency={currency}
578
+ onClose={onClose}
579
+ onProcessTransaction={handleContinue}
580
+ onError={onError}
581
+ />
582
+ )}
583
+ {channel === 'BTH' && (
584
+ <BluetoothSubScreen
585
+ amount={amount}
586
+ currency={currency}
587
+ onClose={onClose}
588
+ onProcessTransaction={handleContinue}
589
+ onError={onError}
590
+ />
591
+ )}
592
+ {channel === 'PXTR' && (
593
+ <ProximitySubScreen
594
+ psspId={getFPStore().psspId || ''}
595
+ amount={amount}
596
+ currency={currency}
597
+ onClose={onClose}
598
+ onProcessTransaction={handleContinue}
599
+ onError={onError}
600
+ />
601
+ )}
602
+
317
603
  <BottomSheet>
318
604
  <SheetHandle />
319
-
605
+
320
606
  <SheetScrollView showsVerticalScrollIndicator={false}>
321
607
  <SectionTitle>Pay and send</SectionTitle>
322
-
608
+
323
609
  <ActionsRow>
324
610
  <ActionButton onPress={() => setChannel('TRANSFER')}>
325
611
  <ActionIconContainer color="#0a3d2e">
@@ -327,21 +613,21 @@ const SendScreen = ({ user, account, amount, currency, onClose, onPaymentSent, o
327
613
  </ActionIconContainer>
328
614
  <ActionLabel>To bank{'\n'}account</ActionLabel>
329
615
  </ActionButton>
330
-
616
+
331
617
  <ActionButton onPress={() => setChannel('QRCODE')}>
332
618
  <ActionIconContainer color="#0a3d2e">
333
619
  <QRIcon color="#FFF" size={22} />
334
620
  </ActionIconContainer>
335
621
  <ActionLabel>Scan{'\n'}QR</ActionLabel>
336
622
  </ActionButton>
337
-
623
+
338
624
  <ActionButton onPress={() => setChannel('PXTR')}>
339
625
  <ActionIconContainer color="#0a3d2e">
340
626
  <ProximityIcon size={44} color="#FFF" />
341
627
  </ActionIconContainer>
342
628
  <ActionLabel>Use{'\n'}Proximity</ActionLabel>
343
629
  </ActionButton>
344
-
630
+
345
631
  <ActionButton onPress={() => setChannel('BTH')}>
346
632
  <ActionIconContainer color="#0a3d2e">
347
633
  <BluetoothIcon size={26} color="#ffffff" />
@@ -349,73 +635,39 @@ const SendScreen = ({ user, account, amount, currency, onClose, onPaymentSent, o
349
635
  <ActionLabel>Use{'\n'}Bluetooth</ActionLabel>
350
636
  </ActionButton>
351
637
  </ActionsRow>
352
-
353
- <AddContactButton onPress={()=>setChannel('NFC')}>
638
+
639
+ {/* <AddContactButton onPress={()=>setChannel('NFC')}>
354
640
  <PrxyIconContainer color="#0a3d2e">
355
641
  <NFCIcon size={26} color="#ffffff" />
356
642
  </PrxyIconContainer>
357
643
  <ContactName>Use NFC payment</ContactName>
358
- </AddContactButton>
644
+ </AddContactButton> */}
359
645
  </SheetScrollView>
360
646
  </BottomSheet>
361
647
 
362
- {showAmountModal && (
363
- <BottomSheet>
364
- <SheetHandle />
365
-
366
- <SheetScrollView showsVerticalScrollIndicator={false}>
367
- <SectionTitle>Enter amount</SectionTitle>
368
-
369
- <ActionsRow>
370
- <InputContainer>
371
- <InputBox>
372
- <StyledTextInput
373
- placeholder="Enter account number"
374
- placeholderTextColor="#d1d5db"
375
- value={transactionAmount}
376
- keyboardType="number-pad"
377
- returnKeyType='done'
378
- maxLength={10}
379
- onChangeText={(text) => {
380
- const numericText = text.replace(/[^0-9]/g, '');
381
- setTransactionAmount(numericText);
382
- }}
383
- />
384
-
385
- </InputBox>
386
- </InputContainer>
387
-
388
- <ContentContainer>
389
- <ButtonContainer>
390
- <CTAButton activeOpacity={0.8} disabled={!transactionAmount} onPress={handleAmountContinue}>
391
- <CTAText>Continue</CTAText>
392
- </CTAButton>
393
- </ButtonContainer>
394
- </ContentContainer>
395
- </ActionsRow>
396
-
397
- <AddContactButton onPress={()=>setChannel('NFC')}>
398
- <PrxyIconContainer color="#0a3d2e">
399
- <NFCIcon size={26} color="#ffffff" />
400
- </PrxyIconContainer>
401
- <ContactName>Use NFC payment</ContactName>
402
- </AddContactButton>
403
- </SheetScrollView>
404
- </BottomSheet>
405
- )}
406
648
  {showConfirmationModal && (
407
649
  <BottomSheet>
408
650
  <SheetHandle />
409
-
651
+
410
652
  <SheetScrollView showsVerticalScrollIndicator={false}>
411
- <SectionTitle>Summary</SectionTitle>
412
-
413
- <ConfirmScreen transaction={transactionPayload} onRecheck={()=>setShowConfirmationModal(false)} onContinue={handleProcessingTransaction} />
653
+ <SheetHeader>
654
+ <SectionTitle>Summary</SectionTitle>
655
+
656
+ <CloseBtn onPress={() => setShowConfirmationModal(false)}>
657
+ <Ionicons name="close" size={24} />
658
+ </CloseBtn>
659
+ </SheetHeader>
660
+
661
+ <ConfirmScreen
662
+ userId={getFPStore().psspId || ''}
663
+ transaction={transactionPayload}
664
+ onContinue={handleProcessingTransaction}
665
+ />
414
666
  </SheetScrollView>
415
667
  </BottomSheet>
416
668
  )}
417
669
  </Container>
418
670
  );
419
- }
671
+ };
420
672
 
421
- export default SendScreen;
673
+ export default SendScreen;