@bifold/core 1.0.0 → 2.0.1

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 (373) hide show
  1. package/lib/commonjs/App.js +26 -22
  2. package/lib/commonjs/App.js.map +1 -1
  3. package/lib/commonjs/components/inputs/BiometryControl.js +176 -0
  4. package/lib/commonjs/components/inputs/BiometryControl.js.map +1 -0
  5. package/lib/commonjs/components/misc/ConnectionAlert.js +2 -2
  6. package/lib/commonjs/components/misc/ConnectionAlert.js.map +1 -1
  7. package/lib/commonjs/components/misc/InfoBox.js +3 -2
  8. package/lib/commonjs/components/misc/InfoBox.js.map +1 -1
  9. package/lib/commonjs/components/misc/{PINCreateHeader.js → PINHeader.js} +4 -4
  10. package/lib/commonjs/components/misc/PINHeader.js.map +1 -0
  11. package/lib/commonjs/components/misc/PINValidationHelper.js +50 -0
  12. package/lib/commonjs/components/misc/PINValidationHelper.js.map +1 -0
  13. package/lib/commonjs/components/views/PushNotificationsContent.js +52 -0
  14. package/lib/commonjs/components/views/PushNotificationsContent.js.map +1 -0
  15. package/lib/commonjs/components/views/PushNotificationsDisabledContent.js +47 -0
  16. package/lib/commonjs/components/views/PushNotificationsDisabledContent.js.map +1 -0
  17. package/lib/commonjs/container-api.js +8 -3
  18. package/lib/commonjs/container-api.js.map +1 -1
  19. package/lib/commonjs/container-impl.js +25 -21
  20. package/lib/commonjs/container-impl.js.map +1 -1
  21. package/lib/commonjs/contexts/activity.js +17 -41
  22. package/lib/commonjs/contexts/activity.js.map +1 -1
  23. package/lib/commonjs/contexts/auth.js +16 -6
  24. package/lib/commonjs/contexts/auth.js.map +1 -1
  25. package/lib/commonjs/contexts/navigation.js +24 -0
  26. package/lib/commonjs/contexts/navigation.js.map +1 -0
  27. package/lib/commonjs/contexts/reducers/store.js +14 -0
  28. package/lib/commonjs/contexts/reducers/store.js.map +1 -1
  29. package/lib/commonjs/contexts/theme.js +36 -3
  30. package/lib/commonjs/contexts/theme.js.map +1 -1
  31. package/lib/commonjs/hooks/deep-links.js +2 -4
  32. package/lib/commonjs/hooks/deep-links.js.map +1 -1
  33. package/lib/commonjs/hooks/{initialize-agent.js → useBifoldAgentSetup.js} +24 -44
  34. package/lib/commonjs/hooks/useBifoldAgentSetup.js.map +1 -0
  35. package/lib/commonjs/hooks/useOnboardingState.js +3 -3
  36. package/lib/commonjs/hooks/useOnboardingState.js.map +1 -1
  37. package/lib/commonjs/hooks/usePINValidation.js +82 -0
  38. package/lib/commonjs/hooks/usePINValidation.js.map +1 -0
  39. package/lib/commonjs/index.js +34 -33
  40. package/lib/commonjs/index.js.map +1 -1
  41. package/lib/commonjs/localization/en/index.js +31 -25
  42. package/lib/commonjs/localization/en/index.js.map +1 -1
  43. package/lib/commonjs/localization/fr/index.js +18 -6
  44. package/lib/commonjs/localization/fr/index.js.map +1 -1
  45. package/lib/commonjs/localization/pt-br/index.js +43 -37
  46. package/lib/commonjs/localization/pt-br/index.js.map +1 -1
  47. package/lib/commonjs/navigators/MainStack.js +31 -8
  48. package/lib/commonjs/navigators/MainStack.js.map +1 -1
  49. package/lib/commonjs/navigators/OnboardingScreens.js +8 -8
  50. package/lib/commonjs/navigators/OnboardingScreens.js.map +1 -1
  51. package/lib/commonjs/navigators/OnboardingStack.js +20 -12
  52. package/lib/commonjs/navigators/OnboardingStack.js.map +1 -1
  53. package/lib/commonjs/navigators/RootStack.js +27 -30
  54. package/lib/commonjs/navigators/RootStack.js.map +1 -1
  55. package/lib/commonjs/navigators/SettingStack.js +14 -15
  56. package/lib/commonjs/navigators/SettingStack.js.map +1 -1
  57. package/lib/commonjs/navigators/defaultStackOptions.js +13 -2
  58. package/lib/commonjs/navigators/defaultStackOptions.js.map +1 -1
  59. package/lib/commonjs/onboarding.js +12 -5
  60. package/lib/commonjs/onboarding.js.map +1 -1
  61. package/lib/commonjs/screens/Biometry.js +62 -0
  62. package/lib/commonjs/screens/Biometry.js.map +1 -0
  63. package/lib/commonjs/screens/CredentialOffer.js +2 -2
  64. package/lib/commonjs/screens/CredentialOffer.js.map +1 -1
  65. package/lib/commonjs/screens/Onboarding.js.map +1 -1
  66. package/lib/commonjs/screens/PINChange.js +212 -0
  67. package/lib/commonjs/screens/PINChange.js.map +1 -0
  68. package/lib/commonjs/screens/PINCreate.js +47 -224
  69. package/lib/commonjs/screens/PINCreate.js.map +1 -1
  70. package/lib/commonjs/screens/Preface.js.map +1 -1
  71. package/lib/commonjs/screens/ProofRequest.js +112 -33
  72. package/lib/commonjs/screens/ProofRequest.js.map +1 -1
  73. package/lib/commonjs/screens/PushNotifications.js +71 -0
  74. package/lib/commonjs/screens/PushNotifications.js.map +1 -0
  75. package/lib/commonjs/screens/Settings.js +8 -24
  76. package/lib/commonjs/screens/Settings.js.map +1 -1
  77. package/lib/commonjs/screens/Splash.js +7 -23
  78. package/lib/commonjs/screens/Splash.js.map +1 -1
  79. package/lib/commonjs/screens/Terms.js.map +1 -1
  80. package/lib/commonjs/screens/ToggleBiometry.js +135 -0
  81. package/lib/commonjs/screens/ToggleBiometry.js.map +1 -0
  82. package/lib/commonjs/screens/{PushNotification.js → TogglePushNotifications.js} +41 -99
  83. package/lib/commonjs/screens/TogglePushNotifications.js.map +1 -0
  84. package/lib/commonjs/theme.js +4 -2
  85. package/lib/commonjs/theme.js.map +1 -1
  86. package/lib/commonjs/types/navigators.js +5 -2
  87. package/lib/commonjs/types/navigators.js.map +1 -1
  88. package/lib/commonjs/utils/{PINCreationValidation.js → PINValidation.js} +4 -4
  89. package/lib/commonjs/utils/PINValidation.js.map +1 -0
  90. package/lib/commonjs/utils/agent.js.map +1 -1
  91. package/lib/commonjs/utils/helpers.js +2 -0
  92. package/lib/commonjs/utils/helpers.js.map +1 -1
  93. package/lib/module/App.js +24 -20
  94. package/lib/module/App.js.map +1 -1
  95. package/lib/module/components/inputs/BiometryControl.js +167 -0
  96. package/lib/module/components/inputs/BiometryControl.js.map +1 -0
  97. package/lib/module/components/misc/ConnectionAlert.js +2 -2
  98. package/lib/module/components/misc/ConnectionAlert.js.map +1 -1
  99. package/lib/module/components/misc/InfoBox.js +3 -2
  100. package/lib/module/components/misc/InfoBox.js.map +1 -1
  101. package/lib/module/components/misc/{PINCreateHeader.js → PINHeader.js} +4 -4
  102. package/lib/module/components/misc/PINHeader.js.map +1 -0
  103. package/lib/module/components/misc/PINValidationHelper.js +43 -0
  104. package/lib/module/components/misc/PINValidationHelper.js.map +1 -0
  105. package/lib/module/components/views/PushNotificationsContent.js +45 -0
  106. package/lib/module/components/views/PushNotificationsContent.js.map +1 -0
  107. package/lib/module/components/views/PushNotificationsDisabledContent.js +40 -0
  108. package/lib/module/components/views/PushNotificationsDisabledContent.js.map +1 -0
  109. package/lib/module/container-api.js +7 -2
  110. package/lib/module/container-api.js.map +1 -1
  111. package/lib/module/container-impl.js +25 -21
  112. package/lib/module/container-impl.js.map +1 -1
  113. package/lib/module/contexts/activity.js +17 -41
  114. package/lib/module/contexts/activity.js.map +1 -1
  115. package/lib/module/contexts/auth.js +16 -6
  116. package/lib/module/contexts/auth.js.map +1 -1
  117. package/lib/module/contexts/navigation.js +17 -0
  118. package/lib/module/contexts/navigation.js.map +1 -0
  119. package/lib/module/contexts/reducers/store.js +14 -0
  120. package/lib/module/contexts/reducers/store.js.map +1 -1
  121. package/lib/module/contexts/theme.js +36 -4
  122. package/lib/module/contexts/theme.js.map +1 -1
  123. package/lib/module/hooks/deep-links.js +2 -4
  124. package/lib/module/hooks/deep-links.js.map +1 -1
  125. package/lib/module/hooks/{initialize-agent.js → useBifoldAgentSetup.js} +25 -45
  126. package/lib/module/hooks/useBifoldAgentSetup.js.map +1 -0
  127. package/lib/module/hooks/useOnboardingState.js +3 -3
  128. package/lib/module/hooks/useOnboardingState.js.map +1 -1
  129. package/lib/module/hooks/usePINValidation.js +75 -0
  130. package/lib/module/hooks/usePINValidation.js.map +1 -0
  131. package/lib/module/index.js +6 -6
  132. package/lib/module/index.js.map +1 -1
  133. package/lib/module/localization/en/index.js +31 -25
  134. package/lib/module/localization/en/index.js.map +1 -1
  135. package/lib/module/localization/fr/index.js +18 -6
  136. package/lib/module/localization/fr/index.js.map +1 -1
  137. package/lib/module/localization/pt-br/index.js +43 -37
  138. package/lib/module/localization/pt-br/index.js.map +1 -1
  139. package/lib/module/navigators/MainStack.js +32 -9
  140. package/lib/module/navigators/MainStack.js.map +1 -1
  141. package/lib/module/navigators/OnboardingScreens.js +8 -8
  142. package/lib/module/navigators/OnboardingScreens.js.map +1 -1
  143. package/lib/module/navigators/OnboardingStack.js +21 -12
  144. package/lib/module/navigators/OnboardingStack.js.map +1 -1
  145. package/lib/module/navigators/RootStack.js +26 -29
  146. package/lib/module/navigators/RootStack.js.map +1 -1
  147. package/lib/module/navigators/SettingStack.js +14 -15
  148. package/lib/module/navigators/SettingStack.js.map +1 -1
  149. package/lib/module/navigators/defaultStackOptions.js +13 -2
  150. package/lib/module/navigators/defaultStackOptions.js.map +1 -1
  151. package/lib/module/onboarding.js +10 -4
  152. package/lib/module/onboarding.js.map +1 -1
  153. package/lib/module/screens/Biometry.js +53 -0
  154. package/lib/module/screens/Biometry.js.map +1 -0
  155. package/lib/module/screens/CredentialOffer.js +2 -2
  156. package/lib/module/screens/CredentialOffer.js.map +1 -1
  157. package/lib/module/screens/Onboarding.js.map +1 -1
  158. package/lib/module/screens/PINChange.js +203 -0
  159. package/lib/module/screens/PINChange.js.map +1 -0
  160. package/lib/module/screens/PINCreate.js +49 -226
  161. package/lib/module/screens/PINCreate.js.map +1 -1
  162. package/lib/module/screens/Preface.js.map +1 -1
  163. package/lib/module/screens/ProofRequest.js +113 -34
  164. package/lib/module/screens/ProofRequest.js.map +1 -1
  165. package/lib/module/screens/PushNotifications.js +63 -0
  166. package/lib/module/screens/PushNotifications.js.map +1 -0
  167. package/lib/module/screens/Settings.js +9 -25
  168. package/lib/module/screens/Settings.js.map +1 -1
  169. package/lib/module/screens/Splash.js +7 -23
  170. package/lib/module/screens/Splash.js.map +1 -1
  171. package/lib/module/screens/Terms.js.map +1 -1
  172. package/lib/module/screens/ToggleBiometry.js +126 -0
  173. package/lib/module/screens/ToggleBiometry.js.map +1 -0
  174. package/lib/module/screens/TogglePushNotifications.js +112 -0
  175. package/lib/module/screens/TogglePushNotifications.js.map +1 -0
  176. package/lib/module/theme.js +3 -1
  177. package/lib/module/theme.js.map +1 -1
  178. package/lib/module/types/navigators.js +5 -2
  179. package/lib/module/types/navigators.js.map +1 -1
  180. package/lib/module/utils/{PINCreationValidation.js → PINValidation.js} +2 -2
  181. package/lib/module/utils/PINValidation.js.map +1 -0
  182. package/lib/module/utils/agent.js.map +1 -1
  183. package/lib/module/utils/helpers.js +2 -0
  184. package/lib/module/utils/helpers.js.map +1 -1
  185. package/lib/typescript/src/App.d.ts +3 -3
  186. package/lib/typescript/src/App.d.ts.map +1 -1
  187. package/lib/typescript/src/components/inputs/BiometryControl.d.ts +9 -0
  188. package/lib/typescript/src/components/inputs/BiometryControl.d.ts.map +1 -0
  189. package/lib/typescript/src/components/misc/ConnectionAlert.d.ts +1 -1
  190. package/lib/typescript/src/components/misc/ConnectionAlert.d.ts.map +1 -1
  191. package/lib/typescript/src/components/misc/InfoBox.d.ts +1 -0
  192. package/lib/typescript/src/components/misc/InfoBox.d.ts.map +1 -1
  193. package/lib/typescript/src/components/misc/PINHeader.d.ts +6 -0
  194. package/lib/typescript/src/components/misc/PINHeader.d.ts.map +1 -0
  195. package/lib/typescript/src/components/misc/PINValidationHelper.d.ts +8 -0
  196. package/lib/typescript/src/components/misc/PINValidationHelper.d.ts.map +1 -0
  197. package/lib/typescript/src/components/views/PushNotificationsContent.d.ts +4 -0
  198. package/lib/typescript/src/components/views/PushNotificationsContent.d.ts.map +1 -0
  199. package/lib/typescript/src/components/views/PushNotificationsDisabledContent.d.ts +4 -0
  200. package/lib/typescript/src/components/views/PushNotificationsDisabledContent.d.ts.map +1 -0
  201. package/lib/typescript/src/container-api.d.ts +24 -13
  202. package/lib/typescript/src/container-api.d.ts.map +1 -1
  203. package/lib/typescript/src/container-impl.d.ts +4 -2
  204. package/lib/typescript/src/container-impl.d.ts.map +1 -1
  205. package/lib/typescript/src/contexts/activity.d.ts.map +1 -1
  206. package/lib/typescript/src/contexts/auth.d.ts +3 -1
  207. package/lib/typescript/src/contexts/auth.d.ts.map +1 -1
  208. package/lib/typescript/src/contexts/navigation.d.ts +8 -0
  209. package/lib/typescript/src/contexts/navigation.d.ts.map +1 -0
  210. package/lib/typescript/src/contexts/reducers/store.d.ts +3 -1
  211. package/lib/typescript/src/contexts/reducers/store.d.ts.map +1 -1
  212. package/lib/typescript/src/contexts/theme.d.ts +9 -3
  213. package/lib/typescript/src/contexts/theme.d.ts.map +1 -1
  214. package/lib/typescript/src/hooks/deep-links.d.ts.map +1 -1
  215. package/lib/typescript/src/hooks/useBifoldAgentSetup.d.ts +10 -0
  216. package/lib/typescript/src/hooks/useBifoldAgentSetup.d.ts.map +1 -0
  217. package/lib/typescript/src/hooks/useOnboardingState.d.ts +2 -1
  218. package/lib/typescript/src/hooks/useOnboardingState.d.ts.map +1 -1
  219. package/lib/typescript/src/hooks/usePINValidation.d.ts +20 -0
  220. package/lib/typescript/src/hooks/usePINValidation.d.ts.map +1 -0
  221. package/lib/typescript/src/index.d.ts +9 -7
  222. package/lib/typescript/src/index.d.ts.map +1 -1
  223. package/lib/typescript/src/localization/en/index.d.ts +23 -17
  224. package/lib/typescript/src/localization/en/index.d.ts.map +1 -1
  225. package/lib/typescript/src/localization/fr/index.d.ts +14 -2
  226. package/lib/typescript/src/localization/fr/index.d.ts.map +1 -1
  227. package/lib/typescript/src/localization/pt-br/index.d.ts +23 -17
  228. package/lib/typescript/src/localization/pt-br/index.d.ts.map +1 -1
  229. package/lib/typescript/src/navigators/MainStack.d.ts.map +1 -1
  230. package/lib/typescript/src/navigators/OnboardingScreens.d.ts +3 -3
  231. package/lib/typescript/src/navigators/OnboardingScreens.d.ts.map +1 -1
  232. package/lib/typescript/src/navigators/OnboardingStack.d.ts +7 -1
  233. package/lib/typescript/src/navigators/OnboardingStack.d.ts.map +1 -1
  234. package/lib/typescript/src/navigators/RootStack.d.ts.map +1 -1
  235. package/lib/typescript/src/navigators/SettingStack.d.ts.map +1 -1
  236. package/lib/typescript/src/navigators/defaultStackOptions.d.ts.map +1 -1
  237. package/lib/typescript/src/onboarding.d.ts +4 -2
  238. package/lib/typescript/src/onboarding.d.ts.map +1 -1
  239. package/lib/typescript/src/screens/Biometry.d.ts +4 -0
  240. package/lib/typescript/src/screens/Biometry.d.ts.map +1 -0
  241. package/lib/typescript/src/screens/{PushNotification.d.ts → PINChange.d.ts} +3 -3
  242. package/lib/typescript/src/screens/PINChange.d.ts.map +1 -0
  243. package/lib/typescript/src/screens/PINCreate.d.ts.map +1 -1
  244. package/lib/typescript/src/screens/ProofRequest.d.ts.map +1 -1
  245. package/lib/typescript/src/screens/PushNotifications.d.ts +4 -0
  246. package/lib/typescript/src/screens/PushNotifications.d.ts.map +1 -0
  247. package/lib/typescript/src/screens/Settings.d.ts.map +1 -1
  248. package/lib/typescript/src/screens/Splash.d.ts +7 -4
  249. package/lib/typescript/src/screens/Splash.d.ts.map +1 -1
  250. package/lib/typescript/src/screens/ToggleBiometry.d.ts +4 -0
  251. package/lib/typescript/src/screens/ToggleBiometry.d.ts.map +1 -0
  252. package/lib/typescript/src/screens/TogglePushNotifications.d.ts +4 -0
  253. package/lib/typescript/src/screens/TogglePushNotifications.d.ts.map +1 -0
  254. package/lib/typescript/src/theme.d.ts +3 -1
  255. package/lib/typescript/src/theme.d.ts.map +1 -1
  256. package/lib/typescript/src/types/navigators.d.ts +11 -13
  257. package/lib/typescript/src/types/navigators.d.ts.map +1 -1
  258. package/lib/typescript/src/types/state.d.ts +1 -0
  259. package/lib/typescript/src/types/state.d.ts.map +1 -1
  260. package/lib/typescript/src/utils/{PINCreationValidation.d.ts → PINValidation.d.ts} +2 -2
  261. package/lib/typescript/src/utils/PINValidation.d.ts.map +1 -0
  262. package/lib/typescript/src/utils/agent.d.ts +1 -2
  263. package/lib/typescript/src/utils/agent.d.ts.map +1 -1
  264. package/lib/typescript/src/utils/helpers.d.ts.map +1 -1
  265. package/package.json +5 -5
  266. package/src/App.tsx +41 -40
  267. package/src/components/inputs/BiometryControl.tsx +176 -0
  268. package/src/components/misc/ConnectionAlert.tsx +3 -3
  269. package/src/components/misc/InfoBox.tsx +3 -1
  270. package/src/components/misc/{PINCreateHeader.tsx → PINHeader.tsx} +4 -4
  271. package/src/components/misc/PINValidationHelper.tsx +48 -0
  272. package/src/components/views/PushNotificationsContent.tsx +51 -0
  273. package/src/components/views/PushNotificationsDisabledContent.tsx +47 -0
  274. package/src/container-api.ts +27 -11
  275. package/src/container-impl.ts +31 -27
  276. package/src/contexts/activity.tsx +17 -42
  277. package/src/contexts/auth.tsx +18 -6
  278. package/src/contexts/navigation.tsx +19 -0
  279. package/src/contexts/reducers/store.ts +12 -0
  280. package/src/contexts/theme.tsx +51 -0
  281. package/src/hooks/deep-links.ts +2 -4
  282. package/src/hooks/{initialize-agent.ts → useBifoldAgentSetup.ts} +32 -54
  283. package/src/hooks/useOnboardingState.ts +10 -3
  284. package/src/hooks/usePINValidation.ts +98 -0
  285. package/src/index.ts +12 -14
  286. package/src/localization/en/index.ts +26 -20
  287. package/src/localization/fr/index.ts +32 -20
  288. package/src/localization/pt-br/index.ts +39 -33
  289. package/src/navigators/MainStack.tsx +29 -8
  290. package/src/navigators/OnboardingScreens.ts +11 -11
  291. package/src/navigators/OnboardingStack.tsx +26 -14
  292. package/src/navigators/RootStack.tsx +31 -25
  293. package/src/navigators/SettingStack.tsx +15 -16
  294. package/src/navigators/defaultStackOptions.tsx +13 -2
  295. package/src/onboarding.ts +12 -5
  296. package/src/screens/Biometry.tsx +57 -0
  297. package/src/screens/CredentialOffer.tsx +2 -2
  298. package/src/screens/Onboarding.tsx +2 -2
  299. package/src/screens/PINChange.tsx +250 -0
  300. package/src/screens/PINCreate.tsx +51 -267
  301. package/src/screens/Preface.tsx +2 -2
  302. package/src/screens/ProofRequest.tsx +140 -48
  303. package/src/screens/PushNotifications.tsx +59 -0
  304. package/src/screens/Settings.tsx +5 -10
  305. package/src/screens/Splash.tsx +10 -22
  306. package/src/screens/Terms.tsx +2 -2
  307. package/src/screens/ToggleBiometry.tsx +167 -0
  308. package/src/screens/TogglePushNotifications.tsx +118 -0
  309. package/src/theme.ts +5 -1
  310. package/src/types/navigators.ts +11 -12
  311. package/src/types/state.ts +1 -0
  312. package/src/utils/{PINCreationValidation.ts → PINValidation.ts} +1 -1
  313. package/src/utils/agent.ts +1 -2
  314. package/src/utils/helpers.ts +2 -0
  315. package/lib/commonjs/components/misc/ActivityLogLink.js +0 -44
  316. package/lib/commonjs/components/misc/ActivityLogLink.js.map +0 -1
  317. package/lib/commonjs/components/misc/PINCreateHeader.js.map +0 -1
  318. package/lib/commonjs/components/modals/NotificationModal.js +0 -121
  319. package/lib/commonjs/components/modals/NotificationModal.js.map +0 -1
  320. package/lib/commonjs/components/texts/Label.js +0 -57
  321. package/lib/commonjs/components/texts/Label.js.map +0 -1
  322. package/lib/commonjs/components/texts/Title.js +0 -29
  323. package/lib/commonjs/components/texts/Title.js.map +0 -1
  324. package/lib/commonjs/components/views/ModularView.js +0 -41
  325. package/lib/commonjs/components/views/ModularView.js.map +0 -1
  326. package/lib/commonjs/hooks/initialize-agent.js.map +0 -1
  327. package/lib/commonjs/screens/PushNotification.js.map +0 -1
  328. package/lib/commonjs/screens/UseBiometry.js +0 -315
  329. package/lib/commonjs/screens/UseBiometry.js.map +0 -1
  330. package/lib/commonjs/utils/PINCreationValidation.js.map +0 -1
  331. package/lib/module/components/misc/ActivityLogLink.js +0 -37
  332. package/lib/module/components/misc/ActivityLogLink.js.map +0 -1
  333. package/lib/module/components/misc/PINCreateHeader.js.map +0 -1
  334. package/lib/module/components/modals/NotificationModal.js +0 -112
  335. package/lib/module/components/modals/NotificationModal.js.map +0 -1
  336. package/lib/module/components/texts/Label.js +0 -50
  337. package/lib/module/components/texts/Label.js.map +0 -1
  338. package/lib/module/components/texts/Title.js +0 -22
  339. package/lib/module/components/texts/Title.js.map +0 -1
  340. package/lib/module/components/views/ModularView.js +0 -34
  341. package/lib/module/components/views/ModularView.js.map +0 -1
  342. package/lib/module/hooks/initialize-agent.js.map +0 -1
  343. package/lib/module/screens/PushNotification.js +0 -170
  344. package/lib/module/screens/PushNotification.js.map +0 -1
  345. package/lib/module/screens/UseBiometry.js +0 -306
  346. package/lib/module/screens/UseBiometry.js.map +0 -1
  347. package/lib/module/utils/PINCreationValidation.js.map +0 -1
  348. package/lib/typescript/src/components/misc/ActivityLogLink.d.ts +0 -4
  349. package/lib/typescript/src/components/misc/ActivityLogLink.d.ts.map +0 -1
  350. package/lib/typescript/src/components/misc/PINCreateHeader.d.ts +0 -6
  351. package/lib/typescript/src/components/misc/PINCreateHeader.d.ts.map +0 -1
  352. package/lib/typescript/src/components/modals/NotificationModal.d.ts +0 -17
  353. package/lib/typescript/src/components/modals/NotificationModal.d.ts.map +0 -1
  354. package/lib/typescript/src/components/texts/Label.d.ts +0 -9
  355. package/lib/typescript/src/components/texts/Label.d.ts.map +0 -1
  356. package/lib/typescript/src/components/texts/Title.d.ts +0 -8
  357. package/lib/typescript/src/components/texts/Title.d.ts.map +0 -1
  358. package/lib/typescript/src/components/views/ModularView.d.ts +0 -9
  359. package/lib/typescript/src/components/views/ModularView.d.ts.map +0 -1
  360. package/lib/typescript/src/hooks/initialize-agent.d.ts +0 -7
  361. package/lib/typescript/src/hooks/initialize-agent.d.ts.map +0 -1
  362. package/lib/typescript/src/screens/PushNotification.d.ts.map +0 -1
  363. package/lib/typescript/src/screens/UseBiometry.d.ts +0 -4
  364. package/lib/typescript/src/screens/UseBiometry.d.ts.map +0 -1
  365. package/lib/typescript/src/utils/PINCreationValidation.d.ts.map +0 -1
  366. package/src/components/misc/ActivityLogLink.tsx +0 -34
  367. package/src/components/modals/NotificationModal.tsx +0 -127
  368. package/src/components/texts/Label.tsx +0 -51
  369. package/src/components/texts/Title.tsx +0 -25
  370. package/src/components/views/ModularView.tsx +0 -35
  371. package/src/contexts/theme.ts +0 -9
  372. package/src/screens/PushNotification.tsx +0 -186
  373. package/src/screens/UseBiometry.tsx +0 -357
package/src/index.ts CHANGED
@@ -4,7 +4,7 @@ import type { OnboardingStyleSheet } from './screens/Onboarding'
4
4
  import { Agent } from '@credo-ts/core'
5
5
  import AgentProvider from '@credo-ts/react-hooks'
6
6
 
7
- import App from './App'
7
+ import createApp from './App'
8
8
  import * as components from './components'
9
9
  import { Button as IButton, ButtonImpl as Button, ButtonType } from './components/buttons/Button'
10
10
  import IconButton, { ButtonLocation } from './components/buttons/IconButton'
@@ -36,6 +36,7 @@ import NotificationListItem from './components/listItems/NotificationListItem'
36
36
  import * as contexts from './contexts'
37
37
  import { AutoLockTime, ActivityProvider, useActivity } from './contexts/activity'
38
38
  import { AuthProvider } from './contexts/auth'
39
+ import NavContainer from './contexts/navigation'
39
40
  import { NetworkProvider } from './contexts/network'
40
41
  import { useTour } from './contexts/tour/tour-context'
41
42
  import { TourProvider } from './contexts/tour/tour-provider'
@@ -46,7 +47,7 @@ import Preface from './screens/Preface'
46
47
  import Splash from './screens/Splash'
47
48
  import Terms from './screens/Terms'
48
49
  import UpdateAvailable from './screens/UpdateAvailable'
49
- import UseBiometry from './screens/UseBiometry'
50
+ import Biometry from './screens/Biometry'
50
51
  import { loadLoginAttempt } from './services/keychain'
51
52
  import { BifoldLogger } from './services/logger'
52
53
  import * as types from './types'
@@ -57,7 +58,7 @@ import { PINRules, walletTimeout, tours, attemptLockoutConfig } from './constant
57
58
  import { CredentialListFooterProps } from './types/credential-list-footer'
58
59
  import { OpenIDCredentialRecordProvider } from './modules/openid/context/OpenIDCredentialRecordProvider'
59
60
  import { defaultConfig, defaultHistoryEventsLogger } from './container-impl'
60
- import useInitializeAgent from './hooks/initialize-agent'
61
+ import useBifoldAgentSetup from './hooks/useBifoldAgentSetup'
61
62
  import usePreventScreenCapture from './hooks/screen-capture'
62
63
  import { DefaultScreenLayoutOptions } from './navigators/defaultLayoutOptions'
63
64
 
@@ -76,10 +77,9 @@ export { ThemeProvider, useTheme } from './contexts/theme'
76
77
  export { AnimatedComponentsProvider, useAnimatedComponents } from './contexts/animated-components'
77
78
  export { ColorPallet } from './theme'
78
79
  export { animatedComponents } from './animated-components'
79
- export { theme } from './theme'
80
+ export { bifoldTheme } from './theme'
80
81
  export { useAuth } from './contexts/auth'
81
82
  export { useNetwork } from './contexts/network'
82
- export { NavigationTheme } from './theme'
83
83
  export { testIdWithKey, testIdForAccessabilityLabel } from './utils/testable'
84
84
  export { Screens, Stacks, TabStacks } from './types/navigators'
85
85
  export { createStyles } from './screens/OnboardingPages'
@@ -122,12 +122,7 @@ export type { VersionInfo, PersistentState } from './types/state'
122
122
  export type { BifoldAgent } from './utils/agent'
123
123
  export type { TourStep, RenderProps } from './contexts/tour/tour-context'
124
124
  export type { GenericFn } from './types/fn'
125
- export type {
126
- AuthenticateStackParams,
127
- OnboardingStackParams,
128
- NotificationStackParams,
129
- ContactStackParams,
130
- } from './types/navigators'
125
+ export type { OnboardingStackParams, NotificationStackParams, ContactStackParams } from './types/navigators'
131
126
  export type { OnboardingStyleSheet }
132
127
  export type { WalletSecret } from './types/security'
133
128
  export type { ReducerAction } from './contexts/reducers/store'
@@ -152,9 +147,11 @@ export type { ScreenLayoutConfig, OnboardingTask } from './types/navigators'
152
147
  export type { Config, HistoryEventsLoggerConfig } from './types/config'
153
148
 
154
149
  export { BaseTourID } from './types/tour'
150
+ export type { SplashProps } from './screens/Splash'
151
+ export type { OnboardingStackProps } from './navigators/OnboardingStack'
155
152
 
156
153
  export {
157
- App,
154
+ createApp,
158
155
  Agent,
159
156
  AgentProvider,
160
157
  AuthProvider,
@@ -186,12 +183,13 @@ export {
186
183
  AutoLockTime,
187
184
  ToastType,
188
185
  toastConfig,
186
+ NavContainer,
189
187
  NetInfo,
190
188
  OnboardingPages,
191
189
  OpenIDCredentialRecordProvider,
192
190
  NotificationListItem,
193
191
  useDefaultStackOptions,
194
- useInitializeAgent,
192
+ useBifoldAgentSetup,
195
193
  usePreventScreenCapture,
196
194
  Splash,
197
195
  Developer,
@@ -199,7 +197,7 @@ export {
199
197
  Preface,
200
198
  UpdateAvailable,
201
199
  HomeFooterView as HomeContentView,
202
- UseBiometry,
200
+ Biometry,
203
201
  AttemptLockout,
204
202
  Record,
205
203
  Scan,
@@ -47,6 +47,7 @@ const translation = {
47
47
  "Updated": "Updated",
48
48
  "Close": "Close",
49
49
  "Remove": "Remove",
50
+ "GotIt": "Got it",
50
51
  },
51
52
  "Date": {
52
53
  "ShortFormat": "MMM D",
@@ -144,6 +145,10 @@ const translation = {
144
145
  "Message1046": "There was a problem while fetching contacts.",
145
146
  "Title1047": "Unable to display card.",
146
147
  "Message1047": "There was a problem parsing credential card.",
148
+ "Title1048": "Proof request problems.",
149
+ "Message1048": "There was a problem with the proof request.",
150
+ "Title1049": "Unable to change PIN.",
151
+ "Message1049": "There was a problem while attempting to change your PIN.",
147
152
  },
148
153
  "SelectionAxs": {
149
154
  "RadioChecked": "checked",
@@ -230,33 +235,27 @@ const translation = {
230
235
  "CheckIcon": "Criteria met",
231
236
  "ClearIcon": "Criteria not met",
232
237
  },
233
- "UserAuthenticationPIN": "User authentication PIN",
234
238
  "PINTooShort": "PIN is too short",
235
239
  "InvalidPIN": "Invalid PIN",
236
240
  "PINsDoNotMatch": "PINs do not match",
237
- "PleaseUseOnlyNumbersInYourPIN": "Please use only numbers in your PIN",
238
- "YourPINMustBe6DigitsInLength": "Your PIN needs to be 6 digits long.",
239
- "EnteredPINsDoNotMatch": "The entered PINs do not match. Please try again.",
240
- "YouNeedToCreateA6DigitPIN": "You need to create a 6 digit PIN",
241
- "PleaseReenterYourPIN": "Please re-enter your PIN",
242
- "PinChangeSuccessTitle": "Successfully changed your PIN",
243
- "PinChangeSuccessMessage": "Your PIN was successsfully changed. You can now log in with your new PIN.",
244
- "EnterOldPINTitle": "Enter your old PIN",
245
- "EnterOldPIN": "Enter your old PIN",
246
- "NewPIN": "new",
247
- "EnterPINTitle": "Enter a {{ new }}6 digit PIN",
241
+ "EnterPINTitle": "Enter a 6 digit PIN",
248
242
  "EnterPIN": "Enter PIN",
249
- "ReenterPIN": "Re-enter {{ new }}PIN",
250
- "ReenterPINTitle": "Re-Enter PIN",
243
+ "ReenterPIN": "Re-enter PIN",
251
244
  "CreatePIN": "Create PIN",
252
245
  "RememberPIN": "Create a PIN to secure your wallet.",
253
- "RememberChangePIN": "Change your PIN to secure your wallet.",
254
246
  "PINDisclaimer": "If you forget it, you may need to set up your wallet again and re-add your cards.",
255
247
  "Show": "Show PIN",
256
248
  "Hide": "Hide PIN",
249
+ },
250
+ "PINChange": {
251
+ "PinChangeSuccessTitle": "Successfully changed your PIN",
252
+ "PinChangeSuccessMessage": "Your PIN was successsfully changed. You can now log in with your new PIN.",
253
+ "EnterOldPINTitle": "Enter your old PIN",
254
+ "EnterOldPIN": "Enter your old PIN",
255
+ "EnterPINTitle": "Enter a new 6 digit PIN",
256
+ "ReenterPIN": "Re-enter new PIN",
257
+ "RememberChangePIN": "Change your PIN to secure your wallet.",
257
258
  "ChangePIN": "Change PIN",
258
- "Continue": "Continue",
259
- "EnterYourCurrentPIN": "Enter your current PIN"
260
259
  },
261
260
  "PINEnter": {
262
261
  "Title": "Welcome back",
@@ -487,7 +486,7 @@ const translation = {
487
486
  "Credential": "credential"
488
487
  },
489
488
  "PushNotifications": {
490
- "EnableNotifiactions": "Enable Notifications to get instant alerts",
489
+ "EnableNotifications": "Enable Notifications to get instant alerts",
491
490
  "BeNotified": "Be notified when you receive:",
492
491
  "ReceiveNotifications": "Receive notifications",
493
492
  "BulletFour": "new messages",
@@ -712,8 +711,15 @@ const translation = {
712
711
  "DeclineBulletPoint3": "Are you sure you want to decline this proof request?",
713
712
  "NoInfoShared": "No information was shared",
714
713
  "YourInfo": "Your information was not shared",
715
- "YouCantRespond": "You can't respond due to the following reasons. Please address them before continuing.",
714
+ "YouCantRespond": "You can't respond to this proof request.",
715
+ "YouCantRespondReasons": "You can't respond due to: ",
716
716
  "CredentialNotInWallet": "This credential is not present in your wallet.",
717
+ "CredentialIsMissing": "missing credentials",
718
+ "ProofRequestPredicateError": "requirements aren't met",
719
+ "CredentialForProofIsRevoked": "revoked credential",
720
+ "ProofRequestStateError": "The proof request received is in: {{state}}, decline this proof and try again.",
721
+ "ProofRequestErrorMessage": "Something went wrong with the proof request.",
722
+ "PleaseAddress": " Please address them before continuing.",
717
723
  },
718
724
  "Settings": {
719
725
  "Version": "Version",
@@ -806,7 +812,7 @@ const translation = {
806
812
  "OnTheWay": 'On The Way',
807
813
  "Declined": 'Declined',
808
814
  "UseBiometry": 'Use Biometry',
809
- "UsePushNotifications": 'Use Push Notifications',
815
+ "PushNotifications": 'Push notifications',
810
816
  "CustomNotification": 'Custom Notification',
811
817
  "ProofRequesting": 'Proof Requesting',
812
818
  "NameWallet": "Name your wallet",
@@ -47,6 +47,7 @@ const translation = {
47
47
  "Updated": "Mis à jour",
48
48
  "Remove": "Supprimer",
49
49
  "Close": "Fermer",
50
+ "GotIt": "Got it (FR)",
50
51
  },
51
52
  "Date": {
52
53
  "ShortFormat": "D MMM",
@@ -142,8 +143,12 @@ const translation = {
142
143
  "Message1045": "Il y a eu un problème lors de l'initialisation de l'agent.",
143
144
  "Title1046": "Impossible de récupérer les contacts.",
144
145
  "Message1046": "Il y a eu un problème lors de la récupération des contacts.",
145
- "Title1047": "Unable to display card. (PT-FR)",
146
- "Message1047": "There was a problem parsing credential card. (PT-FR)",
146
+ "Title1047": "Unable to display card. (FR)",
147
+ "Message1047": "There was a problem parsing credential card. (FR)",
148
+ "Title1048": "Proof request problems. (FR)",
149
+ "Message1048": "There was a problem with the proof request. (FR)",
150
+ "Title1049": "Unable to change PIN. (FR)",
151
+ "Message1049": "There was a problem while attempting to change your PIN. (FR)",
147
152
  },
148
153
  "SelectionAxs": {
149
154
  "RadioChecked": "checked(fr)",
@@ -414,20 +419,20 @@ const translation = {
414
419
  },
415
420
  "Button": "Sort/Filter(fr)",
416
421
  "NoHistory": "You haven't used any cards yet.\n\nEach time you add or use a card, that activity will be saved here.(fr)",
417
- "CardTitle":{
418
- "CardAccepted": "Carte Acceptée:",
419
- "CardDeclined": "Carte refusée:",
420
- "CardExpired": "Card expirée",
421
- "CardRemoved": "Carte retirée",
422
- "CardRevoked": "Carte révoquée",
423
- "CardUpdates": "Mises à jour de la carte",
424
- "WalletPinUpdated": "NIP du portefeuille mis à jour",
425
- "InformationSent": "Information envoyée à:",
426
- "InformationNotSent": "Information non envoyée à:",
427
- "Connection": "Connexion",
428
- "ConnectionRemoved": "Connexion retirée",
429
- "ActivateBiometry": "Biométrie activée",
430
- "DeactivateBiometry": "Biométrie désactivée",
422
+ "CardTitle": {
423
+ "CardAccepted": "Carte Acceptée:",
424
+ "CardDeclined": "Carte refusée:",
425
+ "CardExpired": "Card expirée",
426
+ "CardRemoved": "Carte retirée",
427
+ "CardRevoked": "Carte révoquée",
428
+ "CardUpdates": "Mises à jour de la carte",
429
+ "WalletPinUpdated": "NIP du portefeuille mis à jour",
430
+ "InformationSent": "Information envoyée à:",
431
+ "InformationNotSent": "Information non envoyée à:",
432
+ "Connection": "Connexion",
433
+ "ConnectionRemoved": "Connexion retirée",
434
+ "ActivateBiometry": "Biométrie activée",
435
+ "DeactivateBiometry": "Biométrie désactivée",
431
436
  },
432
437
  "CardDescription": {
433
438
  "CardExpired": "{{cardName}} expired(fr)",
@@ -486,7 +491,7 @@ const translation = {
486
491
  "Credential": "attestation",
487
492
  },
488
493
  "PushNotifications": {
489
- "EnableNotifiactions": "Activer les Notifications pour recevoir des alertes instantanées",
494
+ "EnableNotifications": "Activer les Notifications pour recevoir des alertes instantanées",
490
495
  "BeNotified": "Soyez averti lorsque vous recevez :",
491
496
  "ReceiveNotifications": "Recevoir des notifications",
492
497
  "BulletFour": "nouveaux messages",
@@ -697,8 +702,15 @@ const translation = {
697
702
  "DeclineBulletPoint3": "Etes-vous sûr vous voulez refuser cette demande de preuve?",
698
703
  "NoInfoShared": "Aucune information n'a été partagée",
699
704
  "YourInfo": "Votre information n'a pas été partagée",
700
- "YouCantRespond": "You can't respond due to the following reasons. Please address them before continuing. (FR)",
701
- "CredentailNotInWallet": "This credential is not present in your wallet.(FR)",
705
+ "YouCantRespond": "You can't respond to this proof request. (FR)",
706
+ "YouCantRespondReasons": "You can't respond due to: (FR)",
707
+ "CredentialNotInWallet": "This credential is not present in your wallet. (FR)",
708
+ "CredentialIsMissing": "missing credentials (FR)",
709
+ "ProofRequestPredicateError": "requirements aren't met (FR)",
710
+ "CredentialForProofIsRevoked": "revoked credential (FR)",
711
+ "ProofRequestStateError": "The proof request received is in: {{state}}, decline this proof and try again. (FR)",
712
+ "ProofRequestErrorMessage": "Something went wrong with the proof request. (FR)",
713
+ "PleaseAddress": " Please address them before continuing. (FR)",
702
714
  },
703
715
  "Settings": {
704
716
  "Version": "Version",
@@ -892,6 +904,6 @@ const translation = {
892
904
  "LearnMore": "Learn what's New (FR)",
893
905
  "UpdateNow": "Update the app (FR)",
894
906
  "UpdateLater": "Do this later (FR)",
895
- },
907
+ },
896
908
  }
897
909
  export default translation
@@ -46,6 +46,7 @@ const translation = {
46
46
  "Updated": "Updated",
47
47
  "Close": "Fechar",
48
48
  "Remove": "Remover",
49
+ "GotIt": "Got it (PT-BR)",
49
50
  },
50
51
  "Date": {
51
52
  "ShortFormat": "D MMM",
@@ -143,6 +144,10 @@ const translation = {
143
144
  "Message1046": "There was a problem while fetching contacts. (PT-BR)",
144
145
  "Title1047": "Unable to display card. (PT-BR)",
145
146
  "Message1047": "There was a problem parsing credential card. (PT-BR)",
147
+ "Title1048": "Proof request problems. (PT-BR)",
148
+ "Message1048": "There was a problem with the proof request. (PT-BR)",
149
+ "Title1049": "Unable to change PIN. (PT-BR)",
150
+ "Message1049": "There was a problem while attempting to change your PIN. (PT-BR)",
146
151
  },
147
152
  "SelectionAxs": {
148
153
  "RadioChecked": "checked",
@@ -222,33 +227,27 @@ const translation = {
222
227
  "CheckIcon": "Critério atendido",
223
228
  "ClearIcon": "Critério não atendido",
224
229
  },
225
- "UserAuthenticationPIN": "PIN de autenticação do usuário",
226
230
  "PINTooShort": "PIN é curto demais",
227
231
  "InvalidPIN": "PIN inválido",
228
232
  "PINsDoNotMatch": "PINs não conferem",
229
- "PleaseUseOnlyNumbersInYourPIN": "Favor usar somente números em seu PIN",
230
- "YourPINMustBe6DigitsInLength": "Seu PIN precisa ter 6 digitos.",
231
- "EnteredPINsDoNotMatch": "Os PINs não conferem. Favor tentar novamente.",
232
- "YouNeedToCreateA6DigitPIN": "Você precisa criar um PIN de 6 digitos",
233
- "PleaseReenterYourPIN": "Favor digitar novamente seu PIN",
234
- "PinChangeSuccessTitle": "Seu PIN foi alterado com sucesso",
235
- "PinChangeSuccessMessage": "Seu PIN foi alterado com sucesso. Agora você pode entrar no app com seu novo PIN.",
236
- "EnterOldPINTitle": "Digite seu PIN antigo",
237
- "EnterOldPIN": "Digite seu PIN antigo",
238
- "NewPIN": "novo",
239
- "EnterPINTitle": "Digite um {{ new }}PIN de 6 digitos",
233
+ "EnterPINTitle": "Digite um PIN de 6 digitos",
240
234
  "EnterPIN": "Digitar PIN",
241
- "ReenterPIN": "Digite novamente o {{ new }}PIN",
242
- "ReenterPINTitle": "Digitar novamente PIN",
235
+ "ReenterPIN": "Digite novamente o PIN",
243
236
  "CreatePIN": "Criar PIN",
244
237
  "RememberPIN": "Criar um PIN para assegurar sua carteira.",
245
- "RememberChangePIN": "Altere seu PIN para assegurar sua carteira.",
246
238
  "PINDisclaimer": "Se você o esquecer, você precisará redefinir sua carteira e readicionar seus cards.",
247
239
  "Show": "Mostrar PIN",
248
240
  "Hide": "Esconder PIN",
241
+ },
242
+ "PINChange": {
243
+ "PinChangeSuccessTitle": "Seu PIN foi alterado com sucesso",
244
+ "PinChangeSuccessMessage": "Seu PIN foi alterado com sucesso. Agora você pode entrar no app com seu novo PIN.",
245
+ "EnterOldPINTitle": "Digite seu PIN antigo",
246
+ "EnterOldPIN": "Digite seu PIN antigo",
247
+ "EnterPINTitle": "Digite um PIN de 6 digitos",
248
+ "ReenterPIN": "Digite novamente o PIN",
249
+ "RememberChangePIN": "Altere seu PIN para assegurar sua carteira.",
249
250
  "ChangePIN": "Alterar PIN",
250
- "Continue": "Continuar",
251
- "EnterYourCurrentPIN": "Digite seu PIN atual."
252
251
  },
253
252
  "PINEnter": {
254
253
  "EnterPIN": "Digitar PIN",
@@ -399,19 +398,19 @@ const translation = {
399
398
  "Button": "Sort/Filter",
400
399
  "NoHistory": "You haven't used any cards yet.\n\nEach time you add or use a card, that activity will be saved here.",
401
400
  "CardTitle": {
402
- "CardAccepted": "Card accepted:",
403
- "CardDeclined": "Card declined:",
404
- "CardExpired": "Card expired",
405
- "CardRemoved": "Card removed",
406
- "CardRevoked": "Card revoked",
407
- "CardUpdates": "Card updates",
408
- "WalletPinUpdated": "Wallet PIN updated",
409
- "InformationSent": "Information sent to:",
410
- "InformationNotSent": "Information not sent to:",
411
- "Connection": "Connection",
412
- "ConnectionRemoved": "Connection removed",
413
- "ActivateBiometry": "Biometrics activated",
414
- "DeactivateBiometry": "Biometrics deactivated"
401
+ "CardAccepted": "Card accepted: (PT-BR)",
402
+ "CardDeclined": "Card declined: (PT-BR)",
403
+ "CardExpired": "Card expired (PT-BR)",
404
+ "CardRemoved": "Card removed (PT-BR)",
405
+ "CardRevoked": "Card revoked (PT-BR)",
406
+ "CardUpdates": "Card updates (PT-BR)",
407
+ "WalletPinUpdated": "Wallet PIN updated (PT-BR)",
408
+ "InformationSent": "Information sent to (PT-BR):",
409
+ "InformationNotSent": "Information not sent to (PT-BR):",
410
+ "Connection": "Connection (PT-BR)",
411
+ "ConnectionRemoved": "Connection removed (PT-BR)",
412
+ "ActivateBiometry": "Biometrics activated (PT-BR)",
413
+ "DeactivateBiometry": "Biometrics deactivated (PT-BR)"
415
414
  },
416
415
  "CardDescription": {
417
416
  "CardExpired": "{{cardName}} expired",
@@ -470,7 +469,7 @@ const translation = {
470
469
  "Credential": "credencial"
471
470
  },
472
471
  "PushNotifications": {
473
- "EnableNotifiactions": "Enable Notifications to get instant alerts (PT-BR)",
472
+ "EnableNotifications": "Enable Notifications to get instant alerts (PT-BR)",
474
473
  "BeNotified": "Be notified when you receive: (PT-BR)",
475
474
  "ReceiveNotifications": "Receive notifications (PT-BR)",
476
475
  "BulletFour": "new messages (PT-BR)",
@@ -688,8 +687,15 @@ const translation = {
688
687
  "DeclineBulletPoint3": "Você tem certeza que quer recusar esta requisição de prova?",
689
688
  "NoInfoShared": "No information was shared (PT-BR)",
690
689
  "YourInfo": "Your information was not shared (PT-BR)",
691
- "YouCantRespond": "You can't respond due to the following reasons. Please address them before continuing. (PT-BR)",
692
- "CredentailNotInWallet": "This credential is not present in your wallet. (PT-BR)",
690
+ "YouCantRespond": "You can't respond to this proof request. (PT-BR)",
691
+ "YouCantRespondReasons": "You can't respond due to: (PT-BR)",
692
+ "CredentialNotInWallet": "This credential is not present in your wallet. (PT-BR)",
693
+ "CredentialIsMissing": "missing credentials (PT-BR)",
694
+ "ProofRequestPredicateError": "requirements aren't met (PT-BR)",
695
+ "CredentialForProofIsRevoked": "revoked credential (PT-BR)",
696
+ "ProofRequestStateError": "The proof request received is in: {{state}}, decline this proof and try again. (PT-BR)",
697
+ "ProofRequestErrorMessage": "Something went wrong with the proof request. (PT-BR)",
698
+ "PleaseAddress": " Please address them before continuing. (PT-BR)",
693
699
  },
694
700
  "Settings": {
695
701
  "Version": "Versão",
@@ -1,5 +1,8 @@
1
+ import { ProofCustomMetadata, ProofMetadata } from '@bifold/verifier'
2
+ import { useAgent, useProofByState } from '@credo-ts/react-hooks'
3
+ import { ProofState } from '@credo-ts/core'
1
4
  import { CardStyleInterpolators, StackCardStyleInterpolator, createStackNavigator } from '@react-navigation/stack'
2
- import React, { useMemo } from 'react'
5
+ import React, { useEffect, useMemo } from 'react'
3
6
  import { View } from 'react-native'
4
7
  import { useTranslation } from 'react-i18next'
5
8
 
@@ -10,29 +13,45 @@ import HistoryStack from '../modules/history/navigation/HistoryStack'
10
13
  import Chat from '../screens/Chat'
11
14
  import { Screens, Stacks, TabStacks } from '../types/navigators'
12
15
  import { testIdWithKey } from '../utils/testable'
16
+ import { useStore } from '../contexts/store'
17
+ import { useTour } from '../contexts/tour/tour-context'
18
+ import { useDeepLinks } from '../hooks/deep-links'
19
+ import CredentialDetails from '../screens/CredentialDetails'
20
+ import OpenIDCredentialDetails from '../modules/openid/screens/OpenIDCredentialDetails'
13
21
 
14
22
  import ConnectStack from './ConnectStack'
15
23
  import ContactStack from './ContactStack'
16
- import { useTour } from '../contexts/tour/tour-context'
17
24
  import DeliveryStack from './DeliveryStack'
18
25
  import NotificationStack from './NotificationStack'
19
26
  import ProofRequestStack from './ProofRequestStack'
20
27
  import SettingStack from './SettingStack'
21
28
  import TabStack from './TabStack'
22
29
  import { useDefaultStackOptions } from './defaultStackOptions'
23
- import CredentialDetails from '../screens/CredentialDetails'
24
- import OpenIDCredentialDetails from '../modules/openid/screens/OpenIDCredentialDetails'
25
30
 
26
31
  const MainStack: React.FC = () => {
27
32
  const { t } = useTranslation()
28
33
  const theme = useTheme()
29
34
  const { currentStep } = useTour()
35
+ const [store] = useStore()
36
+ const { agent } = useAgent()
30
37
  const defaultStackOptions = useDefaultStackOptions(theme)
31
- const [splash, CustomNavStack1, ScreenOptionsDictionary] = useServices([
32
- TOKENS.SCREEN_SPLASH,
38
+ const [CustomNavStack1, ScreenOptionsDictionary] = useServices([
33
39
  TOKENS.CUSTOM_NAV_STACK_1,
34
40
  TOKENS.OBJECT_SCREEN_CONFIG,
35
41
  ])
42
+ const declinedProofs = useProofByState([ProofState.Declined, ProofState.Abandoned])
43
+ useDeepLinks()
44
+
45
+ // remove connection on mobile verifier proofs if proof is rejected
46
+ useEffect(() => {
47
+ declinedProofs.forEach((proof) => {
48
+ const meta = proof?.metadata?.get(ProofMetadata.customMetadata) as ProofCustomMetadata
49
+ if (meta?.delete_conn_after_seen) {
50
+ agent?.connections.deleteById(proof?.connectionId ?? '').catch(() => null)
51
+ proof?.metadata.set(ProofMetadata.customMetadata, { ...meta, delete_conn_after_seen: false })
52
+ }
53
+ })
54
+ }, [declinedProofs, agent, store.preferences.useDataRetention])
36
55
 
37
56
  const Stack = createStackNavigator()
38
57
 
@@ -47,8 +66,10 @@ const MainStack: React.FC = () => {
47
66
 
48
67
  return (
49
68
  <View style={{ flex: 1 }} importantForAccessibility={hideElements}>
50
- <Stack.Navigator initialRouteName={Screens.Splash} screenOptions={{ ...defaultStackOptions, headerShown: false }}>
51
- <Stack.Screen name={Screens.Splash} component={splash} />
69
+ <Stack.Navigator
70
+ initialRouteName={Stacks.TabStack}
71
+ screenOptions={{ ...defaultStackOptions, headerShown: false }}
72
+ >
52
73
  <Stack.Screen name={Stacks.TabStack} component={TabStack} />
53
74
  <Stack.Screen
54
75
  name={Screens.CredentialDetails}
@@ -13,13 +13,13 @@ type ScreenOptions = RouteConfig<
13
13
  >
14
14
 
15
15
  interface ScreenComponents {
16
- Splash: React.FC<StackScreenProps<ParamListBase>>
16
+ SplashScreen: React.FC<StackScreenProps<ParamListBase>>
17
17
  Preface: React.FC<StackScreenProps<ParamListBase>>
18
18
  UpdateAvailableScreen: React.FC
19
19
  Terms: React.FC<StackScreenProps<ParamListBase>>
20
20
  NameWallet: React.FC<StackScreenProps<ParamListBase>>
21
- useBiometry: React.FC<StackScreenProps<ParamListBase>>
22
- PushNotification: React.FC<StackScreenProps<ParamListBase, Screens.UsePushNotifications>>
21
+ Biometry: React.FC<StackScreenProps<ParamListBase>>
22
+ PushNotifications: React.FC<StackScreenProps<ParamListBase>>
23
23
  Developer: React.FC<StackScreenProps<ParamListBase>>
24
24
  AttemptLockout: React.FC<StackScreenProps<ParamListBase>>
25
25
  OnboardingScreen: React.FC
@@ -34,7 +34,7 @@ export const getOnboardingScreens = (
34
34
  ): ScreenOptions[] => [
35
35
  {
36
36
  name: Screens.Splash,
37
- component: components.Splash,
37
+ component: components.SplashScreen,
38
38
  options: {
39
39
  ...TransitionPresets.ModalFadeTransition,
40
40
  title: t('Screens.Splash'),
@@ -100,23 +100,23 @@ export const getOnboardingScreens = (
100
100
  component: components.NameWallet,
101
101
  },
102
102
  {
103
- name: Screens.UseBiometry,
103
+ name: Screens.Biometry,
104
104
  options: () => ({
105
105
  ...TransitionPresets.SlideFromRightIOS,
106
106
  title: t('Screens.Biometry'),
107
107
  headerLeft: () => false,
108
- ...ScreenOptionsDictionary[Screens.UseBiometry],
108
+ ...ScreenOptionsDictionary[Screens.Biometry],
109
109
  }),
110
- component: components.useBiometry,
110
+ component: components.Biometry,
111
111
  },
112
112
  {
113
- name: Screens.UsePushNotifications,
114
- component: components.PushNotification,
113
+ name: Screens.PushNotifications,
114
+ component: components.PushNotifications,
115
115
  options: () => ({
116
116
  ...TransitionPresets.SlideFromRightIOS,
117
- title: t('Screens.UsePushNotifications'),
117
+ title: t('Screens.PushNotifications'),
118
118
  headerLeft: () => false,
119
- ...ScreenOptionsDictionary[Screens.UsePushNotifications],
119
+ ...ScreenOptionsDictionary[Screens.PushNotifications],
120
120
  }),
121
121
  },
122
122
  {