---
# System prepended metadata

title: OnrampWallet Security Flows

---

# OnrampWallet Security Flows


```flow
start=>start: Start the app
end=>end: Main screen
end2=>end: Main screen
login=>operation: User enters email and password
for Signin or Signup
decryptStore=>operation: Get Encrypted Store
with PIN code
newUser=>condition: Have wallet?
restore=>operation: Enter Seedphrase
createNewMnemonic=>operation: Create random seedphrase
saveSeedTemp=>operation: Save seedphrase to Temporary Local Store
removeSeedTemp=>operation: Remove seedphrase from Temporary Local Store
saveSeed=>operation: Save seedphrase to Encrypted Storage
saveSeed2=>operation: Save seedphrase to Encrypted Storage
inputSeed=>operation: User enters seedphrase again
saveJWT=>operation: Save JWT to the Encrypted Storage



splash=>operation: Initialize Store
(regular)
hasMnemonic=>condition: Seedphrase exist in store?



hasPIN=>condition: PIN exist?

auth1=>operation: Start Auth process
WebAuthR [2]
auth2=>operation: Set PIN and Biometrics
saved to Key Chain / Key Store
enterPIN=>operation: Enter PIN or Biometrics
initWallet=>operation: Prepare crypto wallet
(init wallet, load balances,
JWT revoke and etc.)
initWallet2=>operation: Prepare crypto wallet
(init wallet, load balances and etc.)
initEcryptedStore=>operation: Initialize new Store
for sensitive data
encrypt it with PIN code

moveSensitive=>operation: Move existing sensitive data
from Temp Store to Encrypted Store
Clear Temp Store


start->login->saveJWT->decryptStore->newUser

newUser(no)->createNewMnemonic->saveSeedTemp->inputSeed->removeSeedTemp->saveSeed->initWallet->end2
newUser(yes)->restore->saveSeed2->initWallet2->end




```
[1] [MMKV with Encryption](https://github.com/mrousavy/react-native-mmkv). By default, MMKV stores all key-values in plain text on file, relying on iOS's/Android's sandbox to make sure the file is encrypted. Should you worry about information leaking, you can choose to encrypt MMKV.

