Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
InvestCustomer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Giang Tran
InvestCustomer
Commits
da1c0218
Commit
da1c0218
authored
Jun 10, 2021
by
Giang Tran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit moment
parent
6be9c092
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
ConfirmChangeSmartOTP.js
src/Screens/SmartOTP/ChangeSmartOTP/ConfirmChangeSmartOTP.js
+8
-2
No files found.
src/Screens/SmartOTP/ChangeSmartOTP/ConfirmChangeSmartOTP.js
View file @
da1c0218
...
...
@@ -5,7 +5,7 @@ import {showAlert, TYPE} from '../../../components/DropdownAlert';
import
{
connect
}
from
'react-redux'
;
import
{
hideLoading
,
showLoading
}
from
'../../../actions/loadingAction'
;
import
I18n
from
'../../../helper/i18/i18n'
;
import
{
SMARTOTPCONFIG
}
from
'../../../routers/ScreenNames'
;
import
{
SMARTOTPCONFIG
,
TABNAVIGATOR
}
from
'../../../routers/ScreenNames'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
const
ConfirmChangeSmartOTP
=
(
props
)
=>
{
...
...
@@ -33,17 +33,23 @@ const ConfirmChangeSmartOTP = (props) => {
const
onCheckPINSmartOTPPin
=
async
()
=>
{
let
pinCode
=
`
${
firstNumber
}${
secondsNumber
}${
thirdNumber
}${
fourNumber
}
`
;
props
.
showLoading
();
const
res
=
await
updateOTPApiSmart
({
platform
:
Platform
.
OS
,
password
:
props
.
route
.
params
.
pre_otp
,
password_confirmation
:
pinCode
,
old_password
:
props
.
route
.
params
.
old_password
,
});
props
.
hideLoading
();
if
(
res
.
data
.
code
==
200
)
{
showAlert
(
TYPE
.
SUCCESS
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
setFirstNumber
(
null
);
setSecondsNumber
(
null
);
setThirdNumber
(
null
);
setFourNumber
(
null
);
navigation
.
reset
({
index
:
1
,
routes
:
[{
name
:
SMARTOTPCONFIG
}],
routes
:
[{
name
:
TABNAVIGATOR
},
{
name
:
SMARTOTPCONFIG
}],
});
}
else
{
showAlert
(
TYPE
.
ERROR
,
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment