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
7d089f9a
Commit
7d089f9a
authored
May 13, 2021
by
Giang Tran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update otp
parent
4a87b671
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
22 deletions
+41
-22
ProfileView.js
src/Screens/AccountVerification/TabView/ProfileView.js
+3
-2
OTPWallet.js
src/Screens/Action/Wallet/OTPWallet.js
+25
-8
WalletWithdraw.js
src/Screens/Action/Wallet/WalletWithdraw.js
+13
-12
No files found.
src/Screens/AccountVerification/TabView/ProfileView.js
View file @
7d089f9a
...
...
@@ -46,6 +46,7 @@ const Item = (props) => {
};
const
Profile
=
(
props
)
=>
{
console
.
log
(
props
.
user
);
const
renderType
=
(
type
)
=>
{
switch
(
type
)
{
case
1
:
...
...
@@ -84,11 +85,11 @@ const Profile = (props) => {
}}
>
<
Item
linkImg
=
{
props
.
user
.
identity_before
}
title
=
{
I18n
.
t
(
'IdentityCitizenCard
Back
Photo'
)}
title
=
{
I18n
.
t
(
'IdentityCitizenCard
Front
Photo'
)}
/
>
<
Item
linkImg
=
{
props
.
user
.
identity_after
}
title
=
{
I18n
.
t
(
'IdentityCitizenCard
Front
Photo'
)}
title
=
{
I18n
.
t
(
'IdentityCitizenCard
Back
Photo'
)}
/
>
<
Item
linkImg
=
{
props
.
user
.
sign_img
}
title
=
{
I18n
.
t
(
'SignPhoto'
)}
/
>
<
/View
>
...
...
src/Screens/Action/Wallet/OTPWallet.js
View file @
7d089f9a
...
...
@@ -22,7 +22,7 @@ import {verifyOTPApi, registorApi} from '../../../apis/Functions/users';
import
{
useNavigation
}
from
'@react-navigation/native'
;
import
I18n
from
'../../../helper/i18/i18n'
;
import
AppText
from
'../../../components/AppText'
;
import
{
widthDraw
,
getListWidthDraw
}
from
'../../../apis/Functions/Widthdraw'
;
import
{
showLoading
,
hideLoading
}
from
'../../../actions/loadingAction'
;
import
{
connect
}
from
'react-redux'
;
import
{
TABNAVIGATOR
}
from
'../../../routers/ScreenNames'
;
...
...
@@ -39,6 +39,7 @@ const ConfirmOTP = (propsa) => {
value
,
setValue
,
});
console
.
log
(
'Type'
,
propsa
.
route
.
params
.
type
);
const
confirm
=
async
()
=>
{
if
(
!
value
)
{
...
...
@@ -47,6 +48,7 @@ const ConfirmOTP = (propsa) => {
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
I18n
.
t
(
'OTPInvalid'
));
}
else
{
propsa
.
showLoading
();
const
res
=
await
verifyOTPApi
({
platform
:
Platform
.
OS
,
receiver_name
:
propsa
.
user
.
email
,
...
...
@@ -54,13 +56,28 @@ const ConfirmOTP = (propsa) => {
});
if
(
res
.
data
.
code
==
200
)
{
const
{
amount
,
notes
,
type
}
=
propsa
.
route
.
params
;
const
res
=
await
walletDeposit
({
amount
,
platform
:
Platform
.
OS
,
notes
,
fee
:
0
,
});
let
res
;
if
(
propsa
.
route
.
params
.
type
==
'DEPOSIT'
)
{
const
{
amount
,
notes
}
=
propsa
.
route
.
params
;
res
=
await
walletDeposit
({
amount
,
platform
:
Platform
.
OS
,
notes
,
fee
:
0
,
});
}
else
{
const
{
src
,
receiving_account
,
amount
,
notes
}
=
propsa
.
route
.
params
;
res
=
await
widthDraw
({
src
,
receiving_account
,
amount
,
platform
:
Platform
.
OS
,
notes
,
fee
:
0
,
});
}
propsa
.
hideLoading
();
if
(
res
.
data
.
code
==
200
)
{
setTimeout
(()
=>
{
...
...
src/Screens/Action/Wallet/WalletWithdraw.js
View file @
7d089f9a
...
...
@@ -33,6 +33,8 @@ import {confirmAlert} from '../../../components/Aleart';
import
{
ADDMETHODPAY
}
from
'../../../routers/ScreenNames'
;
import
TextMoney
from
'../../../components/Input/InputMoney'
;
import
I18n
from
'../../../helper/i18/i18n'
;
import
{
getOTPApi
}
from
'../../../apis/Functions/users'
;
import
{
OTPWALLET
}
from
'../../../routers/ScreenNames'
;
var
radio_props
=
[
{
label
:
I18n
.
t
(
'FromWallet'
),
value
:
'WALLET'
},
{
label
:
I18n
.
t
(
'FromCQGAccount'
),
value
:
'INVESTMENT'
},
...
...
@@ -86,27 +88,26 @@ const WalletWithdraw = (props) => {
if
(
index
===
true
)
{
props
.
showLoading
();
const
res
=
await
widthDraw
({
src
,
receiving_account
:
type
.
id
,
amount
,
const
res
=
await
getOTPApi
({
platform
:
Platform
.
OS
,
notes
,
fee
:
0
,
otp_by
:
props
.
user
.
email
,
});
props
.
hideLoading
();
if
(
res
.
data
.
code
==
200
)
{
setTimeout
(()
=>
{
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
navigate
.
goBack
();
},
500
);
navigate
.
navigate
(
OTPWALLET
,
{
type
:
'WITHDRAW'
,
src
,
receiving_account
:
type
.
id
,
amount
,
notes
,
});
}
else
{
setTimeout
(()
=>
{
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
res
.
data
.
message
);
},
500
);
}
props
.
hideLoading
();
}
else
{
Alert
.
alert
(
I18n
.
t
(
'Notification'
),
...
...
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