Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beasy-mobile
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
4
Issues
4
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
G
beasy-mobile
Commits
fa11aba1
Commit
fa11aba1
authored
Jun 18, 2024
by
G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testing useWave hook a little bit
parent
44507987
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
PaymentAmountInputScreen.tsx
src/screens/PaymentAmountInputScreen.tsx
+19
-1
No files found.
src/screens/PaymentAmountInputScreen.tsx
View file @
fa11aba1
...
@@ -9,6 +9,7 @@ import BackgroundDefault from "@components/backgrounds/BackgroundDefault";
...
@@ -9,6 +9,7 @@ import BackgroundDefault from "@components/backgrounds/BackgroundDefault";
import
Box
from
"@components/bases/Box"
;
import
Box
from
"@components/bases/Box"
;
import
Text
from
"@components/bases/Text"
;
import
Text
from
"@components/bases/Text"
;
import
useOrangeMoney
from
"@hooks/useOrangeMoney"
;
import
useOrangeMoney
from
"@hooks/useOrangeMoney"
;
import
useWave
from
"@hooks/useWave"
;
import
{
LOG
}
from
"@logger"
;
import
{
LOG
}
from
"@logger"
;
import
{
useCallback
,
useState
}
from
"react"
;
import
{
useCallback
,
useState
}
from
"react"
;
import
{
Keyboard
,
View
}
from
"react-native"
;
import
{
Keyboard
,
View
}
from
"react-native"
;
...
@@ -34,6 +35,8 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI
...
@@ -34,6 +35,8 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI
orangePaymentTransactionHandler
,
orangePaymentTransactionHandler
,
}
=
useOrangeMoney
(
navigation
);
}
=
useOrangeMoney
(
navigation
);
const
{
waveTransactionHandler
}
=
useWave
();
const
insets
=
useSafeAreaInsets
();
const
insets
=
useSafeAreaInsets
();
log
.
debug
({
log
.
debug
({
...
@@ -66,12 +69,27 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI
...
@@ -66,12 +69,27 @@ const PaymentAmountInputScreen: PaymentStackScreenComponentProps<"paymentAmountI
break
;
break
;
}
}
case
"WAVE"
:
{
try
{
log
.
info
(
"Wave so we stay on screen."
);
await
waveTransactionHandler
(
amountToPay
);
}
catch
(
error
)
{
log
.
error
(
"handlePaymentButton Wave|"
,
error
);
}
break
;
}
default
:
default
:
log
.
info
(
"Navigating to numberAndOtpForPaymentScreen"
);
log
.
info
(
"Navigating to numberAndOtpForPaymentScreen"
);
navigation
.
navigate
(
"numberAndOtpForPaymentScreen"
);
navigation
.
navigate
(
"numberAndOtpForPaymentScreen"
);
break
;
break
;
}
}
},
[
paymentType
,
navigation
,
amountToPay
,
orangePaymentTransactionHandler
]);
},
[
paymentType
,
navigation
,
amountToPay
,
orangePaymentTransactionHandler
,
waveTransactionHandler
,
]);
return
(
return
(
<
BackgroundDefault
>
<
BackgroundDefault
>
...
...
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