Skip to main content

Usage

import SHRLogin from 'shr-login';

<SHRLogin
enabaleAutoLogin={true}
appType={'basic'} // 'basic' 'shareringid' 'full'
appName={'ShareProtect'}
appScheme={'shareprotect'}
blockchainChainId={blockchainChainId}
graphQLServer={URLS.GraphQLServer}
UrlRegister={URLS.register}
UrlsChallenge={URLS.challenge}
UrlsLogin={URLS.login}
onSuccess={keyPairObj => {
// console.log('---login-success:', JSON.stringify(keyPairObj));
}}
/>

View current passphrase

import ViewSeedPhrase from 'shr-login/SeedPhraseReview';

<ViewSeedPhrase
onCancel={() => {
//
}}
copyPhraseSuccess={() => {
//
}}
/>

Remove account

import SHRRemoveAcc from 'shr-login/RemoveAccount';

<SHRRemoveAcc
countLenght={12}
onRemoveSuccess={async () => {
// resest action to Login screen
}}
goBack={()=>{this.props.navigation.goBack()}}
copyPassphraseSuccess={()=>showToast(I18n.t('screen.GenerateWallet.copyText3'))}
/>

Change PIN

import ChangePinDialog from "shr-login/ChangePinDialog";

// using
// this.ChangePinDialog._show(user.hashPassword, user.walletAddress)

<ChangePinDialog
onRef={ref => (this.ChangePinDialog = ref)}
onSuccess={(newHashPassword) => {
//
}}
/>