Skip to content

Commit

Permalink
Merge pull request #378 from seasons/fix-card
Browse files Browse the repository at this point in the history
Fixes payment methods
  • Loading branch information
Luc Succes authored Oct 28, 2020
2 parents 6b9a53a + 31cbc93 commit add7968
Show file tree
Hide file tree
Showing 14 changed files with 8,433 additions and 8,208 deletions.
4 changes: 2 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ PODS:
- Sentry/Core (= 4.4.3)
- Sentry/Core (4.4.3)
- Stripe (14.0.1)
- tipsi-stripe (7.5.1):
- tipsi-stripe (7.5.0):
- React
- Stripe (~> 14.0.0)
- Yoga (1.14.0)
Expand Down Expand Up @@ -612,7 +612,7 @@ SPEC CHECKSUMS:
Segment-Mixpanel: 18c35e15fa95ee61ee2254577cf2c968db42e68a
Sentry: 14bdd673870e8cf64932b149fad5bbbf39a9b390
Stripe: 4305b646743612854819fb5d5cf67aaeb93577c0
tipsi-stripe: 61c247493a58d7e8e0bf6ee6b014271f473d2b11
tipsi-stripe: 8aaaa6f5e4cfea5c35be3affbb616c4e6cfafa5f
Yoga: 7d13633d129fd179e01b8953d38d47be90db185a

PODFILE CHECKSUM: c7e2077cb7d54c507ae3942b4d89c56271cb5a0c
Expand Down
6 changes: 3 additions & 3 deletions ios/Pods/Local Podspecs/tipsi-stripe.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ios/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16,596 changes: 8,411 additions & 8,185 deletions ios/Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"reanimated-bottom-sheet": "^1.0.0-alpha.20",
"styled-components": "^4.3.2",
"styled-system": "^5.1.1",
"tipsi-stripe": "7.5.1",
"tipsi-stripe": "https://github.com/ashfurrow/tipsi-stripe.git#fix-infinite-loop",
"unfetch": "^4.1.0"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export const UpdatePaymentPlanModal = screenTrack()(({ navigation, route }) => {
<ChoosePlanPane
selectedPlan={selectedPlan}
setSelectedPlan={setSelectedPlan}
paneType={0}
data={data}
onComplete={() => navigation.goBack()}
headerText="Let's choose your plan"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ interface ChoosePlanPaneProps {
setSelectedPlan: (plan: GetPlans_paymentPlans) => void
headerText: String
data: GetPlans
paneType: PaneType
coupon?: Coupon
source: "CreateAccountModal" | "UpdatePaymentPlanModal"
}
Expand All @@ -59,7 +58,6 @@ export const ChoosePlanPane: React.FC<ChoosePlanPaneProps> = ({
onComplete,
headerText,
data,
paneType,
setSelectedPlan,
selectedPlan,
coupon,
Expand Down Expand Up @@ -250,9 +248,9 @@ export const ChoosePlanPane: React.FC<ChoosePlanPaneProps> = ({
actionType: TrackSchema.ActionTypes.Tap,
})

if (paneType === PaneType.Create) {
if (source === "CreateAccountModal") {
setOpenPopUp(true)
} else if (paneType === PaneType.Update) {
} else {
onChoosePlanUpdate()
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Scenes/CreateAccount/Admitted/ChoosePlanPane/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function calcFinalPrice(price: number, coupon: Coupon) {
return price - discountAmount
case CouponType.Percentage:
return price - (price * discountPercentage) / 100.0
case undefined:
default:
return price
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,15 @@ export const CreditCardFormPane: React.FC<CreditCardFormPaneProps> = ({
</Sans>
<Spacer mb={2} />
<TextInput
autoFocus={false}
autoCapitalize="words"
currentValue={name}
headerText="Name"
onChangeText={(_, val) => setName(val)}
/>
<Spacer mb={3} />
<TextInput
autoFocus={false}
autoCapitalize="words"
currentValue={address1}
headerText="Address 1"
Expand All @@ -246,6 +248,7 @@ export const CreditCardFormPane: React.FC<CreditCardFormPaneProps> = ({
<Spacer mb={3} />
<Flex flexDirection="row">
<TextInput
autoFocus={false}
autoCapitalize="words"
currentValue={address2}
headerText="Address 2"
Expand All @@ -254,6 +257,7 @@ export const CreditCardFormPane: React.FC<CreditCardFormPaneProps> = ({
/>
<Spacer width={9} />
<TextInput
autoFocus={false}
autoCapitalize="words"
currentValue={city}
headerText="City"
Expand All @@ -273,6 +277,7 @@ export const CreditCardFormPane: React.FC<CreditCardFormPaneProps> = ({
/>
<Spacer width={9} />
<TextInput
autoFocus={false}
currentValue={zipCode}
headerText="ZIP"
keyboardType="number-pad"
Expand Down
1 change: 0 additions & 1 deletion src/Scenes/CreateAccount/CreateAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ export const CreateAccount: React.FC<CreateAccountProps> = screenTrack()(({ navi
<ChoosePlanPane
selectedPlan={selectedPlan}
setSelectedPlan={setSelectedPlan}
paneType={1}
data={data}
onComplete={(paymentMethod) => {
paymentMethod === PaymentMethod.CreditCard ? setIndex(index + 1) : setIndex(index + 2)
Expand Down
2 changes: 1 addition & 1 deletion src/Scenes/Home/Components/FitPicCollection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const FitPicCollection = React.forwardRef<FitPicCollectionRef, FitPicColl
<SharedElement id={`fitpic.photo.${item.id}`}>
<FadeInImage
source={{
uri: item.image.url,
uri: item?.image?.url || "",
}}
style={{ width: imageWidth, height: imageHeight }}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/Scenes/Home/Components/HomeBlogContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const HomeBlogContent = ({ items }) => {
return (
<TouchableWithoutFeedback
onPress={() => {
navigation.navigate(Schema.PageNames.Webview, { uri: item.url })
navigation.navigate(Schema.PageNames.Webview, { uri: item?.url || "" })
}}
>
<Box>
Expand Down
3 changes: 1 addition & 2 deletions src/Scenes/Product/Components/ImageRail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ export const ImageRail: React.FC<{
}}
onScroll={onScroll}
keyExtractor={(item) => {
const itemID = item && item.url
return itemID
return item?.url || ""
}}
showsHorizontalScrollIndicator={false}
horizontal
Expand Down
7 changes: 3 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15960,10 +15960,9 @@ tinycolor2@^1.4.1:
resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.1.tgz#f4fad333447bc0b07d4dc8e9209d8f39a8ac77e8"
integrity sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g=

tipsi-stripe@7.5.1:
version "7.5.1"
resolved "https://registry.yarnpkg.com/tipsi-stripe/-/tipsi-stripe-7.5.1.tgz#529434e0bbd0510eef68f6b1ff46c6d30f5a672f"
integrity sha512-dSdyY/1GR5JmmddS9K8nBR3bAkNhBsMpUGKjAuyXvyHOXJIwkdzuWDa86yMLPAC+JLBP4HzB2cIuEYH4A6KI4g==
"tipsi-stripe@https://github.com/ashfurrow/tipsi-stripe.git#fix-infinite-loop":
version "7.5.0"
resolved "https://github.com/ashfurrow/tipsi-stripe.git#aeb742baf1a8329ba371d9c94c7650104a112807"

tmp@^0.0.33:
version "0.0.33"
Expand Down

0 comments on commit add7968

Please sign in to comment.