Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dependencies": {
"@dashlane/pqc-kem-kyber512-browser": "^1.0.0",
"@headlessui/react": "1.7.5",
"@iconscout/react-unicons": "^1.1.6",
"@iconscout/react-unicons": "2.2.5",
"@internxt/css-config": "1.0.3",
"@internxt/lib": "1.3.1",
"@internxt/sdk": "=1.11.11",
Expand All @@ -15,8 +15,8 @@
"@reduxjs/toolkit": "^1.6.0",
"@sentry/react": "^8.55.0",
"@sentry/tracing": "^7.120.3",
"@stripe/react-stripe-js": "^2.7.1",
"@stripe/stripe-js": "^3.5.0",
"@stripe/react-stripe-js": "5.2.0",
"@stripe/stripe-js": "8.1.0",
"@typeform/embed-react": "^1.19.0",
"@types/uuid": "^8.3.4",
"@vitest/browser": "^2.1.9",
Expand Down
2 changes: 0 additions & 2 deletions src/app/core/config/views.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import ChangeEmailView from '../views/ChangeEmailView';
import NotFoundView from '../views/NotFoundView/NotFoundView';
import VerifyEmailView from '../views/VerifyEmailView';
import CheckoutViewWrapper from '../../payment/views/IntegratedCheckoutView/CheckoutViewWrapper';
import { CheckoutSessionId } from 'app/payment/views/CheckoutSession/CheckoutSessionId';
import PcCloudSuccess from 'app/payment/views/CheckoutSuccessView/PcCloudSuccess';

const views: Array<{
Expand Down Expand Up @@ -58,7 +57,6 @@ const views: Array<{
{ id: AppView.CheckoutSuccess, component: CheckoutSuccessView },
{ id: AppView.PcCloudSuccess, component: PcCloudSuccess },
{ id: AppView.CheckoutCancel, component: CheckoutCancelView },
{ id: AppView.CheckoutSession, component: CheckoutSessionId },
{ id: AppView.Checkout, component: CheckoutViewWrapper },
{ id: AppView.RecoveryLink, component: RecoveryLinkView },
{ id: AppView.ShareFileToken, component: ShareFileView },
Expand Down
3 changes: 3 additions & 0 deletions src/app/payment/hooks/useUserPayment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@ describe('Custom hook to handle payments', () => {
getElement: vi.fn(),
submit: vi.fn(),
update: vi.fn(),
on: vi.fn(),
},
selectedPlan: {
price: {
Expand Down Expand Up @@ -485,6 +486,7 @@ describe('Custom hook to handle payments', () => {
getElement: vi.fn(),
submit: vi.fn(),
update: vi.fn(),
on: vi.fn(),
},
selectedPlan: {
price: {
Expand Down Expand Up @@ -528,6 +530,7 @@ describe('Custom hook to handle payments', () => {
getElement: vi.fn(),
submit: vi.fn(),
update: vi.fn(),
on: vi.fn(),
},
selectedPlan: {
price: {
Expand Down
8 changes: 1 addition & 7 deletions src/app/payment/services/payment.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
UserSubscription,
UserType,
} from '@internxt/sdk/dist/drive/payments/types/types';
import { RedirectToCheckoutServerOptions, Source, Stripe, StripeError } from '@stripe/stripe-js';
import { Source, Stripe } from '@stripe/stripe-js';
import { loadStripe } from '@stripe/stripe-js/pure';
import axios from 'axios';
import { SdkFactory } from '../../core/factory/sdk';
Expand Down Expand Up @@ -114,12 +114,6 @@ const paymentService = {
return paymentsClient.getInvoices(payload);
},

async redirectToCheckout(options: RedirectToCheckoutServerOptions): Promise<{ error: StripeError }> {
const stripe = await this.getStripe();

return stripe.redirectToCheckout(options);
},

async getUserSubscription(userType?: UserType): Promise<UserSubscription> {
const paymentsClient = await SdkFactory.getNewApiInstance().createPaymentsClient();
return paymentsClient.getUserSubscription(userType);
Expand Down
31 changes: 0 additions & 31 deletions src/app/payment/views/CheckoutSession/CheckoutSessionId.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/app/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { configureStore } from '@reduxjs/toolkit';

import backupsReducer from './slices/backups';
import fileViewerReducer from './slices/fileViewer';
import paymentReducer from './slices/payment';
import planReducer from './slices/plan';
import productsReducer from './slices/products';
import referralsReducer from './slices/referrals';
Expand All @@ -22,7 +21,6 @@ export const store = configureStore({
ui: uiReducer,
plan: planReducer,
products: productsReducer,
payment: paymentReducer,
backups: backupsReducer,
fileViewer: fileViewerReducer,
taskManager: taskManagerReducer,
Expand Down
87 changes: 0 additions & 87 deletions src/app/store/slices/payment/index.ts

This file was deleted.

85 changes: 59 additions & 26 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1839,12 +1839,12 @@
resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45"
integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==

"@iconscout/react-unicons@^1.1.6":
version "1.1.6"
resolved "https://registry.yarnpkg.com/@iconscout/react-unicons/-/react-unicons-1.1.6.tgz#4137afb831666f9c6d3b45a410610b9db9507f3a"
integrity sha512-BnyVvBew7Vm1lvL8+qyqjchUbkVHlDyNAlN+r5b+0P0KrkQ66BHPBuJEJ2faT89L8qRu+TohE7dHMV+bndje3Q==
"@iconscout/react-unicons@2.2.5":
version "2.2.5"
resolved "https://registry.yarnpkg.com/@iconscout/react-unicons/-/react-unicons-2.2.5.tgz#d7a27fb0e30e87d77d45ac02e4e765d85f242026"
integrity sha512-Qn1YqlQPKUjgeGvtbsOWFlnmYBJL5iYpK+B+/nsUDz0tm8BmHQeGn9MsfSBB0WVYtLWiChhz5AQHbvXKqtWDmw==
dependencies:
react ">=15.0.0 <17.0.0"
prop-types "^15.8.1"

"@inquirer/confirm@^5.0.0":
version "5.0.2"
Expand Down Expand Up @@ -3068,17 +3068,17 @@
resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz#821f8442f4175d8f0467b9daf26e3a18e2d02af2"
integrity sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==

"@stripe/react-stripe-js@^2.7.1":
version "2.7.1"
resolved "https://registry.yarnpkg.com/@stripe/react-stripe-js/-/react-stripe-js-2.7.1.tgz#2be66166318fcb898c67a19e5b342364a2714d57"
integrity sha512-/i13alp27HaSBbMM6kW0jhy8KqdtOL1T/EcRjFjfhvt+CBtMEg8TD7y28W3oZG0+OBDdCyGGnXgNgrKPYQH40g==
"@stripe/react-stripe-js@5.2.0":
version "5.2.0"
resolved "https://registry.yarnpkg.com/@stripe/react-stripe-js/-/react-stripe-js-5.2.0.tgz#c68a5207bc13520fb421c3f7bf386e08363072fe"
integrity sha512-m6CFXWjI5yikOcaP1L9xiabgkljdhu8vspoqF+BDD9mIjZIh1yEjeU0++oefqlXBd9U3QZj+C2ds4t3BDmICMg==
dependencies:
prop-types "^15.7.2"

"@stripe/stripe-js@^3.5.0":
version "3.5.0"
resolved "https://registry.yarnpkg.com/@stripe/stripe-js/-/stripe-js-3.5.0.tgz#7fff3d9d931e972c24dcc8ee25f7481a58879b2b"
integrity sha512-pKS3wZnJoL1iTyGBXAvCwduNNeghJHY6QSRSNNvpYnrrQrLZ6Owsazjyynu0e0ObRgks0i7Rv+pe2M7/MBTZpQ==
"@stripe/stripe-js@8.1.0":
version "8.1.0"
resolved "https://registry.yarnpkg.com/@stripe/stripe-js/-/stripe-js-8.1.0.tgz#d162df9f0a58b9d08c4fb7a4a670e8c90491c14e"
integrity sha512-bhhi0iSHDFRa2pPVv3WOHC6x/iGEu5AZqIiAvXsT8VOucsEre9gzgsK0jFzbzfGW2eeubF+mCdTTYwNAQCMJKg==

"@svgr/babel-plugin-add-jsx-attribute@8.0.0":
version "8.0.0"
Expand Down Expand Up @@ -4877,7 +4877,7 @@ crypt@0.0.2:
resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b"
integrity sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==

crypto-browserify@^3.12.0, "crypto@npm:crypto-browserify":
crypto-browserify@^3.12.0:
version "3.12.0"
resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec"
integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==
Expand Down Expand Up @@ -4917,6 +4917,23 @@ crypto-js@4.1.1:
resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.1.1.tgz#9e485bcf03521041bd85844786b83fb7619736cf"
integrity sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==

"crypto@npm:crypto-browserify":
version "3.12.0"
resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec"
integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==
dependencies:
browserify-cipher "^1.0.0"
browserify-sign "^4.0.0"
create-ecdh "^4.0.0"
create-hash "^1.1.0"
create-hmac "^1.1.0"
diffie-hellman "^5.0.0"
inherits "^2.0.1"
pbkdf2 "^3.0.3"
public-encrypt "^4.0.0"
randombytes "^2.0.0"
randomfill "^1.0.3"

css-functions-list@^3.2.3:
version "3.2.3"
resolved "https://registry.yarnpkg.com/css-functions-list/-/css-functions-list-3.2.3.tgz#95652b0c24f0f59b291a9fc386041a19d4f40dbe"
Expand Down Expand Up @@ -8313,15 +8330,6 @@ react-window@^1.8.11:
"@babel/runtime" "^7.0.0"
memoize-one ">=3.1.1 <6"

"react@>=15.0.0 <17.0.0":
version "16.14.0"
resolved "https://registry.yarnpkg.com/react/-/react-16.14.0.tgz#94d776ddd0aaa37da3eda8fc5b6b18a4c9a3114d"
integrity sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==
dependencies:
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.2"

react@^18.2.0:
version "18.2.0"
resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5"
Expand Down Expand Up @@ -8924,7 +8932,16 @@ string-template@1.0.0:
resolved "https://registry.yarnpkg.com/string-template/-/string-template-1.0.0.tgz#9e9f2233dc00f218718ec379a28a5673ecca8b96"
integrity sha512-SLqR3GBUXuoPP5MmYtD7ompvXiG87QjT6lzOszyXjTM86Uu7At7vNnt2xgyTLq5o9T4IxTYFyGxcULqpsmsfdg==

"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand Down Expand Up @@ -8963,7 +8980,14 @@ stringz@2.1.0:
dependencies:
char-regex "^1.0.2"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand Down Expand Up @@ -9850,7 +9874,7 @@ word-wrap@^1.2.5, word-wrap@~1.2.3:
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34"
integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand All @@ -9868,6 +9892,15 @@ wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^8.0.1, wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
Expand Down