Skip to content

Latest commit

 

History

History
70 lines (50 loc) · 2.25 KB

OstWalletSettings.md

File metadata and controls

70 lines (50 loc) · 2.25 KB

OstWallet Settings

Introduction

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

Usage

Create wallet settings stack navigation

import {OstWalletSettingsComponent} from '@ostdotcom/ost-wallet-sdk-react-native';

let settingsStack = createStackNavigator(
  {
    "WalletSettingScreen": OstWalletSettingsComponent
  }
);

Naviagte to settings page

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 from OstWalletUIWorkflowCallback and write logic to get passphrase prefix from their application server. Please refer this section for documentation.

UI Customization

Developer can customize wallet settings by updating respective properties mentioned in image. OstTheme config shown here

copy-framework-file copy-framework-file

Settings Content

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)