Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

21 web handle currency #104

Merged
merged 66 commits into from
Oct 11, 2023
Merged

21 web handle currency #104

merged 66 commits into from
Oct 11, 2023

Conversation

AlexandreG-tech
Copy link
Collaborator

No description provided.

@AlexandreG-tech AlexandreG-tech linked an issue Oct 6, 2023 that may be closed by this pull request
19 tasks
@vercel
Copy link

vercel bot commented Oct 6, 2023

@AlexandreG-tech is attempting to deploy a commit to the Offline Team on Vercel.

To accomplish this, @AlexandreG-tech needs to request access to the Team.

Afterwards, an owner of the Team is required to accept their membership request.

If you're already a member of the respective Vercel Team, make sure that your Personal Vercel Account is connected to your GitHub account.

@nx-cloud
Copy link

nx-cloud bot commented Oct 6, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 1c4a86c. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@AlexandreG-tech AlexandreG-tech temporarily deployed to staging October 6, 2023 06:31 — with GitHub Actions Inactive
@AlexandreG-tech AlexandreG-tech temporarily deployed to staging October 6, 2023 06:31 — with GitHub Actions Inactive
@AlexandreG-tech AlexandreG-tech temporarily deployed to staging October 6, 2023 06:31 — with GitHub Actions Inactive
@AlexandreG-tech AlexandreG-tech temporarily deployed to staging October 6, 2023 06:31 — with GitHub Actions Inactive
AlexandreG-tech and others added 2 commits October 6, 2023 09:51
fix: writeToFile rates

add: currency/api lib

fix: writeToFile rates

add: next-currency-cache functions

add: setRates cron job

fix: linter unknow instead of any

fix: linter unknow instead of any

fix: uncomment important code

fix: tests for currency/api and currency-cache
@sebpalluel sebpalluel force-pushed the 21-web-handle-currency branch from f83c4d8 to 94602c5 Compare October 6, 2023 09:08
@vercel
Copy link

vercel bot commented Oct 6, 2023

Deployment failed with the following error:

Error while validating your Cron Jobs expressions:

            - Expected 5 values, but got 7. (Input cron: '* * 0/6 ? * * *')

@sebpalluel sebpalluel temporarily deployed to staging October 6, 2023 09:08 — with GitHub Actions Inactive
@AlexandreG-tech AlexandreG-tech temporarily deployed to staging October 11, 2023 11:15 — with GitHub Actions Inactive
@AlexandreG-tech AlexandreG-tech temporarily deployed to staging October 11, 2023 11:15 — with GitHub Actions Inactive
@AlexandreG-tech AlexandreG-tech temporarily deployed to staging October 11, 2023 11:15 — with GitHub Actions Inactive
@AlexandreG-tech AlexandreG-tech temporarily deployed to staging October 11, 2023 11:28 — with GitHub Actions Inactive
@AlexandreG-tech AlexandreG-tech temporarily deployed to staging October 11, 2023 11:28 — with GitHub Actions Inactive
@AlexandreG-tech AlexandreG-tech temporarily deployed to staging October 11, 2023 11:28 — with GitHub Actions Inactive
@AlexandreG-tech AlexandreG-tech temporarily deployed to staging October 11, 2023 11:28 — with GitHub Actions Inactive
@sebpalluel sebpalluel marked this pull request as ready for review October 11, 2023 11:35
…to uppercase PORT to improve semantics

🔧 chore(server.ts): add support for process.env.PORT environment variable to be able to run app on a configurable port

🔥 refactor(types): remove unused .babelrc file

🔧 chore(types): update project.json and tsconfig.json paths for currency/types library

🔧 chore(createEventPassesSlice.ts): update import path for Money from @currency/types

✨ feat(cache): add .swcrc and package.json files

🔧 chore(cache): update project.json and tsconfig.json paths for next/cache library

🔧 chore(cache): update import path for Cache in next-currency-cache.spec.ts and next-currency-cache.ts

🔧 chore(currency): update tsconfig.json and tsconfig.lib.json files

🔧 chore(nft-thirdweb-api.ts): remove unused 'use server' statement

🔧 chore(tsconfig.base.json): remove unused import path for @next/cache/server
@sebpalluel sebpalluel temporarily deployed to staging October 11, 2023 12:49 — with GitHub Actions Inactive
@sebpalluel sebpalluel temporarily deployed to staging October 11, 2023 12:49 — with GitHub Actions Inactive
@sebpalluel sebpalluel temporarily deployed to staging October 11, 2023 12:49 — with GitHub Actions Inactive
…revent potential crashes

🔥 chore(payment-webhooks.spec.ts): remove unused payment webhooks test file
…o improve code coverage

🔧 chore(jest.config.ts): update regex pattern to include .ts files in transform to improve code coverage
🔧 chore(payment-admin.ts): cast eventSlug and organizerSlug to string to avoid potential null or undefined values
🔧 chore(package.json): add @types/text-encoding dependency to fix ReferenceError: TextDecoder is not defined
🔧 chore(jest.setup.ts): import and assign TextEncoder and TextDecoder from text-encoding to fix ReferenceError: TextDecoder is not defined
…revent unexpected behavior

🐛 fix(payment-webhooks.ts): remove unused line_items variable to improve code readability
…alytics component

🔧 fix(layout.tsx): update import path for siteConfig in Analytics component
🔧 fix(layout.tsx): add Metadata type import and define metadata object for page title
🔧 fix(next.config.js): remove unused appDir configuration
@sebpalluel sebpalluel temporarily deployed to staging October 11, 2023 15:25 — with GitHub Actions Inactive
@sebpalluel sebpalluel temporarily deployed to staging October 11, 2023 15:26 — with GitHub Actions Inactive
@sebpalluel sebpalluel temporarily deployed to staging October 11, 2023 15:26 — with GitHub Actions Inactive
@sebpalluel sebpalluel temporarily deployed to staging October 11, 2023 15:26 — with GitHub Actions Inactive
…re list to enable preview apps for staging branch

🔒 chore(preview-apps.yml): add VERCEL_ORG_ID environment variable to enable deployment to Vercel preview apps
@sebpalluel sebpalluel temporarily deployed to staging October 11, 2023 15:35 — with GitHub Actions Inactive
@sebpalluel sebpalluel temporarily deployed to staging October 11, 2023 15:35 — with GitHub Actions Inactive
@sebpalluel sebpalluel temporarily deployed to staging October 11, 2023 15:35 — with GitHub Actions Inactive
@sebpalluel sebpalluel temporarily deployed to staging October 11, 2023 15:35 — with GitHub Actions Inactive
@sebpalluel sebpalluel merged commit 1a9ff58 into staging Oct 11, 2023
7 of 8 checks passed
AlexandreG-tech added a commit that referenced this pull request Oct 12, 2023
* add: currency/api lib

* fix: writeToFile rates

* rebase

* fix: writeToFile rates

* add: next-currency-cache functions

* add: setRates cron job

* fix: next/currency-cache to ts config

* fix: linter unknow instead of any

* fix: linter unknow instead of any

* fix: uncomment important code

* fix: tests for currency/api and currency-cache

* rebase

fix: writeToFile rates

add: currency/api lib

fix: writeToFile rates

add: next-currency-cache functions

add: setRates cron job

fix: linter unknow instead of any

fix: linter unknow instead of any

fix: uncomment important code

fix: tests for currency/api and currency-cache

* add env variables changes and @shared/server to get env info

* fix: fix tests for currency-cache

* tsconfig add

* add: CurrencyProvider and provider settings

* fix: tsconfig.base.json

* add: currency-dropdown ui/components and icons

* fix: global settings props

* 🔧 chore(sentry.client.config.ts): remove unused code and simplify SENTRY_DSN assignment

* fix: usecontext back in eventpasses

* fix: currency provider in preview

* 🔧 chore(package.json): remove esbuild dependency to simplify the project dependencies
📦 feat(project.json): add project.json file to configure a local registry target for nx using verdaccio executor

* fix: currency settings and revalidateTag

* fix: isJestRunning for setRates tests

* test: without loading

* correct old version

* fix: currencyProvider

* fix: comment test rates

* fix: test without eventpasses

* fix: remove all formatCurrency

* fix: remove all formatCurrency

* fix: remove all formatCurrency in SinglePass

* fix: remove getREates from currencyProvider

* fix: put back tsconfig about storybook

* fix: getRates in currency provider with rfetch

* fix: PassTotal uncommented

* fix: PassTotal without loading

* fix: check if it's a test and return false rates

* 📦 chore(env-nextjs.mock.js): add mock file for @t3-oss/env-nextjs module to be used in Storybook
📦 chore(main.ts): add alias for @t3-oss/env-nextjs module to use the mock file in Storybook
📦 chore(preview.tsx): remove unnecessary import of CurrencyProvider and add CurrencyDecorator to wrap stories with CurrencyProvider
🐛 fix(index.tsx): replace fetchRates function with getRates function from @next/currency-cache module to improve code readability and maintainability

* fix: check if fetchFromLocalFile is problem

* fix: display args to check

* fix: display all key value of objects

* fix: display all key values

* fix: send only the concerned rate to formatCurrency

* fix: toUserCurrency to take only the rate of the user currency

* 🐛 fix(index.ts): fix file path to use __dirname instead of process.cwd() to correctly locate rates directory
🔥 chore(index.ts): remove commented out code for fetching from local JSON files and return default rates instead
🔥 chore(examples.tsx): remove unused import of Link from '@next/navigation'

* fix: rates in lib and absolute path for __dirname

* fix: swcrc file for currency/types

* fix: storybook story

* 🔧 chore(jest.preset.js): add support for import.meta in jest configuration to avoid issues with import.meta
🔧 chore(jest.config.ts): remove unnecessary transform configuration for ts-jest in jest configuration
📦 chore(package.json): add ts-jest-mock-import-meta package as a dependency for jest configuration

* fix: fix tests with import.meta and new EUR.json

* fix: no frozen lockfile

* fix: no frozen lockfile

* 🔥 refactor(server.ts): change port variable case from lowercase port to uppercase PORT to improve semantics

🔧 chore(server.ts): add support for process.env.PORT environment variable to be able to run app on a configurable port

🔥 refactor(types): remove unused .babelrc file

🔧 chore(types): update project.json and tsconfig.json paths for currency/types library

🔧 chore(createEventPassesSlice.ts): update import path for Money from @currency/types

✨ feat(cache): add .swcrc and package.json files

🔧 chore(cache): update project.json and tsconfig.json paths for next/cache library

🔧 chore(cache): update import path for Cache in next-currency-cache.spec.ts and next-currency-cache.ts

🔧 chore(currency): update tsconfig.json and tsconfig.lib.json files

🔧 chore(nft-thirdweb-api.ts): remove unused 'use server' statement

🔧 chore(tsconfig.base.json): remove unused import path for @next/cache/server

* 🐛 fix(nft-thirdweb-api.ts): add error handling for undefined SDK to prevent potential crashes
🔥 chore(payment-webhooks.spec.ts): remove unused payment webhooks test file

* 🔧 chore(.swcrc): remove unnecessary regex pattern from exclude list to improve code coverage
🔧 chore(jest.config.ts): update regex pattern to include .ts files in transform to improve code coverage
🔧 chore(payment-admin.ts): cast eventSlug and organizerSlug to string to avoid potential null or undefined values
🔧 chore(package.json): add @types/text-encoding dependency to fix ReferenceError: TextDecoder is not defined
🔧 chore(jest.setup.ts): import and assign TextEncoder and TextDecoder from text-encoding to fix ReferenceError: TextDecoder is not defined

* 🐛 fix(payment-admin.ts): throw an error if refund status is null to prevent unexpected behavior
🐛 fix(payment-webhooks.ts): remove unused line_items variable to improve code readability

* 🔧 fix(layout.tsx): remove unused import and update import path for Analytics component
🔧 fix(layout.tsx): update import path for siteConfig in Analytics component
🔧 fix(layout.tsx): add Metadata type import and define metadata object for page title
🔧 fix(next.config.js): remove unused appDir configuration

* 🔧 chore(tsconfig.base.json): optimize paths configuration for better readability and maintainability

* 🔧 chore(preview-apps.yml): remove 'staging' branch from branches-ignore list to enable preview apps for staging branch
🔒 chore(preview-apps.yml): add VERCEL_ORG_ID environment variable to enable deployment to Vercel preview apps

---------

Co-authored-by: sebpalluel <[email protected]>
sebpalluel added a commit that referenced this pull request Oct 19, 2023
* add: currency/api lib

* fix: writeToFile rates

* rebase

* fix: writeToFile rates

* add: next-currency-cache functions

* add: setRates cron job

* fix: next/currency-cache to ts config

* fix: linter unknow instead of any

* fix: linter unknow instead of any

* fix: uncomment important code

* fix: tests for currency/api and currency-cache

* rebase

fix: writeToFile rates

add: currency/api lib

fix: writeToFile rates

add: next-currency-cache functions

add: setRates cron job

fix: linter unknow instead of any

fix: linter unknow instead of any

fix: uncomment important code

fix: tests for currency/api and currency-cache

* add env variables changes and @shared/server to get env info

* fix: fix tests for currency-cache

* tsconfig add

* add: CurrencyProvider and provider settings

* fix: tsconfig.base.json

* add: currency-dropdown ui/components and icons

* fix: global settings props

* 🔧 chore(sentry.client.config.ts): remove unused code and simplify SENTRY_DSN assignment

* fix: usecontext back in eventpasses

* fix: currency provider in preview

* 🔧 chore(package.json): remove esbuild dependency to simplify the project dependencies
📦 feat(project.json): add project.json file to configure a local registry target for nx using verdaccio executor

* fix: currency settings and revalidateTag

* fix: isJestRunning for setRates tests

* test: without loading

* correct old version

* fix: currencyProvider

* fix: comment test rates

* fix: test without eventpasses

* fix: remove all formatCurrency

* fix: remove all formatCurrency

* fix: remove all formatCurrency in SinglePass

* fix: remove getREates from currencyProvider

* fix: put back tsconfig about storybook

* fix: getRates in currency provider with rfetch

* fix: PassTotal uncommented

* fix: PassTotal without loading

* fix: check if it's a test and return false rates

* 📦 chore(env-nextjs.mock.js): add mock file for @t3-oss/env-nextjs module to be used in Storybook
📦 chore(main.ts): add alias for @t3-oss/env-nextjs module to use the mock file in Storybook
📦 chore(preview.tsx): remove unnecessary import of CurrencyProvider and add CurrencyDecorator to wrap stories with CurrencyProvider
🐛 fix(index.tsx): replace fetchRates function with getRates function from @next/currency-cache module to improve code readability and maintainability

* fix: check if fetchFromLocalFile is problem

* fix: display args to check

* fix: display all key value of objects

* fix: display all key values

* fix: send only the concerned rate to formatCurrency

* fix: toUserCurrency to take only the rate of the user currency

* 🐛 fix(index.ts): fix file path to use __dirname instead of process.cwd() to correctly locate rates directory
🔥 chore(index.ts): remove commented out code for fetching from local JSON files and return default rates instead
🔥 chore(examples.tsx): remove unused import of Link from '@next/navigation'

* fix: rates in lib and absolute path for __dirname

* fix: swcrc file for currency/types

* fix: storybook story

* 🔧 chore(jest.preset.js): add support for import.meta in jest configuration to avoid issues with import.meta
🔧 chore(jest.config.ts): remove unnecessary transform configuration for ts-jest in jest configuration
📦 chore(package.json): add ts-jest-mock-import-meta package as a dependency for jest configuration

* fix: fix tests with import.meta and new EUR.json

* fix: no frozen lockfile

* fix: no frozen lockfile

* 🔥 refactor(server.ts): change port variable case from lowercase port to uppercase PORT to improve semantics

🔧 chore(server.ts): add support for process.env.PORT environment variable to be able to run app on a configurable port

🔥 refactor(types): remove unused .babelrc file

🔧 chore(types): update project.json and tsconfig.json paths for currency/types library

🔧 chore(createEventPassesSlice.ts): update import path for Money from @currency/types

✨ feat(cache): add .swcrc and package.json files

🔧 chore(cache): update project.json and tsconfig.json paths for next/cache library

🔧 chore(cache): update import path for Cache in next-currency-cache.spec.ts and next-currency-cache.ts

🔧 chore(currency): update tsconfig.json and tsconfig.lib.json files

🔧 chore(nft-thirdweb-api.ts): remove unused 'use server' statement

🔧 chore(tsconfig.base.json): remove unused import path for @next/cache/server

* 🐛 fix(nft-thirdweb-api.ts): add error handling for undefined SDK to prevent potential crashes
🔥 chore(payment-webhooks.spec.ts): remove unused payment webhooks test file

* 🔧 chore(.swcrc): remove unnecessary regex pattern from exclude list to improve code coverage
🔧 chore(jest.config.ts): update regex pattern to include .ts files in transform to improve code coverage
🔧 chore(payment-admin.ts): cast eventSlug and organizerSlug to string to avoid potential null or undefined values
🔧 chore(package.json): add @types/text-encoding dependency to fix ReferenceError: TextDecoder is not defined
🔧 chore(jest.setup.ts): import and assign TextEncoder and TextDecoder from text-encoding to fix ReferenceError: TextDecoder is not defined

* 🐛 fix(payment-admin.ts): throw an error if refund status is null to prevent unexpected behavior
🐛 fix(payment-webhooks.ts): remove unused line_items variable to improve code readability

* 🔧 fix(layout.tsx): remove unused import and update import path for Analytics component
🔧 fix(layout.tsx): update import path for siteConfig in Analytics component
🔧 fix(layout.tsx): add Metadata type import and define metadata object for page title
🔧 fix(next.config.js): remove unused appDir configuration

* 🔧 chore(tsconfig.base.json): optimize paths configuration for better readability and maintainability

* 🔧 chore(preview-apps.yml): remove 'staging' branch from branches-ignore list to enable preview apps for staging branch
🔒 chore(preview-apps.yml): add VERCEL_ORG_ID environment variable to enable deployment to Vercel preview apps

---------

Co-authored-by: sebpalluel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Web, handle currency
2 participants