OstWallet Settings is a pre-built UI Component available exclusively available in ost-wallet-sdk-react-native
Sdk.
It is a wallet settings page that can be used by end-users to perfrom different wallet operations.
IMPORTANT: This feature requires application to use React Navigation package.
OstWalletSettings supports 13 workflows:
- Activate User
- Wallet Details
- Initialize Recovery
- Add Session
- Reset a User's PIN
- Get Mnemonic Phrase
- Authorize device using mnemonics
- Abort Device Recovery
- Revoke Device
- Scan QR Code to add another device
- Get Current Device QR code
- Enable Biometrics
- Disable Biometrics
import {OstWalletSettingsComponent} from '@ostdotcom/ost-wallet-sdk-react-native';
let settingsStack = createStackNavigator(
{
"WalletSettingScreen": OstWalletSettingsComponent
}
);
ostUserId
and ostWalletUIWorkflowCallback
are mandetory parameters that need to be passed as params to the WalletSettingScreen
screen.
const ostUserId = <APPLICATION-USER-OST-USER-ID>
const delegate = new OstWalletUIWorkflowCallback(ostUserId, {})
this.props.navigation.push("WalletSettingScreen", {'ostUserId': ostUserId, 'ostWalletUIWorkflowCallback': delegate});
Note
Developer needs to create a class extends fromOstWalletUIWorkflowCallback
and write logic to get passphrase prefix from their application server. Please refer this section for documentation.
Developer can customize wallet settings by updating respective properties mentioned in image. OstTheme config shown here
Developer can modify header
and description
of settings options. To modify contet, refer here.
import {OstWalletSettings} from "@ostdotcom/ost-wallet-sdk-react-native/js/index";
let settingsContentConfig = {}
OstWalletSettings.setMasterConfig(settingsContentConfig)