ordering-ui-react-native 0.18.85 → 0.18.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ import { Wrapper } from './styles'
|
|
|
7
7
|
|
|
8
8
|
import { PhoneInputParams } from '../../types';
|
|
9
9
|
import { OText } from '../shared';
|
|
10
|
-
import {transformCountryCode} from '../../utils'
|
|
10
|
+
import {transformCountryCode, verifyCountryCode} from '../../utils'
|
|
11
11
|
import {I18nManager} from 'react-native'
|
|
12
12
|
import { useTheme } from 'styled-components/native';
|
|
13
13
|
|
|
@@ -88,7 +88,11 @@ export const PhoneInputNumber = (props: PhoneInputParams) => {
|
|
|
88
88
|
<PhoneInput
|
|
89
89
|
ref={phoneInput}
|
|
90
90
|
defaultValue={userphoneNumber || defaultValue}
|
|
91
|
-
defaultCode={defaultCode ?
|
|
91
|
+
defaultCode={defaultCode ?
|
|
92
|
+
!isNaN(defaultCode)
|
|
93
|
+
? transformCountryCode(defaultCode)
|
|
94
|
+
: verifyCountryCode(defaultCode)
|
|
95
|
+
: verifyCountryCode(configs?.default_country_code?.value)}
|
|
92
96
|
onChangeFormattedText={(text : string) => handleChangeNumber(text)}
|
|
93
97
|
withDarkTheme
|
|
94
98
|
textInputStyle={{textAlign: I18nManager.isRTL ? 'right' : 'left'}}
|
|
@@ -153,7 +153,8 @@ export const StripeMethodForm = (props: StripeMethodFormParams) => {
|
|
|
153
153
|
const { error, paymentMethod } = await presentApplePay({
|
|
154
154
|
cartItems: [{
|
|
155
155
|
label: t('CART', 'Cart'),
|
|
156
|
-
amount: cartTotal?.toString?.() ?? cart?.balance?.toString() ?? cart?.total?.toString?.()
|
|
156
|
+
amount: cartTotal?.toString?.() ?? cart?.balance?.toString() ?? cart?.total?.toString?.(),
|
|
157
|
+
paymentType: 'Immediate'
|
|
157
158
|
}],
|
|
158
159
|
country: 'US',
|
|
159
160
|
currency: configs?.stripe_currency?.value ?? 'USD',
|