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
@@ -9,12 +9,11 @@ import {
9
9
  } from 'react-native';
10
10
  import styled from 'styled-components/native';
11
11
  import Ionicons from 'react-native-vector-icons/Ionicons';
12
- import Svg, { Path } from "react-native-svg";
12
+ import Svg, { Path } from 'react-native-svg';
13
13
  import Transfer from './sub/receivePayment/Transfer';
14
14
  import Qr from './sub/receivePayment/Qr';
15
15
  import Nfc from './sub/receivePayment/Nfc';
16
16
 
17
-
18
17
  const { width, height } = Dimensions.get('window');
19
18
 
20
19
  // Styled Components
@@ -23,7 +22,6 @@ const Container = styled(View)`
23
22
  background-color: #000000;
24
23
  `;
25
24
 
26
-
27
25
  // Bottom Sheet Styles
28
26
  const BottomSheet = styled(View)`
29
27
  position: absolute;
@@ -78,7 +76,7 @@ const ActionIconContainer = styled(View)<{ color: string }>`
78
76
  width: 56px;
79
77
  height: 56px;
80
78
  border-radius: 100%;
81
- background-color: ${props => props.color};
79
+ background-color: ${(props) => props.color};
82
80
  justify-content: center;
83
81
  align-items: center;
84
82
  elevation: 3;
@@ -119,12 +117,11 @@ const AddContactButton = styled.TouchableOpacity`
119
117
 
120
118
  flex-direction: row;
121
119
  gap: 20px;
122
-
123
120
  `;
124
121
 
125
122
  const Icon = styled(Text)<{ size?: number; color?: string }>`
126
- font-size: ${props => props.size || 24}px;
127
- color: ${props => props.color || '#000000'};
123
+ font-size: ${(props) => props.size || 24}px;
124
+ color: ${(props) => props.color || '#000000'};
128
125
  `;
129
126
 
130
127
  const AddCircle = styled.View`
@@ -140,96 +137,263 @@ const AddCircle = styled.View`
140
137
  margin-bottom: 8px;
141
138
  `;
142
139
 
143
-
144
140
  const ContactName = styled.Text`
145
141
  font-size: 12px;
146
142
  color: #000;
147
143
  `;
148
144
 
149
- const ScanIcon = ({ color = "#111", size = 22 }) => (
150
- <Svg width={size} height={size} strokeWidth="0.9" viewBox="0 0 24 24" fill="none" color={color}>
151
- <Path d="M6 3H3V6" stroke="#000000" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
152
- <Path d="M2 12H12L22 12" stroke="#000000" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
153
- <Path d="M9 19V17V15" stroke="#000000" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
154
- <Path d="M12 16V15.5V15" stroke="#000000" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
155
- <Path d="M15 17V16V15" stroke="#000000" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
156
- <Path d="M12 21V19.5V18" stroke="#000000" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
157
- <Path d="M18 3H21V6" stroke="#000000" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
158
- <Path d="M6 21H3V18" stroke="#000000" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
159
- <Path d="M18 21H21V18" stroke="#000000" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
160
- </Svg>
145
+ const ScanIcon = ({ color = '#111', size = 22 }) => (
146
+ <Svg
147
+ width={size}
148
+ height={size}
149
+ strokeWidth="0.9"
150
+ viewBox="0 0 24 24"
151
+ fill="none"
152
+ color={color}
153
+ >
154
+ <Path
155
+ d="M6 3H3V6"
156
+ stroke="#000000"
157
+ strokeWidth="0.9"
158
+ strokeLinecap="round"
159
+ strokeLinejoin="round"
160
+ />
161
+ <Path
162
+ d="M2 12H12L22 12"
163
+ stroke="#000000"
164
+ strokeWidth="0.9"
165
+ strokeLinecap="round"
166
+ strokeLinejoin="round"
167
+ />
168
+ <Path
169
+ d="M9 19V17V15"
170
+ stroke="#000000"
171
+ strokeWidth="0.9"
172
+ strokeLinecap="round"
173
+ strokeLinejoin="round"
174
+ />
175
+ <Path
176
+ d="M12 16V15.5V15"
177
+ stroke="#000000"
178
+ strokeWidth="0.9"
179
+ strokeLinecap="round"
180
+ strokeLinejoin="round"
181
+ />
182
+ <Path
183
+ d="M15 17V16V15"
184
+ stroke="#000000"
185
+ strokeWidth="0.9"
186
+ strokeLinecap="round"
187
+ strokeLinejoin="round"
188
+ />
189
+ <Path
190
+ d="M12 21V19.5V18"
191
+ stroke="#000000"
192
+ strokeWidth="0.9"
193
+ strokeLinecap="round"
194
+ strokeLinejoin="round"
195
+ />
196
+ <Path
197
+ d="M18 3H21V6"
198
+ stroke="#000000"
199
+ strokeWidth="0.9"
200
+ strokeLinecap="round"
201
+ strokeLinejoin="round"
202
+ />
203
+ <Path
204
+ d="M6 21H3V18"
205
+ stroke="#000000"
206
+ strokeWidth="0.9"
207
+ strokeLinecap="round"
208
+ strokeLinejoin="round"
209
+ />
210
+ <Path
211
+ d="M18 21H21V18"
212
+ stroke="#000000"
213
+ strokeWidth="0.9"
214
+ strokeLinecap="round"
215
+ strokeLinejoin="round"
216
+ />
217
+ </Svg>
218
+ );
219
+
220
+ const BluetoothIcon = ({ color = '#111', size = 22 }) => (
221
+ <Svg
222
+ width={size}
223
+ height={size}
224
+ strokeWidth="0.9"
225
+ viewBox="0 0 24 24"
226
+ fill="none"
227
+ color={color}
228
+ >
229
+ <Path
230
+ 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"
231
+ stroke="#fff"
232
+ strokeWidth="0.9"
233
+ strokeLinecap="round"
234
+ strokeLinejoin="round"
235
+ />
236
+ <Path
237
+ 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"
238
+ stroke="#fff"
239
+ strokeWidth="0.9"
240
+ strokeLinecap="round"
241
+ strokeLinejoin="round"
242
+ />
243
+ <Path
244
+ 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"
245
+ stroke="#fff"
246
+ strokeWidth="0.9"
247
+ strokeLinecap="round"
248
+ strokeLinejoin="round"
249
+ />
250
+ <Path
251
+ fillRule="evenodd"
252
+ clipRule="evenodd"
253
+ 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"
254
+ fill="#fff"
255
+ />
256
+ <Path
257
+ 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"
258
+ fill="#fff"
259
+ />
260
+ </Svg>
261
+ );
262
+
263
+ const NFCIcon = ({ color = '#111', size = 22 }) => (
264
+ <Svg
265
+ width={size}
266
+ height={size}
267
+ strokeWidth="0.9"
268
+ viewBox="0 0 24 24"
269
+ fill="none"
270
+ color={color}
271
+ >
272
+ <Path
273
+ d="M12 19.51L12.01 19.4989"
274
+ stroke="#fff"
275
+ strokeWidth="0.9"
276
+ strokeLinecap="round"
277
+ strokeLinejoin="round"
278
+ />
279
+ <Path
280
+ d="M2 8C8 3.5 16 3.5 22 8"
281
+ stroke="#fff"
282
+ strokeWidth="0.9"
283
+ strokeLinecap="round"
284
+ strokeLinejoin="round"
285
+ />
286
+ <Path
287
+ d="M5 12C9 9 15 9 19 12"
288
+ stroke="#fff"
289
+ strokeWidth="0.9"
290
+ strokeLinecap="round"
291
+ strokeLinejoin="round"
292
+ />
293
+ <Path
294
+ d="M8.5 15.5C10.7504 14.1 13.2498 14.0996 15.5001 15.5"
295
+ stroke="#fff"
296
+ strokeWidth="0.9"
297
+ strokeLinecap="round"
298
+ strokeLinejoin="round"
299
+ />
300
+ </Svg>
161
301
  );
162
302
 
163
- const BluetoothIcon =({ color = "#111", size = 22 })=>(
164
- <Svg width={size} height={size} strokeWidth="0.9" viewBox="0 0 24 24" fill="none" color={color}>
165
- <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" />
166
- <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" />
167
- <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" />
168
- <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" />
169
- <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" />
170
- </Svg>
171
- )
172
-
173
- const NFCIcon =({ color = "#111", size = 22 })=>(
174
- <Svg width={size} height={size} strokeWidth="0.9" viewBox="0 0 24 24" fill="none" color={color}>
175
- <Path d="M12 19.51L12.01 19.4989" stroke="#fff" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
176
- <Path d="M2 8C8 3.5 16 3.5 22 8" stroke="#fff" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
177
- <Path d="M5 12C9 9 15 9 19 12" stroke="#fff" strokeWidth="0.9" strokeLinecap="round" strokeLinejoin="round" />
178
- <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" />
179
- </Svg>
180
- )
181
-
182
- const QRIcon =({ color = "#111", size = 22 })=>(
183
- <Svg width={size} height={size} strokeWidth="0.9" viewBox="0 0 24 24" fill="none" color={color}>
184
- <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" />
185
- <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" />
186
- <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" />
187
- <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" />
188
- <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" />
189
- </Svg>
303
+ const QRIcon = ({ color = '#111', size = 22 }) => (
304
+ <Svg
305
+ width={size}
306
+ height={size}
307
+ strokeWidth="0.9"
308
+ viewBox="0 0 24 24"
309
+ fill="none"
310
+ color={color}
311
+ >
312
+ <Path
313
+ fillRule="evenodd"
314
+ clipRule="evenodd"
315
+ 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"
316
+ fill="#fff"
317
+ />
318
+ <Path
319
+ fillRule="evenodd"
320
+ clipRule="evenodd"
321
+ 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"
322
+ fill="#fff"
323
+ />
324
+ <Path
325
+ fillRule="evenodd"
326
+ clipRule="evenodd"
327
+ 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"
328
+ fill="#fff"
329
+ />
330
+ <Path
331
+ fillRule="evenodd"
332
+ clipRule="evenodd"
333
+ 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"
334
+ fill="#fff"
335
+ />
336
+ <Path
337
+ fillRule="evenodd"
338
+ clipRule="evenodd"
339
+ 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"
340
+ fill="#fff"
341
+ />
342
+ </Svg>
190
343
  );
191
344
 
192
- type PAYMENTCHANNEL = "TRANSFER" | "QRCODE" | "NFC" | "BTH"
345
+ type PAYMENTCHANNEL = 'TRANSFER' | 'QRCODE' | 'NFC' | 'BTH';
193
346
 
194
347
  // Main Component
195
- const ReceiveScreen = ({ amount, currency = 'NGN', user, account, onClose, onPaymentReceived, onError }: any) => {
348
+ const ReceiveScreen = ({
349
+ amount,
350
+ currency = 'NGN',
351
+ user,
352
+ account,
353
+ onClose,
354
+ onPaymentReceived,
355
+ onError,
356
+ }: any) => {
196
357
  const [mode, setMode] = useState<PAYMENTCHANNEL>('TRANSFER');
197
358
 
198
-
199
359
  return (
200
360
  <Container>
201
- {mode === 'TRANSFER' && (<Transfer
202
- amount={amount as any}
203
- description={""}
204
- user={user}
205
- recipient={account}
206
- onClose={onClose}
207
- onPaymentReceived={onPaymentReceived}
208
- />)}
209
-
210
- {mode === 'QRCODE' && (<Qr
211
- amount={amount as any}
212
- description={""}
213
- onClose={onClose}
214
- onPaymentReceived={onPaymentReceived}
215
- />)}
216
-
217
- {mode === 'NFC' && (<Nfc
218
- amount={amount as any}
219
- description={""}
220
- onClose={onClose}
221
- onPaymentReceived={onPaymentReceived}
222
- />)}
223
-
224
-
225
-
226
- {/* Bottom Sheet */}
361
+ {mode === 'TRANSFER' && (
362
+ <Transfer
363
+ amount={amount as any}
364
+ description={''}
365
+ user={user}
366
+ recipient={account}
367
+ onClose={onClose}
368
+ onPaymentReceived={onPaymentReceived}
369
+ />
370
+ )}
371
+
372
+ {mode === 'QRCODE' && (
373
+ <Qr
374
+ amount={amount as any}
375
+ description={''}
376
+ onClose={onClose}
377
+ onPaymentReceived={onPaymentReceived}
378
+ />
379
+ )}
380
+
381
+ {mode === 'NFC' && (
382
+ <Nfc
383
+ amount={amount as any}
384
+ description={''}
385
+ onClose={onClose}
386
+ onPaymentReceived={onPaymentReceived}
387
+ />
388
+ )}
389
+
390
+ {/* Bottom Sheet */}
227
391
  <BottomSheet>
228
392
  <SheetHandle />
229
-
393
+
230
394
  <SheetScrollView showsVerticalScrollIndicator={false}>
231
395
  <SectionTitle>Receive with</SectionTitle>
232
-
396
+
233
397
  <ActionsRow>
234
398
  <ActionButton onPress={() => setMode('TRANSFER')}>
235
399
  <ActionIconContainer color="#0a3d2e">
@@ -237,21 +401,21 @@ const ReceiveScreen = ({ amount, currency = 'NGN', user, account, onClose, onPay
237
401
  </ActionIconContainer>
238
402
  <ActionLabel>With{'\n'}transfer</ActionLabel>
239
403
  </ActionButton>
240
-
404
+
241
405
  <ActionButton onPress={() => setMode('QRCODE')}>
242
406
  <ActionIconContainer color="#0a3d2e">
243
407
  <QRIcon color="#FFF" size={22} />
244
408
  </ActionIconContainer>
245
409
  <ActionLabel>With{'\n'}QR</ActionLabel>
246
410
  </ActionButton>
247
-
411
+
248
412
  <ActionButton onPress={() => setMode('NFC')}>
249
413
  <ActionIconContainer color="#0a3d2e">
250
414
  <NFCIcon size={26} color="#ffffff" />
251
415
  </ActionIconContainer>
252
416
  <ActionLabel>With{'\n'}NFC</ActionLabel>
253
417
  </ActionButton>
254
-
418
+
255
419
  <ActionButton onPress={() => setMode('BTH')}>
256
420
  <ActionIconContainer color="#0a3d2e">
257
421
  <BluetoothIcon size={26} color="#ffffff" />
@@ -259,12 +423,9 @@ const ReceiveScreen = ({ amount, currency = 'NGN', user, account, onClose, onPay
259
423
  <ActionLabel>With{'\n'}Bluetooth</ActionLabel>
260
424
  </ActionButton>
261
425
  </ActionsRow>
262
-
263
426
  </SheetScrollView>
264
427
  </BottomSheet>
265
-
266
428
  </Container>
267
429
  );
268
430
  };
269
431
  export default ReceiveScreen;
270
-