From 82fcfcf021a88bf2d510661f6a2143c36e5ebc1a Mon Sep 17 00:00:00 2001 From: toniocodo Date: Fri, 8 Sep 2023 12:46:27 +0200 Subject: [PATCH] feat: remove unused libs, remove oeth wrap page --- apps/oeth/src/App.tsx | 2 - apps/oeth/src/components/Topnav.tsx | 1 - apps/ousd/src/components/index.tsx | 8 +- libs/defi/oeth/.babelrc | 12 - libs/defi/oeth/.eslintrc.json | 18 - libs/defi/oeth/.storybook/main.ts | 26 - libs/defi/oeth/.storybook/preview.tsx | 3 - libs/defi/oeth/README.md | 7 - libs/defi/oeth/project.json | 41 - .../History/HistoryButton.stories.tsx | 30 - .../src/components/History/HistoryButton.tsx | 69 -- .../src/components/History/HistoryCard.tsx | 83 -- .../History/HistoryTable.stories.tsx | 101 -- .../src/components/History/HistoryTable.tsx | 97 -- .../oeth/src/components/History/fixtures.ts | 1052 ----------------- .../oeth/src/components/History/index.tsx | 1 - .../oeth/src/components/Swap/BestRoutes.tsx | 33 - .../components/Swap/GasPopover.stories.tsx | 36 - .../oeth/src/components/Swap/GasPopover.tsx | 200 ---- .../src/components/Swap/RedeemMix.stories.tsx | 94 -- .../oeth/src/components/Swap/RedeemMix.tsx | 191 --- .../oeth/src/components/Swap/Swap.stories.tsx | 25 - libs/defi/oeth/src/components/Swap/Swap.tsx | 171 --- .../oeth/src/components/Swap/SwapInfo.tsx | 44 - .../src/components/Swap/SwapRoute.stories.tsx | 56 - .../oeth/src/components/Swap/SwapRoute.tsx | 113 -- .../Swap/SwapRouteAccordion.stories.tsx | 33 - .../components/Swap/SwapRouteAccordion.tsx | 110 -- .../Swap/SwapRouteAccordionItem.stories.tsx | 61 - .../Swap/SwapRouteAccordionItem.tsx | 136 --- .../components/Swap/SwapRouteCard.stories.tsx | 86 -- .../src/components/Swap/SwapRouteCard.tsx | 196 --- .../defi/oeth/src/components/Swap/fixtures.ts | 61 - libs/defi/oeth/src/components/Swap/index.tsx | 2 - .../oeth/src/components/Wrap/SwapWrap.tsx | 59 - libs/defi/oeth/src/components/Wrap/index.tsx | 1 - libs/defi/oeth/src/components/defi-oeth.tsx | 15 - libs/defi/oeth/src/components/index.tsx | 4 - .../src/components/shared/APY.stories.tsx | 47 - libs/defi/oeth/src/components/shared/APY.tsx | 217 ---- .../defi/oeth/src/components/shared/index.tsx | 1 - libs/defi/oeth/src/constants.ts | 11 - libs/defi/oeth/src/index.ts | 1 - libs/defi/oeth/src/views/History.tsx | 10 - libs/defi/oeth/src/views/Swap.tsx | 15 - libs/defi/oeth/src/views/Wrap.tsx | 50 - libs/defi/oeth/src/views/index.tsx | 3 - libs/defi/oeth/tsconfig.json | 20 - libs/defi/oeth/tsconfig.lib.json | 27 - libs/defi/oeth/tsconfig.storybook.json | 31 - libs/defi/ousd/.babelrc | 12 - libs/defi/ousd/.eslintrc.json | 18 - libs/defi/ousd/.storybook/main.ts | 26 - libs/defi/ousd/.storybook/preview.tsx | 3 - libs/defi/ousd/README.md | 7 - libs/defi/ousd/project.json | 41 - libs/defi/ousd/src/components/defi-ousd.tsx | 15 - libs/defi/ousd/src/index.ts | 1 - libs/defi/ousd/tsconfig.json | 20 - libs/defi/ousd/tsconfig.lib.json | 27 - libs/defi/ousd/tsconfig.storybook.json | 31 - libs/oeth/wrap/.babelrc | 12 - libs/oeth/wrap/.eslintrc.json | 34 - libs/oeth/wrap/README.md | 7 - libs/oeth/wrap/project.json | 20 - libs/oeth/wrap/src/components/SwapWrap.tsx | 60 - libs/oeth/wrap/src/index.ts | 1 - libs/oeth/wrap/src/views/WrapView.tsx | 50 - libs/oeth/wrap/tsconfig.json | 17 - libs/oeth/wrap/tsconfig.lib.json | 24 - tsconfig.base.json | 9 - 71 files changed, 1 insertion(+), 4145 deletions(-) delete mode 100644 libs/defi/oeth/.babelrc delete mode 100644 libs/defi/oeth/.eslintrc.json delete mode 100644 libs/defi/oeth/.storybook/main.ts delete mode 100644 libs/defi/oeth/.storybook/preview.tsx delete mode 100644 libs/defi/oeth/README.md delete mode 100644 libs/defi/oeth/project.json delete mode 100644 libs/defi/oeth/src/components/History/HistoryButton.stories.tsx delete mode 100644 libs/defi/oeth/src/components/History/HistoryButton.tsx delete mode 100644 libs/defi/oeth/src/components/History/HistoryCard.tsx delete mode 100644 libs/defi/oeth/src/components/History/HistoryTable.stories.tsx delete mode 100644 libs/defi/oeth/src/components/History/HistoryTable.tsx delete mode 100644 libs/defi/oeth/src/components/History/fixtures.ts delete mode 100644 libs/defi/oeth/src/components/History/index.tsx delete mode 100644 libs/defi/oeth/src/components/Swap/BestRoutes.tsx delete mode 100644 libs/defi/oeth/src/components/Swap/GasPopover.stories.tsx delete mode 100644 libs/defi/oeth/src/components/Swap/GasPopover.tsx delete mode 100644 libs/defi/oeth/src/components/Swap/RedeemMix.stories.tsx delete mode 100644 libs/defi/oeth/src/components/Swap/RedeemMix.tsx delete mode 100644 libs/defi/oeth/src/components/Swap/Swap.stories.tsx delete mode 100644 libs/defi/oeth/src/components/Swap/Swap.tsx delete mode 100644 libs/defi/oeth/src/components/Swap/SwapInfo.tsx delete mode 100644 libs/defi/oeth/src/components/Swap/SwapRoute.stories.tsx delete mode 100644 libs/defi/oeth/src/components/Swap/SwapRoute.tsx delete mode 100644 libs/defi/oeth/src/components/Swap/SwapRouteAccordion.stories.tsx delete mode 100644 libs/defi/oeth/src/components/Swap/SwapRouteAccordion.tsx delete mode 100644 libs/defi/oeth/src/components/Swap/SwapRouteAccordionItem.stories.tsx delete mode 100644 libs/defi/oeth/src/components/Swap/SwapRouteAccordionItem.tsx delete mode 100644 libs/defi/oeth/src/components/Swap/SwapRouteCard.stories.tsx delete mode 100644 libs/defi/oeth/src/components/Swap/SwapRouteCard.tsx delete mode 100644 libs/defi/oeth/src/components/Swap/fixtures.ts delete mode 100644 libs/defi/oeth/src/components/Swap/index.tsx delete mode 100644 libs/defi/oeth/src/components/Wrap/SwapWrap.tsx delete mode 100644 libs/defi/oeth/src/components/Wrap/index.tsx delete mode 100644 libs/defi/oeth/src/components/defi-oeth.tsx delete mode 100644 libs/defi/oeth/src/components/index.tsx delete mode 100644 libs/defi/oeth/src/components/shared/APY.stories.tsx delete mode 100644 libs/defi/oeth/src/components/shared/APY.tsx delete mode 100644 libs/defi/oeth/src/components/shared/index.tsx delete mode 100644 libs/defi/oeth/src/constants.ts delete mode 100644 libs/defi/oeth/src/index.ts delete mode 100644 libs/defi/oeth/src/views/History.tsx delete mode 100644 libs/defi/oeth/src/views/Swap.tsx delete mode 100644 libs/defi/oeth/src/views/Wrap.tsx delete mode 100644 libs/defi/oeth/src/views/index.tsx delete mode 100644 libs/defi/oeth/tsconfig.json delete mode 100644 libs/defi/oeth/tsconfig.lib.json delete mode 100644 libs/defi/oeth/tsconfig.storybook.json delete mode 100644 libs/defi/ousd/.babelrc delete mode 100644 libs/defi/ousd/.eslintrc.json delete mode 100644 libs/defi/ousd/.storybook/main.ts delete mode 100644 libs/defi/ousd/.storybook/preview.tsx delete mode 100644 libs/defi/ousd/README.md delete mode 100644 libs/defi/ousd/project.json delete mode 100644 libs/defi/ousd/src/components/defi-ousd.tsx delete mode 100644 libs/defi/ousd/src/index.ts delete mode 100644 libs/defi/ousd/tsconfig.json delete mode 100644 libs/defi/ousd/tsconfig.lib.json delete mode 100644 libs/defi/ousd/tsconfig.storybook.json delete mode 100644 libs/oeth/wrap/.babelrc delete mode 100644 libs/oeth/wrap/.eslintrc.json delete mode 100644 libs/oeth/wrap/README.md delete mode 100644 libs/oeth/wrap/project.json delete mode 100644 libs/oeth/wrap/src/components/SwapWrap.tsx delete mode 100644 libs/oeth/wrap/src/index.ts delete mode 100644 libs/oeth/wrap/src/views/WrapView.tsx delete mode 100644 libs/oeth/wrap/tsconfig.json delete mode 100644 libs/oeth/wrap/tsconfig.lib.json diff --git a/apps/oeth/src/App.tsx b/apps/oeth/src/App.tsx index 96852dc70..fe38e4a42 100644 --- a/apps/oeth/src/App.tsx +++ b/apps/oeth/src/App.tsx @@ -2,7 +2,6 @@ import { Container, Stack } from '@mui/material'; import { HistoryView } from '@origin/oeth/history'; import { ApyHeader } from '@origin/oeth/shared'; import { SwapView } from '@origin/oeth/swap'; -import { WrapView } from '@origin/oeth/wrap'; import { Route, Routes } from 'react-router-dom'; import { Topnav } from './components/Topnav'; @@ -28,7 +27,6 @@ export function App() { } /> - } /> } /> } /> diff --git a/apps/oeth/src/components/Topnav.tsx b/apps/oeth/src/components/Topnav.tsx index 921d3063d..ba85987fc 100644 --- a/apps/oeth/src/components/Topnav.tsx +++ b/apps/oeth/src/components/Topnav.tsx @@ -108,7 +108,6 @@ export function Topnav(props: BoxProps) { > {[ intl.formatMessage({ defaultMessage: 'Swap' }), - intl.formatMessage({ defaultMessage: 'Wrap' }), intl.formatMessage({ defaultMessage: 'History' }), ].map((tab) => ( -

{intl.formatMessage({ defaultMessage: 'test OUSD' })}

- - - ); + return

{intl.formatMessage({ defaultMessage: 'test OUSD' })}

; } diff --git a/libs/defi/oeth/.babelrc b/libs/defi/oeth/.babelrc deleted file mode 100644 index 1ea870ead..000000000 --- a/libs/defi/oeth/.babelrc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "presets": [ - [ - "@nx/react/babel", - { - "runtime": "automatic", - "useBuiltIns": "usage" - } - ] - ], - "plugins": [] -} diff --git a/libs/defi/oeth/.eslintrc.json b/libs/defi/oeth/.eslintrc.json deleted file mode 100644 index 75b85077d..000000000 --- a/libs/defi/oeth/.eslintrc.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": ["plugin:@nx/react", "../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], - "rules": {} - }, - { - "files": ["*.ts", "*.tsx"], - "rules": {} - }, - { - "files": ["*.js", "*.jsx"], - "rules": {} - } - ] -} diff --git a/libs/defi/oeth/.storybook/main.ts b/libs/defi/oeth/.storybook/main.ts deleted file mode 100644 index 257218aac..000000000 --- a/libs/defi/oeth/.storybook/main.ts +++ /dev/null @@ -1,26 +0,0 @@ -const config = { - stories: ['../src/**/*.stories.@(js|jsx|ts|tsx|mdx)'], - addons: ['@storybook/addon-essentials'], - framework: { - name: '@storybook/react-vite', - options: { - builder: { - viteConfigPath: `${__dirname}/../../../shared/storybook/vite.config.ts`, - }, - }, - }, - typescript: { - check: true, - checkOptions: { - typescript: { - configFile: `${__dirname}/../tsconfig.storybook.json`, - }, - }, - }, -}; - -export default config; - -// To customize your Vite configuration you can use the viteFinal field. -// Check https://storybook.js.org/docs/react/builders/vite#configuration -// and https://nx.dev/packages/storybook/documents/custom-builder-configs diff --git a/libs/defi/oeth/.storybook/preview.tsx b/libs/defi/oeth/.storybook/preview.tsx deleted file mode 100644 index d7cc85f52..000000000 --- a/libs/defi/oeth/.storybook/preview.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import preview from '@origin/shared/storybook'; - -export default preview; diff --git a/libs/defi/oeth/README.md b/libs/defi/oeth/README.md deleted file mode 100644 index d942edcab..000000000 --- a/libs/defi/oeth/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# defi-oeth - -This library was generated with [Nx](https://nx.dev). - -## Running unit tests - -Run `nx test defi-oeth` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/libs/defi/oeth/project.json b/libs/defi/oeth/project.json deleted file mode 100644 index d42f06bf0..000000000 --- a/libs/defi/oeth/project.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "defi-oeth", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "libs/defi/oeth/src", - "projectType": "library", - "tags": [], - "targets": { - "lint": { - "executor": "@nx/linter:eslint", - "outputs": ["{options.outputFile}"], - "options": { - "lintFilePatterns": ["libs/defi/oeth/**/*.{ts,tsx,js,jsx}"] - } - }, - "storybook": { - "executor": "@nx/storybook:storybook", - "options": { - "port": 4400, - "configDir": "libs/defi/oeth/.storybook" - }, - "configurations": { - "ci": { - "quiet": true - } - } - }, - "build-storybook": { - "executor": "@nx/storybook:build", - "outputs": ["{options.outputDir}"], - "options": { - "outputDir": "dist/storybook/defi-oeth", - "configDir": "libs/defi/oeth/.storybook" - }, - "configurations": { - "ci": { - "quiet": true - } - } - } - } -} diff --git a/libs/defi/oeth/src/components/History/HistoryButton.stories.tsx b/libs/defi/oeth/src/components/History/HistoryButton.stories.tsx deleted file mode 100644 index 6943e2112..000000000 --- a/libs/defi/oeth/src/components/History/HistoryButton.stories.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { HistoryFilterButton } from './HistoryButton'; - -import type { Meta, StoryObj } from '@storybook/react'; - -const meta: Meta = { - component: HistoryFilterButton, - title: 'History/History filter button', - args: { - circle: false, - children: 'Test', - }, - render: (args) => , -}; - -export default meta; - -export const Primary: StoryObj = {}; - -export const WithCircle: StoryObj = { - args: { - circle: true, - }, -}; - -export const Selected: StoryObj = { - args: { - circle: true, - selected: true, - }, -}; diff --git a/libs/defi/oeth/src/components/History/HistoryButton.tsx b/libs/defi/oeth/src/components/History/HistoryButton.tsx deleted file mode 100644 index 9c5f4b672..000000000 --- a/libs/defi/oeth/src/components/History/HistoryButton.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import { alpha, Box, Button } from '@mui/material'; - -import type { ButtonProps, SxProps } from '@mui/material'; -import type { Theme } from '@origin/shared/theme'; - -interface Props extends ButtonProps { - circle?: boolean; - selected?: boolean; -} - -export function HistoryFilterButton({ - children, - circle = false, - onClick, - selected = false, - sx, - ...rest -}: Props) { - return ( - - ); -} - -function Circle({ sx }: { sx: SxProps }) { - return ( - theme.palette.background.default, - height: '0.5rem', - width: '0.5rem', - borderRadius: '100%', - ...sx, - }} - /> - ); -} diff --git a/libs/defi/oeth/src/components/History/HistoryCard.tsx b/libs/defi/oeth/src/components/History/HistoryCard.tsx deleted file mode 100644 index c13d944c7..000000000 --- a/libs/defi/oeth/src/components/History/HistoryCard.tsx +++ /dev/null @@ -1,83 +0,0 @@ -import { useState } from 'react'; - -import { Box, Button, Stack, Typography } from '@mui/material'; -import { Card } from '@origin/shared/components'; -import { useIntl } from 'react-intl'; - -import { HistoryFilterButton } from './HistoryButton'; -import { HistoryTable } from './HistoryTable'; - -import type { ColumnFilter } from '@tanstack/react-table'; - -export function HistoryCard() { - const [isConnected, setConnectionState] = useState(false); - const intl = useIntl(); - const [filter, setFilter] = useState({ - id: 'type', - value: [], - }); - - function filterRows(value: string) { - setFilter((prev) => { - if ((prev.value as string[]).includes(value)) { - return { - ...prev, - value: [...(prev.value as string[]).filter((val) => val !== value)], - }; - } else { - return { - ...prev, - value: [...(prev.value as string[]), value], - }; - } - }); - } - return ( - - History - - {[ - intl.formatMessage({ defaultMessage: 'Received' }), - intl.formatMessage({ defaultMessage: 'Sent' }), - intl.formatMessage({ defaultMessage: 'Swap' }), - intl.formatMessage({ defaultMessage: 'Yield' }), - ].map((label) => ( - filterRows(label.toLowerCase())} - > - {label} - - ))} - - - {intl.formatMessage({ defaultMessage: 'Export CSV' })} - -
- } - > - {isConnected ? ( - - ) : ( - - - {intl.formatMessage({ - defaultMessage: 'Connect your wallet to see your history', - })} - - - - )} - - ); -} diff --git a/libs/defi/oeth/src/components/History/HistoryTable.stories.tsx b/libs/defi/oeth/src/components/History/HistoryTable.stories.tsx deleted file mode 100644 index 9aae7936d..000000000 --- a/libs/defi/oeth/src/components/History/HistoryTable.stories.tsx +++ /dev/null @@ -1,101 +0,0 @@ -import { useState } from 'react'; - -import { Container, Stack, Typography } from '@mui/material'; -import { within } from '@storybook/testing-library'; - -import { rows } from './fixtures'; -import { HistoryFilterButton } from './HistoryButton'; -import { HistoryTable } from './HistoryTable'; - -import type { Meta, StoryObj } from '@storybook/react'; -import type { ColumnFilter } from '@tanstack/react-table'; - -const WithFilters = () => { - const [filter, setFilter] = useState({ id: 'type', value: [] }); - return ( - - - History - - {['Received', 'Sent', 'Swap', 'Yield'].map((label) => ( - - setFilter((prev) => { - const filter = label.toLowerCase(); - if ((prev.value as string[]).includes(filter)) { - return { - ...prev, - value: [ - ...(prev.value as string[]).filter( - (val) => val !== filter, - ), - ], - }; - } else { - return { - ...prev, - value: [...(prev.value as string[]), filter], - }; - } - }) - } - circle - > - {label} - - ))} - - - {/* @ts-expect-error type mismatch with fixtures */} - - - ); -}; - -const meta: Meta = { - component: HistoryTable, - title: 'History/History table', - args: { - isLoading: false, - // @ts-expect-error type mismatch - rows, - }, - render: (args) => ( - - - - ), -}; -export default meta; - -export const Primary = { - args: {}, -}; - -export const Filter: StoryObj = { - render: () => ( - - - - ), -}; - -export const SelectedFilters: StoryObj = { - render: () => ( - - - - ), - play: async ({ canvasElement }) => { - const canvas = within(canvasElement); - await canvas.getByText('Received').click(); - await canvas.getByText('Yield').click(); - }, -}; diff --git a/libs/defi/oeth/src/components/History/HistoryTable.tsx b/libs/defi/oeth/src/components/History/HistoryTable.tsx deleted file mode 100644 index 95698dd6a..000000000 --- a/libs/defi/oeth/src/components/History/HistoryTable.tsx +++ /dev/null @@ -1,97 +0,0 @@ -import { useEffect, useMemo, useRef } from 'react'; - -import { Box, Stack } from '@mui/material'; -import { DataTable, LinkIcon, quantityFormat } from '@origin/shared/components'; -import { createColumnHelper } from '@tanstack/react-table'; -import { useIntl } from 'react-intl'; - -import type { DataTableRef } from '@origin/shared/components'; -import type { ColumnFilter } from '@tanstack/react-table'; - -type Filter = 'swap' | 'yield' | 'received' | 'sent'; - -export interface HistoryRow { - date: Date; - type: Filter; - change: number; - balance: number; - link: string; - [key: string]: unknown; -} - -interface Props { - rows: HistoryRow[]; - isLoading: boolean; - filter: ColumnFilter; -} - -const columnHelper = createColumnHelper(); - -export function HistoryTable({ rows, filter, isLoading }: Props) { - const intl = useIntl(); - const ref = useRef(null); - - const columns = useMemo( - () => [ - columnHelper.accessor('date', { - cell: (info) => intl.formatDate(info.getValue()), - header: intl.formatMessage({ defaultMessage: 'Date' }), - }), - columnHelper.accessor('type', { - id: 'type', - cell: (info) => info.getValue(), - header: intl.formatMessage({ defaultMessage: 'Type' }), - enableColumnFilter: true, - filterFn: (row, _, value) => { - if (!value.value.length) return true; - return value.value.includes(row.original.type); - }, - }), - columnHelper.accessor('change', { - cell: (info) => intl.formatNumber(info.getValue(), quantityFormat), - header: intl.formatMessage({ defaultMessage: 'Change' }), - }), - columnHelper.accessor('balance', { - cell: (info) => ( - - - {intl.formatNumber(info.getValue(), quantityFormat)} - - - - - ), - header: intl.formatMessage({ defaultMessage: 'OETH Balance' }), - }), - ], - [intl], - ); - - useEffect(() => { - ref?.current?.setFilter(filter, 'type'); - }, [filter]); - - return ( - - ); -} diff --git a/libs/defi/oeth/src/components/History/fixtures.ts b/libs/defi/oeth/src/components/History/fixtures.ts deleted file mode 100644 index c9310ed0c..000000000 --- a/libs/defi/oeth/src/components/History/fixtures.ts +++ /dev/null @@ -1,1052 +0,0 @@ -export const rows = [ - { - date: '2023-08-09T09:24:28.392Z', - balance: 2905823500, - change: -8.708203432615846, - type: 'sent', - link: 'https://fixed-killing.net/', - }, - { - date: '2023-08-15T22:12:30.081Z', - balance: 844700630, - change: -9.270400318782777, - type: 'yield', - link: 'https://slim-styling.info', - }, - { - date: '2023-08-20T07:01:48.590Z', - balance: 1657474870, - change: 9.077522575389594, - type: 'sent', - link: 'https://milky-grandchild.name', - }, - { - date: '2023-08-06T22:10:47.654Z', - balance: 7383296180, - change: 8.149598793825135, - type: 'yield', - link: 'https://creative-group.name', - }, - { - date: '2023-08-03T06:54:51.975Z', - balance: 8167162390, - change: 7.759596772957593, - type: 'swap', - link: 'https://magnificent-treat.org/', - }, - { - date: '2023-08-13T05:23:36.673Z', - balance: 5229696650, - change: -4.359190490795299, - type: 'sent', - link: 'https://spotted-anesthesiologist.biz/', - }, - { - date: '2023-08-04T01:13:52.464Z', - balance: 4458535780, - change: -9.770266831619665, - type: 'received', - link: 'https://bare-muskrat.name/', - }, - { - date: '2023-08-19T03:04:49.081Z', - balance: 2513642140, - change: 18.21222705533728, - type: 'sent', - link: 'https://self-reliant-yam.info', - }, - { - date: '2023-07-26T03:56:14.395Z', - balance: 843777780, - change: 18.715593725210056, - type: 'swap', - link: 'https://perfumed-happening.org/', - }, - { - date: '2023-08-09T03:11:46.580Z', - balance: 596396680, - change: 1.9720372662413865, - type: 'received', - link: 'https://naughty-imagination.com', - }, - { - date: '2023-08-18T23:12:50.114Z', - balance: 8750886350, - change: 10.70621510851197, - type: 'received', - link: 'https://open-reprocessing.biz', - }, - { - date: '2023-07-24T15:07:06.628Z', - balance: 8322847100, - change: -9.620051335077733, - type: 'yield', - link: 'https://barren-journalist.biz', - }, - { - date: '2023-07-29T19:06:09.805Z', - balance: 636697010, - change: 10.078663516324013, - type: 'received', - link: 'https://whispered-anguish.net/', - }, - { - date: '2023-08-08T07:49:24.348Z', - balance: 4022903100, - change: -3.815771577646956, - type: 'swap', - link: 'https://firm-inversion.net/', - }, - { - date: '2023-07-30T02:08:30.121Z', - balance: 9292536560, - change: 6.059687343658879, - type: 'yield', - link: 'https://vigilant-recapitulation.com/', - }, - { - date: '2023-08-23T22:11:44.622Z', - balance: 3610512300, - change: 12.880512519041076, - type: 'sent', - link: 'https://perfumed-judgment.net/', - }, - { - date: '2023-08-19T10:28:23.081Z', - balance: 2270149970, - change: 10.585962830809876, - type: 'swap', - link: 'https://lawful-councilor.biz/', - }, - { - date: '2023-08-12T16:24:25.785Z', - balance: 6525393130, - change: -4.815741195343435, - type: 'received', - link: 'https://political-tract.name', - }, - { - date: '2023-08-01T18:48:07.428Z', - balance: 5050409710, - change: 4.072673523332924, - type: 'received', - link: 'https://creamy-job.org', - }, - { - date: '2023-08-16T19:17:43.237Z', - balance: 276207460, - change: -3.763450221158564, - type: 'sent', - link: 'https://inconsequential-dozen.net/', - }, - { - date: '2023-08-08T04:50:22.008Z', - balance: 5836661640, - change: 4.948086115764454, - type: 'swap', - link: 'https://plump-webpage.net/', - }, - { - date: '2023-07-30T02:10:47.594Z', - balance: 9709654270, - change: 7.666684470605105, - type: 'sent', - link: 'https://insidious-weekender.com/', - }, - { - date: '2023-08-10T20:13:20.875Z', - balance: 7836963680, - change: -4.659254213329405, - type: 'sent', - link: 'https://speedy-softdrink.info/', - }, - { - date: '2023-07-31T01:35:29.660Z', - balance: 7638311180, - change: -8.740590022644028, - type: 'yield', - link: 'https://grateful-pathogenesis.com', - }, - { - date: '2023-08-16T20:13:53.362Z', - balance: 8572619970, - change: -0.7305871462449431, - type: 'swap', - link: 'https://weak-grit.net', - }, - { - date: '2023-08-09T20:08:42.465Z', - balance: 1902293040, - change: 12.399773884098977, - type: 'swap', - link: 'https://frank-fencing.net/', - }, - { - date: '2023-08-24T14:20:38.983Z', - balance: 4786790460, - change: 2.432553342077881, - type: 'yield', - link: 'https://classic-regionalism.com', - }, - { - date: '2023-07-27T20:27:16.017Z', - balance: 7745072020, - change: -7.67745430348441, - type: 'swap', - link: 'https://nervous-confectionery.biz', - }, - { - date: '2023-08-07T18:15:52.094Z', - balance: 8886290650, - change: -5.531949570868164, - type: 'received', - link: 'https://jaded-phrase.net/', - }, - { - date: '2023-08-03T02:41:25.923Z', - balance: 9154576050, - change: 13.174208792624995, - type: 'sent', - link: 'https://courageous-walnut.com', - }, - { - date: '2023-08-09T04:06:35.138Z', - balance: 4518435720, - change: 15.643867878243327, - type: 'yield', - link: 'https://cooked-everybody.org/', - }, - { - date: '2023-07-27T04:56:40.838Z', - balance: 3989631390, - change: -1.094570824643597, - type: 'sent', - link: 'https://royal-ecliptic.biz/', - }, - { - date: '2023-08-01T08:14:00.584Z', - balance: 6886920130, - change: -2.7221622632350773, - type: 'yield', - link: 'https://new-banyan.org', - }, - { - date: '2023-08-09T23:54:33.670Z', - balance: 4347283380, - change: -1.0765372531022877, - type: 'sent', - link: 'https://conscious-leading.info', - }, - { - date: '2023-08-07T03:39:55.953Z', - balance: 3343251380, - change: 2.493433946510777, - type: 'yield', - link: 'https://fancy-cauliflower.org', - }, - { - date: '2023-07-27T23:43:31.961Z', - balance: 2466109540, - change: 14.945782331051305, - type: 'received', - link: 'https://minor-hellcat.org', - }, - { - date: '2023-08-04T06:50:24.497Z', - balance: 5950003620, - change: -3.7749596126377583, - type: 'sent', - link: 'https://valid-collaboration.com/', - }, - { - date: '2023-08-12T01:10:23.717Z', - balance: 4664512610, - change: 9.078100132755935, - type: 'swap', - link: 'https://muddy-barge.name', - }, - { - date: '2023-08-02T18:31:08.177Z', - balance: 3267278300, - change: 2.896045239176601, - type: 'sent', - link: 'https://healthy-armchair.name/', - }, - { - date: '2023-08-06T13:39:10.559Z', - balance: 5091366940, - change: 7.557168318890035, - type: 'yield', - link: 'https://lonely-waterwheel.biz/', - }, - { - date: '2023-08-07T11:41:08.714Z', - balance: 1948535790, - change: 20.446028797887266, - type: 'yield', - link: 'https://any-serval.name/', - }, - { - date: '2023-07-25T23:19:14.539Z', - balance: 9502426210, - change: -3.571468291338533, - type: 'received', - link: 'https://apt-chipmunk.net', - }, - { - date: '2023-08-04T16:27:00.392Z', - balance: 3086756500, - change: 11.703390107722953, - type: 'yield', - link: 'https://elegant-rancher.net/', - }, - { - date: '2023-08-02T00:49:04.218Z', - balance: 4359492790, - change: 4.026034857379273, - type: 'yield', - link: 'https://flowery-mascara.com', - }, - { - date: '2023-08-08T22:58:36.968Z', - balance: 6365044610, - change: 0.47157082124613225, - type: 'received', - link: 'https://ordinary-bee.com/', - }, - { - date: '2023-08-20T22:17:27.336Z', - balance: 2443112950, - change: 17.89905706536956, - type: 'yield', - link: 'https://impeccable-heirloom.com/', - }, - { - date: '2023-08-10T13:53:41.471Z', - balance: 4940397110, - change: 15.650188649306074, - type: 'sent', - link: 'https://dimpled-membership.org/', - }, - { - date: '2023-08-24T04:08:40.603Z', - balance: 8529300070, - change: 6.192756824893877, - type: 'yield', - link: 'https://gruesome-driveway.biz', - }, - { - date: '2023-08-14T17:11:01.638Z', - balance: 9836327800, - change: -3.895446005044505, - type: 'received', - link: 'https://feminine-honeydew.org/', - }, - { - date: '2023-08-11T22:45:24.587Z', - balance: 9234169940, - change: -6.109909208025783, - type: 'swap', - link: 'https://glum-value.net/', - }, - { - date: '2023-08-02T03:08:45.464Z', - balance: 50482640, - change: -8.19172924850136, - type: 'yield', - link: 'https://elegant-eurocentrism.biz/', - }, - { - date: '2023-08-03T13:59:43.292Z', - balance: 4904208130, - change: 14.849995655240491, - type: 'received', - link: 'https://little-marketer.name', - }, - { - date: '2023-07-22T21:32:21.914Z', - balance: 2065554380, - change: -8.90812263241969, - type: 'received', - link: 'https://single-humanity.name/', - }, - { - date: '2023-07-25T10:36:38.363Z', - balance: 7074928980, - change: 21.41129512572661, - type: 'received', - link: 'https://reckless-leopard.net/', - }, - { - date: '2023-07-21T18:14:45.427Z', - balance: 3596745580, - change: 0.13369130319915712, - type: 'sent', - link: 'https://ignorant-justification.name/', - }, - { - date: '2023-08-16T13:55:57.957Z', - balance: 4940343570, - change: 21.468565927352756, - type: 'sent', - link: 'https://troubled-adoption.info/', - }, - { - date: '2023-08-15T16:31:26.306Z', - balance: 5368313310, - change: 6.284740898991004, - type: 'yield', - link: 'https://sinful-vibraphone.biz', - }, - { - date: '2023-08-06T02:09:55.394Z', - balance: 9049889290, - change: 17.24372491822578, - type: 'swap', - link: 'https://linear-analytics.info', - }, - { - date: '2023-08-20T19:10:52.671Z', - balance: 280894810, - change: 9.847109070979059, - type: 'yield', - link: 'https://trusty-thrill.net', - }, - { - date: '2023-08-23T21:47:13.672Z', - balance: 3674929620, - change: 13.984326762147248, - type: 'sent', - link: 'https://organic-pencil.name', - }, - { - date: '2023-08-03T16:33:59.828Z', - balance: 7063405200, - change: -5.525222755968571, - type: 'swap', - link: 'https://that-princess.name/', - }, - { - date: '2023-08-15T01:04:00.139Z', - balance: 2022351280, - change: 5.126202659448609, - type: 'received', - link: 'https://trained-particle.org', - }, - { - date: '2023-08-01T02:43:08.459Z', - balance: 1681801840, - change: 16.510418973630294, - type: 'received', - link: 'https://bossy-satire.name/', - }, - { - date: '2023-08-14T03:44:53.794Z', - balance: 2530870840, - change: 15.648809940321371, - type: 'yield', - link: 'https://impassioned-front.info', - }, - { - date: '2023-08-13T21:31:45.104Z', - balance: 9628769890, - change: 21.316541467094794, - type: 'received', - link: 'https://soggy-evil.name/', - }, - { - date: '2023-08-10T07:45:17.519Z', - balance: 7429651370, - change: 7.555527552030981, - type: 'sent', - link: 'https://attentive-evening-wear.net/', - }, - { - date: '2023-08-18T00:52:50.334Z', - balance: 3301215310, - change: 0.747177058365196, - type: 'sent', - link: 'https://faraway-standoff.info', - }, - { - date: '2023-08-08T16:20:07.908Z', - balance: 9262014010, - change: 12.837662829551846, - type: 'swap', - link: 'https://fantastic-lightscreen.net/', - }, - { - date: '2023-07-30T22:22:49.349Z', - balance: 464918640, - change: 20.20089789177291, - type: 'swap', - link: 'https://likable-lipstick.biz/', - }, - { - date: '2023-07-31T22:13:38.198Z', - balance: 882609070, - change: 15.083553224103525, - type: 'swap', - link: 'https://strange-gosling.com', - }, - { - date: '2023-08-02T08:02:06.756Z', - balance: 5712603270, - change: 17.230609678663313, - type: 'received', - link: 'https://trim-alloy.name', - }, - { - date: '2023-08-06T15:05:27.310Z', - balance: 3032095510, - change: 18.399766453076154, - type: 'swap', - link: 'https://ignorant-stand.name', - }, - { - date: '2023-08-07T05:24:08.204Z', - balance: 448097240, - change: -9.545999596593902, - type: 'sent', - link: 'https://sane-post.name', - }, - { - date: '2023-08-12T18:49:18.292Z', - balance: 2490197710, - change: 6.249232146656141, - type: 'swap', - link: 'https://cylindrical-cub.name/', - }, - { - date: '2023-07-24T12:55:34.045Z', - balance: 7097047180, - change: 5.744686705293134, - type: 'swap', - link: 'https://petty-general.net/', - }, - { - date: '2023-08-17T07:09:38.713Z', - balance: 1614758830, - change: 17.577561591751873, - type: 'received', - link: 'https://gargantuan-section.net/', - }, - { - date: '2023-08-17T04:52:56.795Z', - balance: 8390280840, - change: 11.74086031736806, - type: 'received', - link: 'https://blind-commuter.org', - }, - { - date: '2023-08-12T09:29:29.953Z', - balance: 4530061750, - change: 3.450965272495523, - type: 'swap', - link: 'https://icy-beating.biz/', - }, - { - date: '2023-08-09T13:37:40.644Z', - balance: 4313041910, - change: 24.373829145915806, - type: 'received', - link: 'https://legitimate-high-rise.com/', - }, - { - date: '2023-08-04T07:56:57.447Z', - balance: 5033169150, - change: -2.1068390388973057, - type: 'swap', - link: 'https://linear-pinto.name', - }, - { - date: '2023-08-01T16:29:50.524Z', - balance: 9455547480, - change: 8.482989118201658, - type: 'yield', - link: 'https://hideous-fish.biz', - }, - { - date: '2023-08-05T00:18:19.468Z', - balance: 5346149900, - change: 24.13860564585775, - type: 'yield', - link: 'https://distinct-storey.net', - }, - { - date: '2023-08-03T07:04:06.504Z', - balance: 4851172100, - change: -7.146439884090796, - type: 'swap', - link: 'https://subtle-heirloom.net', - }, - { - date: '2023-08-11T20:29:43.613Z', - balance: 708300040, - change: 20.75598706724122, - type: 'sent', - link: 'https://tense-heaven.info', - }, - { - date: '2023-08-19T18:40:50.165Z', - balance: 7125903240, - change: 6.754635359393433, - type: 'yield', - link: 'https://afraid-den.org/', - }, - { - date: '2023-08-24T06:13:35.589Z', - balance: 5253690100, - change: -9.951394514646381, - type: 'sent', - link: 'https://wee-pheromone.net/', - }, - { - date: '2023-07-22T19:53:26.638Z', - balance: 7460417740, - change: 24.949184372089803, - type: 'swap', - link: 'https://sticky-cough.net/', - }, - { - date: '2023-08-13T00:39:20.723Z', - balance: 9492220490, - change: -6.812512658070773, - type: 'yield', - link: 'https://evergreen-preface.biz/', - }, - { - date: '2023-07-25T22:54:54.357Z', - balance: 2037309660, - change: -2.651602728292346, - type: 'swap', - link: 'https://immaculate-antling.biz', - }, - { - date: '2023-08-03T05:13:15.796Z', - balance: 5824103640, - change: -9.384545437060297, - type: 'swap', - link: 'https://near-trinket.com', - }, - { - date: '2023-08-13T14:57:19.569Z', - balance: 4860785660, - change: 11.9818445679266, - type: 'yield', - link: 'https://regal-victim.org/', - }, - { - date: '2023-08-08T23:30:51.065Z', - balance: 4520301540, - change: 13.407504328060895, - type: 'swap', - link: 'https://elegant-vengeance.info', - }, - { - date: '2023-08-21T19:58:17.287Z', - balance: 5847510020, - change: -0.0812852883245796, - type: 'swap', - link: 'https://white-origin.biz', - }, - { - date: '2023-08-22T22:15:10.776Z', - balance: 1239111960, - change: 16.282474347390234, - type: 'sent', - link: 'https://hearty-recapitulation.net/', - }, - { - date: '2023-07-23T21:43:26.441Z', - balance: 6238689250, - change: 16.95008099428378, - type: 'received', - link: 'https://infantile-cadet.name/', - }, - { - date: '2023-08-01T00:22:01.761Z', - balance: 9597797590, - change: 6.057171447901055, - type: 'received', - link: 'https://breakable-collaboration.info/', - }, - { - date: '2023-08-03T13:01:19.326Z', - balance: 2281452150, - change: 16.802954020677134, - type: 'swap', - link: 'https://masculine-shot.info/', - }, - { - date: '2023-08-03T16:44:16.524Z', - balance: 7931747350, - change: 10.092162161599845, - type: 'yield', - link: 'https://trim-cabana.biz/', - }, - { - date: '2023-08-17T02:33:01.425Z', - balance: 359045010, - change: -5.322901763720438, - type: 'yield', - link: 'https://bewitched-ramie.name/', - }, - { - date: '2023-08-19T14:39:58.873Z', - balance: 7289689840, - change: 16.130329166771844, - type: 'yield', - link: 'https://fortunate-chalk.info/', - }, - { - date: '2023-08-04T19:43:47.280Z', - balance: 3016172860, - change: 22.86063428153284, - type: 'yield', - link: 'https://round-lobster.net', - }, - { - date: '2023-08-19T00:53:51.768Z', - balance: 565733160, - change: 2.1270179410930723, - type: 'swap', - link: 'https://speedy-mob.org/', - }, - { - date: '2023-08-13T06:13:27.550Z', - balance: 4186946550, - change: 11.174687197199091, - type: 'yield', - link: 'https://edible-gemsbok.name/', - }, - { - date: '2023-07-30T09:00:41.485Z', - balance: 2978894390, - change: 11.23851340613328, - type: 'sent', - link: 'https://nippy-shoelace.org/', - }, - { - date: '2023-08-13T12:32:25.310Z', - balance: 4660696250, - change: 9.436725714476779, - type: 'swap', - link: 'https://unsung-quicksand.org', - }, - { - date: '2023-07-20T20:01:09.859Z', - balance: 8456941250, - change: 21.990910589229316, - type: 'swap', - link: 'https://informal-pine.name/', - }, - { - date: '2023-08-19T22:49:53.336Z', - balance: 7335924290, - change: 18.93318889895454, - type: 'yield', - link: 'https://hot-shack.net/', - }, - { - date: '2023-08-08T23:53:18.730Z', - balance: 9753887310, - change: 13.69695630390197, - type: 'swap', - link: 'https://grounded-mystery.name', - }, - { - date: '2023-08-07T07:34:02.929Z', - balance: 7338495620, - change: -3.475703609874472, - type: 'swap', - link: 'https://potable-father-in-law.org/', - }, - { - date: '2023-08-22T04:50:00.144Z', - balance: 3203831370, - change: 13.897141627967358, - type: 'received', - link: 'https://zesty-basement.name', - }, - { - date: '2023-07-24T14:00:12.428Z', - balance: 2410268600, - change: 21.874963556183502, - type: 'sent', - link: 'https://shady-cynic.net/', - }, - { - date: '2023-08-10T06:14:49.794Z', - balance: 8941298190, - change: 15.559496455825865, - type: 'swap', - link: 'https://hoarse-outlay.info', - }, - { - date: '2023-07-30T03:00:04.392Z', - balance: 7396618700, - change: 17.19702867907472, - type: 'sent', - link: 'https://married-recruit.org', - }, - { - date: '2023-08-01T21:38:11.271Z', - balance: 7207317650, - change: 11.396486917510629, - type: 'yield', - link: 'https://emotional-dollar.org/', - }, - { - date: '2023-08-21T00:46:58.250Z', - balance: 4918808070, - change: 5.468408960150555, - type: 'received', - link: 'https://frugal-city.name', - }, - { - date: '2023-08-11T23:55:18.759Z', - balance: 5963902130, - change: -1.989949174458161, - type: 'sent', - link: 'https://circular-incompetence.info', - }, - { - date: '2023-08-22T10:37:29.606Z', - balance: 9274577290, - change: 15.22795232012868, - type: 'swap', - link: 'https://vacant-readiness.com/', - }, - { - date: '2023-08-05T14:15:45.042Z', - balance: 5975846770, - change: -7.373732902342454, - type: 'yield', - link: 'https://difficult-poetry.name/', - }, - { - date: '2023-07-29T08:18:00.851Z', - balance: 905243960, - change: 7.9436579591128975, - type: 'received', - link: 'https://big-hearted-whirlwind.name', - }, - { - date: '2023-08-23T04:28:12.227Z', - balance: 9041153650, - change: 19.640102320117876, - type: 'sent', - link: 'https://gracious-surplus.biz', - }, - { - date: '2023-08-07T18:13:30.197Z', - balance: 9357065300, - change: 12.417318258667365, - type: 'swap', - link: 'https://silent-format.org', - }, - { - date: '2023-08-18T19:31:36.035Z', - balance: 3179192780, - change: 6.912120553897694, - type: 'sent', - link: 'https://amusing-story.name/', - }, - { - date: '2023-08-13T23:18:03.730Z', - balance: 3396137230, - change: 17.5823252950795, - type: 'yield', - link: 'https://smoggy-phase.biz', - }, - { - date: '2023-08-10T17:57:08.481Z', - balance: 4773039010, - change: 20.291502751642838, - type: 'received', - link: 'https://each-mapping.com/', - }, - { - date: '2023-08-21T21:08:47.161Z', - balance: 8451375620, - change: 9.090326976729557, - type: 'yield', - link: 'https://square-sandal.biz', - }, - { - date: '2023-07-26T20:28:24.791Z', - balance: 4361149570, - change: 20.422242095228285, - type: 'sent', - link: 'https://upright-mood.info', - }, - { - date: '2023-08-12T08:55:13.060Z', - balance: 3338459500, - change: 6.1444697075057775, - type: 'sent', - link: 'https://unusual-listing.name', - }, - { - date: '2023-08-23T19:25:03.696Z', - balance: 8948474910, - change: -2.5751917844172567, - type: 'swap', - link: 'https://secret-management.biz', - }, - { - date: '2023-08-10T15:27:43.987Z', - balance: 464345920, - change: -9.091949654975906, - type: 'swap', - link: 'https://unsteady-goodnight.com', - }, - { - date: '2023-07-21T19:56:15.578Z', - balance: 5117765500, - change: -7.576209468534216, - type: 'swap', - link: 'https://attentive-jasmine.org/', - }, - { - date: '2023-08-08T23:16:04.207Z', - balance: 8379460980, - change: -7.9690452315844595, - type: 'yield', - link: 'https://stable-green.org', - }, - { - date: '2023-08-15T05:30:21.844Z', - balance: 2840231380, - change: -3.1641928444150835, - type: 'yield', - link: 'https://secret-afterlife.info', - }, - { - date: '2023-08-16T16:51:27.599Z', - balance: 7218613590, - change: 4.1357435716781765, - type: 'swap', - link: 'https://hidden-boss.org', - }, - { - date: '2023-08-19T06:36:36.773Z', - balance: 6563180510, - change: 19.629470657091588, - type: 'sent', - link: 'https://guilty-flax.biz', - }, - { - date: '2023-08-20T11:20:58.049Z', - balance: 1287300100, - change: -6.198906524805352, - type: 'swap', - link: 'https://friendly-carving.info', - }, - { - date: '2023-08-04T22:54:30.290Z', - balance: 6411688780, - change: 2.1907601901330054, - type: 'received', - link: 'https://cooked-disconnection.info/', - }, - { - date: '2023-07-26T08:42:36.843Z', - balance: 4969864360, - change: 16.26245578401722, - type: 'sent', - link: 'https://outlying-crust.org', - }, - { - date: '2023-07-24T11:02:29.409Z', - balance: 8182378120, - change: -5.673653923440725, - type: 'swap', - link: 'https://serious-nonconformist.biz', - }, - { - date: '2023-08-24T08:55:00.074Z', - balance: 1701579960, - change: -3.4414722002111375, - type: 'received', - link: 'https://frigid-developmental.name/', - }, - { - date: '2023-08-06T13:10:58.500Z', - balance: 1042456320, - change: -8.591102588688955, - type: 'sent', - link: 'https://assured-knee.org', - }, - { - date: '2023-07-26T20:07:42.635Z', - balance: 6543119150, - change: 23.335167715558782, - type: 'sent', - link: 'https://distorted-ecology.com/', - }, - { - date: '2023-08-21T08:44:47.462Z', - balance: 3981878840, - change: 14.178313665324822, - type: 'received', - link: 'https://playful-trim.name', - }, - { - date: '2023-08-24T04:55:38.463Z', - balance: 9893684510, - change: 3.724940635729581, - type: 'swap', - link: 'https://lovely-opinion.info/', - }, - { - date: '2023-07-24T12:55:12.534Z', - balance: 7060813180, - change: 10.35112926387228, - type: 'sent', - link: 'https://trusty-operating.biz/', - }, - { - date: '2023-08-20T12:57:36.394Z', - balance: 9667993080, - change: -0.25340800173580647, - type: 'sent', - link: 'https://adolescent-caramel.name', - }, - { - date: '2023-08-23T00:30:11.475Z', - balance: 5431122380, - change: 17.010512063279748, - type: 'swap', - link: 'https://flashy-spectacles.org', - }, - { - date: '2023-08-18T19:55:41.124Z', - balance: 7212541150, - change: 9.085896057076752, - type: 'sent', - link: 'https://grouchy-tomography.name', - }, - { - date: '2023-08-15T10:12:04.918Z', - balance: 2716536270, - change: 20.51837938488461, - type: 'sent', - link: 'https://slow-runway.org/', - }, - { - date: '2023-07-24T17:51:22.521Z', - balance: 2147183330, - change: 20.648573914077133, - type: 'sent', - link: 'https://ultimate-elongation.com/', - }, - { - date: '2023-08-07T17:44:28.560Z', - balance: 8418826940, - change: 13.417102973908186, - type: 'swap', - link: 'https://bright-beanstalk.com/', - }, -]; diff --git a/libs/defi/oeth/src/components/History/index.tsx b/libs/defi/oeth/src/components/History/index.tsx deleted file mode 100644 index 27e462d84..000000000 --- a/libs/defi/oeth/src/components/History/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export * from './HistoryCard'; diff --git a/libs/defi/oeth/src/components/Swap/BestRoutes.tsx b/libs/defi/oeth/src/components/Swap/BestRoutes.tsx deleted file mode 100644 index 2484e3889..000000000 --- a/libs/defi/oeth/src/components/Swap/BestRoutes.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { Box } from '@mui/material'; - -import { SwapRouteCard } from './SwapRouteCard'; - -import type { Route } from './SwapRoute'; - -interface Props { - routes: Route[]; - selected: number; - onSelect: (index: number) => void; -} - -export function BestRoutes({ routes, selected, onSelect }: Props) { - return ( - - {routes.slice(0, 2).map((route, index) => ( - onSelect(index)} - route={route} - /> - ))} - - ); -} diff --git a/libs/defi/oeth/src/components/Swap/GasPopover.stories.tsx b/libs/defi/oeth/src/components/Swap/GasPopover.stories.tsx deleted file mode 100644 index 13b9340f1..000000000 --- a/libs/defi/oeth/src/components/Swap/GasPopover.stories.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { screen, userEvent, within } from '@storybook/testing-library'; - -import { GasPopover } from './GasPopover'; - -import type { Meta, StoryObj } from '@storybook/react'; - -const meta: Meta = { - component: GasPopover, - title: 'Swap/GasPopover', - args: { - gasPrice: 21, - onPriceToleranceChange: (val) => null, - }, -}; - -export default meta; - -export const Default: StoryObj = {}; - -export const Expanded: StoryObj = { - play: async ({ canvasElement }) => { - const canvas = within(canvasElement); - await canvas.getByTestId('gas-popover-button').click(); - }, -}; - -export const HighTolerance: StoryObj = { - play: async ({ canvasElement }) => { - const canvas = within(canvasElement); - - await canvas.getByTestId('gas-popover-button').click(); - const input = await screen.findByLabelText('Price tolerance'); - await userEvent.clear(input); - await userEvent.type(input, '1.2'); - }, -}; diff --git a/libs/defi/oeth/src/components/Swap/GasPopover.tsx b/libs/defi/oeth/src/components/Swap/GasPopover.tsx deleted file mode 100644 index 1037bfe81..000000000 --- a/libs/defi/oeth/src/components/Swap/GasPopover.tsx +++ /dev/null @@ -1,200 +0,0 @@ -import { useEffect, useState } from 'react'; - -import { - alpha, - Box, - Button, - debounce, - FormControl, - FormHelperText, - IconButton, - InputAdornment, - InputBase, - InputLabel, - Popover, - Stack, - useTheme, -} from '@mui/material'; -import { useIntl } from 'react-intl'; - -import type { SxProps } from '@mui/material'; - -const defaultPriceTolerance = 0.01; - -const gridStyles = { - display: 'grid', - gridTemplateColumns: `1.5fr 1fr`, - gap: 1, - justifyContent: 'space-between', - alignItems: 'center', -}; - -interface Props { - gasPrice: number; - onPriceToleranceChange: (value: number) => void; - sx?: SxProps; -} - -export function GasPopover({ gasPrice, onPriceToleranceChange, sx }: Props) { - const theme = useTheme(); - const intl = useIntl(); - const [anchorEl, setAnchorEl] = useState(null); - const [priceTolerance, setPriceTolerance] = useState(defaultPriceTolerance); - - useEffect(() => { - onPriceToleranceChange(priceTolerance); - }, [priceTolerance, onPriceToleranceChange]); - return ( - <> - setAnchorEl(e.currentTarget)} - data-testid="gas-popover-button" - sx={{ ...sx }} - > - - - setAnchorEl(null)} - anchorOrigin={{ - vertical: 'bottom', - horizontal: 'center', - }} - transformOrigin={{ - vertical: 'top', - horizontal: 'right', - }} - sx={{ - '& .MuiPaper-root.MuiPopover-paper': { - padding: 3, - boxSizing: 'border-box', - maxWidth: { - xs: '90vw', - md: '16.5rem', - }, - width: '100%', - border: '1px solid', - borderColor: 'grey.700', - [theme.breakpoints.down('md')]: { - left: '0 !important', - right: 0, - marginInline: 'auto', - }, - }, - }} - > - - - - {intl.formatMessage({ defaultMessage: 'Price tolerance' })} - - - { - try { - setPriceTolerance(parseFloat(e.target.value)); - } catch {} - }, 300)} - endAdornment={ - - {intl.formatMessage({ defaultMessage: '%' })} - - } - /> - - - - {priceTolerance > 1 ? ( - theme.typography.pxToRem(12), - color: (theme) => theme.palette.warning.main, - fontWeight: 400, - fontStyle: 'normal', - }} - > - {intl.formatMessage({ - defaultMessage: 'Your transaction may be frontrun', - })} - - ) : null} - - - - {intl.formatMessage({ defaultMessage: 'Gas Price' })} - - - - {intl.formatMessage({ defaultMessage: 'GWEI' })} - - } - /> - - - - - - ); -} diff --git a/libs/defi/oeth/src/components/Swap/RedeemMix.stories.tsx b/libs/defi/oeth/src/components/Swap/RedeemMix.stories.tsx deleted file mode 100644 index 04d5f497d..000000000 --- a/libs/defi/oeth/src/components/Swap/RedeemMix.stories.tsx +++ /dev/null @@ -1,94 +0,0 @@ -import { Box } from '@mui/material'; - -import { RedeemMix } from './RedeemMix'; - -import type { Meta, StoryObj } from '@storybook/react'; - -const meta: Meta = { - component: RedeemMix, - title: 'Swap/Redeem Mix', - args: { - selected: 4, - index: 2, - route: { - value: 282967.55, - quantity: 149.55, - name: 'Redeem for mix via OETH vault', - waitTime: '1 min', - transactionCost: 135.83, - rate: 0.995, - type: 'redeem', - tokenAbbreviation: '', - icon: [ - '/images/currency/weth-icon-small.png', - '/images/currency/reth-icon-small.png', - '/images/currency/steth-icon-small.svg', - '/images/currency/frxeth-icon-small.svg', - ], - }, - composition: [ - { - name: 'wETH', - quantity: 117.0437, - value: 238378.36, - icon: '/images/currency/weth-icon-small.png', - }, - { - name: 'frxETH', - quantity: 13.1245, - value: 17643.75, - icon: '/images/currency/frxeth-icon-small.svg', - }, - { - name: 'rETH', - quantity: 13.1144, - value: 13138.96, - icon: '/images/currency/reth-icon-small.png', - }, - { - name: 'sETH', - quantity: 4.8354, - value: 13138.96, - icon: '/images/currency/steth-icon-small.svg', - }, - ], - }, - render: (args) => ( - - - - ), -}; - -export default meta; - -export const Default: StoryObj = {}; - -export const Hover: StoryObj = { - parameters: { - pseudo: { - hover: true, - }, - }, -}; -export const Selected: StoryObj = { - args: { - index: 4, - }, -}; - -export const SmallMobile: StoryObj = { - parameters: { - viewport: { - defaultViewport: 'mobile1', - }, - }, -}; - -export const LargeMobile: StoryObj = { - parameters: { - viewport: { - defaultViewport: 'mobile2', - }, - }, -}; diff --git a/libs/defi/oeth/src/components/Swap/RedeemMix.tsx b/libs/defi/oeth/src/components/Swap/RedeemMix.tsx deleted file mode 100644 index eaa64da7e..000000000 --- a/libs/defi/oeth/src/components/Swap/RedeemMix.tsx +++ /dev/null @@ -1,191 +0,0 @@ -import { Stack, Card, alpha, Box, Typography, Divider } from '@mui/material'; -import { Mix } from 'libs/shared/components/src/Mix'; -import { Redeem, Route } from './SwapRoute'; -import { useIntl } from 'react-intl'; -import { currencyFormat, quantityFormat } from '@origin/shared/components'; -import { SwapInfo } from './SwapInfo'; -import { Icon } from 'libs/shared/components/src/top-nav/Icon'; - -interface Props { - onSelect: (index: number) => void; - index: number; - selected: number; - route: Route; - // no idea if this prop makes sense 🤪 -> prob it needs to be refactored - composition: { - icon: string; - name: string; - quantity: number; - value: number; - }[]; -} - -export function RedeemMix({ - route, - index, - selected, - onSelect, - composition, -}: Props) { - const intl = useIntl(); - return ( - `linear-gradient(var(--mui-palette-grey-800), var(--mui-palette-grey-800)) padding-box, - linear-gradient(90deg, ${alpha( - theme.palette.primary.main, - 0.4, - )} 0%, ${alpha( - theme.palette.primary.dark, - 0.4, - )} 100%) border-box;`, - }, - }), - }} - role="button" - onClick={() => onSelect(index)} - > - - - - - - {intl.formatNumber(route.quantity, quantityFormat)}  - theme.typography.pxToRem(12), - fontWeight: 400, - fontStyle: 'normal', - lineHeight: (theme) => theme.typography.pxToRem(20), - }} - > - ({intl.formatNumber(route.value, currencyFormat)}) - - - - {route.name} - - - - - - {intl.formatMessage({ defaultMessage: 'Gas:' })}  - - ~{intl.formatNumber(route.transactionCost, currencyFormat)} - - - - {intl.formatMessage({ defaultMessage: 'Waiting time:' })}  - - {/* TODO better handling of this duration */}~ - {(route as Redeem).waitTime} - - - - - - - {intl.formatMessage({ defaultMessage: 'Rate' })}  - - 1:{route.rate} - -   - - - - - {composition.map((item) => ( - - - - - {item.name} - - - - - {intl.formatNumber(item.quantity, quantityFormat)} - - - {intl.formatNumber(item.value, currencyFormat)} - - - - ))} - - ); -} diff --git a/libs/defi/oeth/src/components/Swap/Swap.stories.tsx b/libs/defi/oeth/src/components/Swap/Swap.stories.tsx deleted file mode 100644 index 3ab1e1c72..000000000 --- a/libs/defi/oeth/src/components/Swap/Swap.stories.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { Container } from '@mui/material'; - -import { Swap } from './Swap'; - -import type { Meta, StoryObj } from '@storybook/react'; - -const meta: Meta = { - component: Swap, - title: 'Swap', - args: { - isLoading: false, - routes: [], - }, - render: () => ( - - - - ), -}; - -export default meta; - -export const SwapComponent: StoryObj = { - name: 'Swap Component', -}; diff --git a/libs/defi/oeth/src/components/Swap/Swap.tsx b/libs/defi/oeth/src/components/Swap/Swap.tsx deleted file mode 100644 index a51e63b9e..000000000 --- a/libs/defi/oeth/src/components/Swap/Swap.tsx +++ /dev/null @@ -1,171 +0,0 @@ -import { useState } from 'react'; - -import { Stack } from '@mui/material'; -import { - ActionButton, - DropdownIcon, - SwapCard, - TokenListModal, -} from '@origin/shared/components'; -import { useIntl } from 'react-intl'; - -import { GasPopover } from './GasPopover'; -import { SwapRoute } from './SwapRoute'; - -import type { Theme } from '@mui/material'; -import type { Option } from '@origin/shared/components'; - -export function Swap() { - const intl = useIntl(); - - const [isSelectionModalOpen, setSelectionModal] = useState(false); - const [values, setValues] = useState<{ - baseToken: Omit; - exchangeCurrency: Omit; - }>({ - baseToken: { - abbreviation: 'OETH', - imgSrc: '/images/currency/oeth-icon-small.svg', - quantity: 0, - value: 0, - }, - exchangeCurrency: { - abbreviation: 'ETH', - imgSrc: '/images/currency/eth-icon-small.svg', - quantity: 0, - value: 0, - }, - }); - - function handleCloseSelectionModal() { - setSelectionModal(false); - } - - function handleValueChange(value: string) { - const number = parseInt(value) || 0; - setValues((prev) => ({ - baseToken: { - ...prev.baseToken, - quantity: number, - value: number * 18500, - }, - exchangeCurrency: { - ...prev.exchangeCurrency, - quantity: number * number - 0.5, - value: number * 19000, - }, - })); - } - - function swapTokens() { - setValues((prev) => ({ - baseToken: { - ...prev.exchangeCurrency, - quantity: prev.baseToken.quantity, - value: prev.baseToken.quantity * 18500, - }, - exchangeCurrency: { - ...prev.baseToken, - quantity: prev.baseToken.quantity * (prev.baseToken.quantity - 0.5), - value: prev.baseToken.quantity * 19000, - }, - })); - } - - return ( - <> - - {intl.formatMessage({ defaultMessage: 'Swap' })} - null} - // @ts-expect-error type mistmatch - sx={{ - position: 'relative', - right: (theme: Theme) => theme.spacing(-0.75), - }} - /> - - } - onSwap={swapTokens} - onValueChange={handleValueChange} - baseTokenIcon={values.baseToken.imgSrc} - baseTokenName={values.baseToken.abbreviation as string} - baseTokenValue={values.baseToken.value} - exchangeTokenName={values.exchangeCurrency.abbreviation as string} - exchangeTokenIcon={values.exchangeCurrency.imgSrc} - exchangeTokenQuantity={values.exchangeCurrency.quantity} - exchangeTokenValue={values.exchangeCurrency.value} - exchangeTokenNode={ - setSelectionModal(true)} /> - } - > - - console.log('test')}> - {intl.formatMessage({ defaultMessage: 'Swap' })} - - - - setValues((prev) => ({ - ...prev, - exchangeCurrency: { - value: prev.baseToken.quantity * 18500, - quantity: prev.baseToken.quantity - 0.5, - abbreviation: option.name, - imgSrc: option.imgSrc, - }, - })) - } - selected={values.exchangeCurrency.abbreviation} - options={[ - { - name: intl.formatMessage({ defaultMessage: 'Wrapped Ether' }), - abbreviation: intl.formatMessage({ defaultMessage: 'WETH' }), - imgSrc: '/images/currency/weth-icon-small.png', - value: 0, - quantity: 0, - }, - { - name: intl.formatMessage({ - defaultMessage: 'Liquid Staked Ether 2.0', - }), - abbreviation: intl.formatMessage({ defaultMessage: 'stETH' }), - imgSrc: '/images/currency/steth-icon-small.svg', - value: 0, - quantity: 0, - }, - { - name: intl.formatMessage({ defaultMessage: 'Rocket Pool ETH' }), - abbreviation: intl.formatMessage({ defaultMessage: 'rETH' }), - imgSrc: '/images/currency/reth-icon-small.png', - value: 0, - quantity: 0, - }, - { - name: intl.formatMessage({ defaultMessage: 'Frax Ether' }), - abbreviation: intl.formatMessage({ defaultMessage: 'frxETH' }), - imgSrc: '/images/currency/frxeth-icon-small.svg', - value: 0, - quantity: 0, - }, - { - name: intl.formatMessage({ defaultMessage: 'ETH' }), - abbreviation: intl.formatMessage({ defaultMessage: 'ETH' }), - imgSrc: '/images/currency/eth-icon-small.svg', - value: 0, - quantity: 0, - }, - ]} - /> - - ); -} diff --git a/libs/defi/oeth/src/components/Swap/SwapInfo.tsx b/libs/defi/oeth/src/components/Swap/SwapInfo.tsx deleted file mode 100644 index fd081c28e..000000000 --- a/libs/defi/oeth/src/components/Swap/SwapInfo.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { Box, Tooltip, Typography } from '@mui/material'; -import { useIntl } from 'react-intl'; - -import type { Theme } from '@mui/material'; - -export function SwapInfo() { - const intl = useIntl(); - return ( - - {intl.formatMessage({ - defaultMessage: - 'The best swap route factors in the best price after transaction costs', - })} - - } - componentsProps={{ - tooltip: { - // @ts-expect-error type error in MUI - sx: { - paddingInline: 2, - paddingBlock: 1.5, - borderRadius: 2, - border: '1px solid', - borderColor: (theme) => theme.palette.grey[500], - boxShadow: (theme: Theme) => theme.shadows[23], - }, - }, - }} - > - theme.typography.pxToRem(12), - height: (theme) => theme.typography.pxToRem(12), - color: (theme) => theme.palette.text.secondary, - }} - > - - ); -} diff --git a/libs/defi/oeth/src/components/Swap/SwapRoute.stories.tsx b/libs/defi/oeth/src/components/Swap/SwapRoute.stories.tsx deleted file mode 100644 index bb17d7f2d..000000000 --- a/libs/defi/oeth/src/components/Swap/SwapRoute.stories.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import { Container } from '@mui/material'; -import { userEvent, within } from '@storybook/testing-library'; - -import { routes } from './fixtures'; -import { SwapRoute } from './SwapRoute'; - -import type { Meta, StoryObj } from '@storybook/react'; - -const meta: Meta = { - component: SwapRoute, - title: 'Swap/Swap Route', - args: { - isLoading: false, - routes: [], - }, - parameters: { - backgrounds: { - default: 'dark', - values: [ - { - name: 'dark', - value: '#282A32', - }, - ], - }, - }, - render: (args) => ( - - - - ), -}; - -export default meta; - -export const Default: StoryObj = {}; - -export const HoverRouteInfo: StoryObj = { - play: async ({ canvasElement }) => { - const canvas = within(canvasElement); - const element = await canvas.findByTestId('swap-route-info'); - userEvent.hover(element); - }, -}; -export const Loading: StoryObj = { - args: { - isLoading: true, - }, -}; - -export const SwapContent: StoryObj = { - args: { - // @ts-expect-error fixtures and type mismatch - routes, - }, -}; diff --git a/libs/defi/oeth/src/components/Swap/SwapRoute.tsx b/libs/defi/oeth/src/components/Swap/SwapRoute.tsx deleted file mode 100644 index f799228c7..000000000 --- a/libs/defi/oeth/src/components/Swap/SwapRoute.tsx +++ /dev/null @@ -1,113 +0,0 @@ -import { useState } from 'react'; - -import { Skeleton, Stack, Typography } from '@mui/material'; -import { Card, cardStyles } from '@origin/shared/components'; -import { useIntl } from 'react-intl'; - -import { BestRoutes } from './BestRoutes'; -import { SwapInfo } from './SwapInfo'; -import { SwapRouteAccordion } from './SwapRouteAccordion'; - -interface Swap { - type: 'swap'; -} -export interface Redeem { - type: 'redeem'; - tokenAbbreviation: string; - waitTime: string; -} - -export type Route = { - name: string; - icon: string | string[]; - quantity: number; - value: number; - rate: number; - transactionCost: number; -} & (Swap | Redeem); - -interface Props { - isLoading: boolean; - routes: Route[]; -} - -export function SwapRoute({ isLoading = false, routes }: Props) { - const intl = useIntl(); - const [selectedRoute, setSelectedRoute] = useState(0); - - const hasContent = routes.length > 0; - return ( - theme.palette.background.default, - backgroundColor: 'grey.900', - borderRadius: 1, - }} - title={ - isLoading ? ( - theme.typography.pxToRem(12), - display: 'flex', - alignItems: 'center', - }} - > - theme.palette.primary.contrastText, - }} - /> - {intl.formatMessage({ - defaultMessage: 'Finding the best route...', - })} - - ) : ( - - {intl.formatMessage({ defaultMessage: 'Route' })} - - - ) - } - sxCardTitle={{ borderBottom: 'none', paddingBlock: 1, paddingInline: 2 }} - sxCardContent={{ - ...(hasContent - ? cardStyles - : { - p: 0, - paddingBlock: 0, - paddingInline: 0, - '&:last-child': { pb: 0 }, - }), - }} - > - {hasContent ? ( - <> - setSelectedRoute(index)} - /> - setSelectedRoute(index)} - sx={{ mt: 2 }} - /> - - ) : undefined} - - ); -} diff --git a/libs/defi/oeth/src/components/Swap/SwapRouteAccordion.stories.tsx b/libs/defi/oeth/src/components/Swap/SwapRouteAccordion.stories.tsx deleted file mode 100644 index b17007c2c..000000000 --- a/libs/defi/oeth/src/components/Swap/SwapRouteAccordion.stories.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { Box } from '@mui/material'; -import { within } from '@storybook/testing-library'; - -import { routes } from './fixtures'; -import { SwapRouteAccordion } from './SwapRouteAccordion'; - -import type { Meta, StoryObj } from '@storybook/react'; - -import type { Route } from './SwapRoute'; - -const meta: Meta = { - component: SwapRouteAccordion, - title: 'Swap/Swap Route Accordion', - args: { - selected: 4, - routes: routes as Route[], - }, - render: (args) => ( - - - - ), -}; - -export default meta; - -export const Default: StoryObj = {}; -export const Expanded: StoryObj = { - play: async ({ canvasElement }) => { - const canvas = within(canvasElement); - (await canvas.findByText('Show more')).click(); - }, -}; diff --git a/libs/defi/oeth/src/components/Swap/SwapRouteAccordion.tsx b/libs/defi/oeth/src/components/Swap/SwapRouteAccordion.tsx deleted file mode 100644 index f3c258691..000000000 --- a/libs/defi/oeth/src/components/Swap/SwapRouteAccordion.tsx +++ /dev/null @@ -1,110 +0,0 @@ -import { - Accordion, - AccordionDetails, - AccordionSummary, - Box, - Stack, - Typography, -} from '@mui/material'; -import { useIntl } from 'react-intl'; - -import { SwapRouteAccordionItem } from './SwapRouteAccordionItem'; - -import type { SxProps } from '@mui/material'; - -import type { Route } from './SwapRoute'; - -interface Props { - routes: Route[]; - selected: number; - onSelect: (index: number) => void; - sx?: SxProps; -} - -export function SwapRouteAccordion({ routes, selected, onSelect, sx }: Props) { - const intl = useIntl(); - return ( - - theme.typography.pxToRem(14), - display: 'flex', - justifyContent: 'space-between', - alignItems: 'center', - '& .MuiAccordionSummary-content': { - margin: 0, - }, - padding: 0, - '&.Mui-expanded': { - minHeight: 0, - '& img': { - transform: 'rotate(-180deg)', - }, - }, - }} - > - - {intl.formatMessage({ defaultMessage: 'Show more' })} - - - theme.typography.pxToRem(12), - width: (theme) => theme.typography.pxToRem(12), - alignSelf: 'center', - }} - > - - theme.spacing(-1), - '&:before': { - content: '""', - width: (theme) => `calc(100% + ${theme.spacing(2)})`, - position: 'absolute', - left: (theme) => theme.spacing(-1), - height: '1px', - borderBlockEnd: '1px solid', - display: 'block', - }, - }} - > - - {routes.slice(2).map((route, index) => ( - - ))} - - - - ); -} diff --git a/libs/defi/oeth/src/components/Swap/SwapRouteAccordionItem.stories.tsx b/libs/defi/oeth/src/components/Swap/SwapRouteAccordionItem.stories.tsx deleted file mode 100644 index b8cd2eb3b..000000000 --- a/libs/defi/oeth/src/components/Swap/SwapRouteAccordionItem.stories.tsx +++ /dev/null @@ -1,61 +0,0 @@ -import { Box } from '@mui/material'; - -import { routes } from './fixtures'; -import { SwapRouteAccordionItem } from './SwapRouteAccordionItem'; - -import type { Meta, StoryObj } from '@storybook/react'; - -import type { Route } from './SwapRoute'; - -const meta: Meta = { - component: SwapRouteAccordionItem, - title: 'Swap/Swap Route Accordion Item', - args: { - selected: 4, - index: 2, - route: routes[2] as Route, - }, - render: (args) => ( - - - - ), -}; - -export default meta; - -export const Default: StoryObj = {}; -export const Hover: StoryObj = { - parameters: { - pseudo: { - hover: true, - }, - }, -}; -export const Selected: StoryObj = { - args: { - selected: 2, - }, -}; - -export const SmallMobile: StoryObj = { - args: { - selected: 2, - }, - parameters: { - viewport: { - defaultViewport: 'mobile1', - }, - }, -}; - -export const LargeMobile: StoryObj = { - args: { - selected: 2, - }, - parameters: { - viewport: { - defaultViewport: 'mobile2', - }, - }, -}; diff --git a/libs/defi/oeth/src/components/Swap/SwapRouteAccordionItem.tsx b/libs/defi/oeth/src/components/Swap/SwapRouteAccordionItem.tsx deleted file mode 100644 index a5583d354..000000000 --- a/libs/defi/oeth/src/components/Swap/SwapRouteAccordionItem.tsx +++ /dev/null @@ -1,136 +0,0 @@ -import { alpha, Box, Stack, Typography, useTheme } from '@mui/material'; -import { currencyFormat, quantityFormat } from '@origin/shared/components'; -import { useIntl } from 'react-intl'; - -import { SwapInfo } from './SwapInfo'; - -import type { Route } from './SwapRoute'; - -interface Props { - route: Route; - selected: number; - index: number; - onSelect: (index: number) => void; -} - -export function SwapRouteAccordionItem({ - route, - selected, - index, - onSelect, -}: Props) { - const theme = useTheme(); - const intl = useIntl(); - return ( - - `linear-gradient(${theme.palette.grey[800]}, ${theme.palette.grey[800]}) padding-box, - linear-gradient(90deg, ${theme.palette.primary.main} 0%, ${theme.palette.primary.dark} 100%) border-box;`, - } - : { - ':hover': { - borderColor: 'transparent', - background: (theme) => - `linear-gradient(${theme.palette.grey[800]}, ${ - theme.palette.grey[800] - }) padding-box, - linear-gradient(90deg, ${alpha( - theme.palette.primary.main, - 0.4, - )} 0%, ${alpha( - theme.palette.primary.dark, - 0.4, - )} 100%) border-box;`, - }, - }), - }} - onClick={() => onSelect(index)} - role="button" - > - - - theme.typography.pxToRem(24), - width: (theme) => theme.typography.pxToRem(24), - }} - /> - - - {intl.formatNumber(route.quantity, quantityFormat)} -   - - ({intl.formatNumber(route.value, currencyFormat)}) - - - - {route.type === 'swap' - ? intl.formatMessage( - { defaultMessage: 'Swap via {name}' }, - { name: route.name }, - ) - : intl.formatMessage( - { defaultMessage: 'Swap for {name}' }, - { name: route.name }, - )} - - - - - - Rate  - -   - - 1:{intl.formatNumber(route.rate, quantityFormat)} - - - - - Est gas:  - - ~{intl.formatNumber(route.transactionCost, currencyFormat)} - - - - - - ); -} diff --git a/libs/defi/oeth/src/components/Swap/SwapRouteCard.stories.tsx b/libs/defi/oeth/src/components/Swap/SwapRouteCard.stories.tsx deleted file mode 100644 index 67daa867e..000000000 --- a/libs/defi/oeth/src/components/Swap/SwapRouteCard.stories.tsx +++ /dev/null @@ -1,86 +0,0 @@ -import { Box } from '@mui/material'; - -import { redeemRoutes, routes } from './fixtures'; -import { SwapRouteCard } from './SwapRouteCard'; - -import type { Meta, StoryObj } from '@storybook/react'; - -import type { Route } from './SwapRoute'; - -const meta: Meta = { - component: SwapRouteCard, - title: 'Swap/SwapRouteCard', - args: { - route: routes[0] as Route, - selected: 3, - index: 4, - }, - render: (args) => ( - - - - ), -}; - -export default meta; - -export const SwapComponent: StoryObj = {}; - -export const Hover: StoryObj = { - parameters: { - pseudo: { - hover: true, - }, - }, -}; -export const Selected: StoryObj = { - args: { - selected: 4, - }, -}; - -export const Best: StoryObj = { - args: { - selected: 0, - index: 0, - }, -}; - -export const RedeemShort: StoryObj = { - args: { - selected: 0, - index: 0, - route: redeemRoutes[1] as Route, - }, -}; -export const RedeemLong: StoryObj = { - args: { - selected: 0, - index: 0, - route: redeemRoutes[0] as Route, - }, -}; - -export const SmallMobile: StoryObj = { - args: { - selected: 0, - index: 0, - }, - parameters: { - viewport: { - defaultViewport: 'mobile1', - }, - }, -}; - -export const LargeMobile: StoryObj = { - args: { - selected: 0, - index: 0, - }, - parameters: { - viewport: { - defaultViewport: 'mobile2', - }, - }, -}; diff --git a/libs/defi/oeth/src/components/Swap/SwapRouteCard.tsx b/libs/defi/oeth/src/components/Swap/SwapRouteCard.tsx deleted file mode 100644 index e48f40ee7..000000000 --- a/libs/defi/oeth/src/components/Swap/SwapRouteCard.tsx +++ /dev/null @@ -1,196 +0,0 @@ -import { alpha, Box, Card, CardHeader, Stack, Typography } from '@mui/material'; -import { currencyFormat } from '@origin/shared/components'; -import { useIntl } from 'react-intl'; - -import type { Route } from './SwapRoute'; - -interface Props { - index: number; - selected: number; - onSelect: (index: number) => void; - route: Route; -} - -export function SwapRouteCard({ index, selected, onSelect, route }: Props) { - const intl = useIntl(); - return ( - theme.palette.grey[800], - ...(selected === index - ? { - background: `linear-gradient(var(--mui-palette-grey-800), var(--mui-palette-grey-800)) padding-box, - linear-gradient(90deg, var(--mui-palette-primary-main) 0%, var(--mui-palette-primary-dark) 100%) border-box;`, - borderColor: 'transparent', - } - : { - '&:hover': { - borderColor: 'transparent', - background: ( - theme, - ) => `linear-gradient(var(--mui-palette-grey-800), var(--mui-palette-grey-800)) padding-box, - linear-gradient(90deg, ${alpha( - theme.palette.primary.main, - 0.4, - )} 0%, ${alpha( - theme.palette.primary.dark, - 0.4, - )} 100%) border-box;`, - }, - }), - }} - role="button" - onClick={() => onSelect(index)} - > - - - - - {route.quantity}  - - ({intl.formatNumber(route.value, currencyFormat)}) - - - - {index === 0 ? ( - theme.shape.borderRadius, - background: (theme) => theme.palette.background.gradient1, - color: 'primary.contrastText', - fontSize: (theme) => theme.typography.pxToRem(12), - top: (theme) => theme.spacing(-3), - right: (theme) => theme.spacing(-2), - paddingInline: 1, - }} - > - {intl.formatMessage({ defaultMessage: 'Best' })} - - ) : undefined} - - - - ({intl.formatNumber(route.value, currencyFormat)}) - - - } - > - - - {route.name} - - - - {intl.formatMessage({ defaultMessage: 'Rate:' })} - - 1:{route.rate} - - - - - {intl.formatMessage({ - defaultMessage: 'Gas:', - })} - - - ~{intl.formatNumber(route.transactionCost, currencyFormat)} - - - {route.type === 'redeem' ? ( - - - {intl.formatMessage({ - defaultMessage: 'Wait time:', - })} - - {/* TODO better logic for coloring -> prob time should come as a ms duration and getting it formated */} - - ~{route.waitTime} - - - ) : undefined} - - - ); -} diff --git a/libs/defi/oeth/src/components/Swap/fixtures.ts b/libs/defi/oeth/src/components/Swap/fixtures.ts deleted file mode 100644 index 2ed71b9a0..000000000 --- a/libs/defi/oeth/src/components/Swap/fixtures.ts +++ /dev/null @@ -1,61 +0,0 @@ -export const routes = [ - { - type: 'swap', - name: 'Mint via Oeth zapper', - quantity: 150, - value: 284389.5, - rate: 1, - transactionCost: 89.25, - icon: '/images/oeth.svg', - }, - { - type: 'swap', - name: 'Curve', - quantity: 149.2832, - value: 282128.93, - rate: 0.9995, - transactionCost: 12.35, - icon: '/images/currency/eth-icon-small.svg', - }, - { - type: 'swap', - name: 'Maverick', - rate: 0.9796, - quantity: 148.74226, - value: 277106.84, - transactionCost: 46.47, - icon: '/images/maverick.png', - }, - { - type: 'swap', - name: 'Uniswap', - rate: 0.9796, - value: 277106.84, - quantity: 148.74226, - transactionCost: 46.47, - icon: '/images/uniswap.png', - }, -]; - -export const redeemRoutes = [ - { - type: 'redeem', - name: 'Redeem via OETH vault', - rate: 1, - value: 284389.5, - quantity: 150, - transactionCost: 89.25, - waitTime: '3 days', - icon: '/images/currency/eth-icon-small.svg', - }, - { - type: 'redeem', - name: 'Redeem via OETH vault', - rate: 1, - value: 284389.5, - quantity: 150, - transactionCost: 89.25, - waitTime: '1 min', - icon: '/images/currency/eth-icon-small.svg', - }, -]; diff --git a/libs/defi/oeth/src/components/Swap/index.tsx b/libs/defi/oeth/src/components/Swap/index.tsx deleted file mode 100644 index d0eaa39ca..000000000 --- a/libs/defi/oeth/src/components/Swap/index.tsx +++ /dev/null @@ -1,2 +0,0 @@ -export * from './Swap'; -export * from './SwapRoute'; diff --git a/libs/defi/oeth/src/components/Wrap/SwapWrap.tsx b/libs/defi/oeth/src/components/Wrap/SwapWrap.tsx deleted file mode 100644 index 5ab2b74ea..000000000 --- a/libs/defi/oeth/src/components/Wrap/SwapWrap.tsx +++ /dev/null @@ -1,59 +0,0 @@ -import { useState } from 'react'; - -import { SwapCard } from '@origin/shared/components'; -import { useIntl } from 'react-intl'; - -export function PortfolioSwap() { - const intl = useIntl(); - const [values, setValues] = useState({ - baseToken: { - abbreviation: 'OETH', - imgSrc: '/images/currency/oeth-icon-small.svg', - quantity: 0, - }, - exchangeCurrency: { - abbreviation: 'wOETH', - imgSrc: '/images/currency/woeth-icon-small.svg', - quantity: 0, - }, - }); - - function handleValueChange(value: string) { - const number = parseInt(value) || 0; - setValues((prev) => ({ - baseToken: { - ...prev.baseToken, - quantity: number, - }, - exchangeCurrency: { - ...prev.exchangeCurrency, - quantity: number * number - 0.5, - }, - })); - } - - function swapTokens() { - setValues((prev) => ({ - baseToken: { - ...prev.exchangeCurrency, - quantity: prev.baseToken.quantity, - }, - exchangeCurrency: { - ...prev.baseToken, - quantity: prev.baseToken.quantity * prev.baseToken.quantity - 0.5, - }, - })); - } - return ( - - ); -} diff --git a/libs/defi/oeth/src/components/Wrap/index.tsx b/libs/defi/oeth/src/components/Wrap/index.tsx deleted file mode 100644 index bdd0921e5..000000000 --- a/libs/defi/oeth/src/components/Wrap/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export * from './SwapWrap'; diff --git a/libs/defi/oeth/src/components/defi-oeth.tsx b/libs/defi/oeth/src/components/defi-oeth.tsx deleted file mode 100644 index 0c0a1433e..000000000 --- a/libs/defi/oeth/src/components/defi-oeth.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { useIntl } from 'react-intl'; - -/* eslint-disable-next-line */ -export interface DefiOethProps {} - -export function DefiOeth(props: DefiOethProps) { - const intl = useIntl(); - return ( -
-

{intl.formatMessage({ defaultMessage: 'Welcome to DefiOeth!' })}

-
- ); -} - -export default DefiOeth; diff --git a/libs/defi/oeth/src/components/index.tsx b/libs/defi/oeth/src/components/index.tsx deleted file mode 100644 index b99afaa6d..000000000 --- a/libs/defi/oeth/src/components/index.tsx +++ /dev/null @@ -1,4 +0,0 @@ -export * from './shared'; -export * from './Swap'; -export * from './Wrap'; -export * from './History'; diff --git a/libs/defi/oeth/src/components/shared/APY.stories.tsx b/libs/defi/oeth/src/components/shared/APY.stories.tsx deleted file mode 100644 index bf937dd91..000000000 --- a/libs/defi/oeth/src/components/shared/APY.stories.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import { Container } from '@mui/material'; - -import { APY } from './APY'; - -import type { Meta, StoryObj } from '@storybook/react'; - -const meta: Meta = { - component: APY, - title: 'OETH/APY', - args: { - value: 8.71, - balance: 250.1937, - pendingYield: 0.0023, - earnings: 15.1937, - }, - render: (args) => ( - - - - ), -}; - -export default meta; - -export const Default: StoryObj = {}; - -export const SmallMobile: StoryObj = { - parameters: { - viewport: { - defaultViewport: 'mobile1', - }, - }, -}; -export const LargeMobile: StoryObj = { - parameters: { - viewport: { - defaultViewport: 'mobile2', - }, - }, -}; -export const Tablet: StoryObj = { - parameters: { - viewport: { - defaultViewport: 'tablet', - }, - }, -}; diff --git a/libs/defi/oeth/src/components/shared/APY.tsx b/libs/defi/oeth/src/components/shared/APY.tsx deleted file mode 100644 index 87bb7571a..000000000 --- a/libs/defi/oeth/src/components/shared/APY.tsx +++ /dev/null @@ -1,217 +0,0 @@ -import React, { useState } from 'react'; - -import { - alpha, - Box, - Divider, - IconButton, - Menu, - MenuItem, - Stack, - Typography, -} from '@mui/material'; -import { useIntl } from 'react-intl'; - -const days = [7, 30]; - -interface Props { - value: number; - balance: number; - pendingYield: number; - earnings: number; -} - -export function APY({ value, balance, pendingYield, earnings }: Props) { - const intl = useIntl(); - const [selectedPeriod, setSelectedPeriod] = useState(30); - const [anchorEl, setAnchorEl] = React.useState(null); - - function handleClose() { - setAnchorEl(null); - } - - return ( - <> - - {days.map((day) => ( - { - setSelectedPeriod(day); - setAnchorEl(null); - }} - > - {intl.formatMessage( - { defaultMessage: '{days} day trailing' }, - { days: day }, - )} - - ))} - - - - - {intl.formatMessage( - { defaultMessage: '{days} day trailing APY' }, - { days: selectedPeriod }, - )} - - - - {intl.formatNumber(value / 100, { - minimumFractionDigits: 2, - style: 'percent', - })} - - setAnchorEl(e.currentTarget)} - sx={{ - backgroundColor: (theme) => - alpha(theme.palette.common.white, 0.15), - marginInlineStart: 1, - alignSelf: 'center', - position: 'relative', - height: '1rem', - width: '1rem', - borderRadius: '100%', - top: '-2px', - }} - > - - - - - - - - - - - - - - - - - - - ); -} - -function ValueContainer({ - text, - value, -}: { - text: string; - value: string; - icon?: string; -}) { - return ( - - - {text} - - - {value} - - - ); -} diff --git a/libs/defi/oeth/src/components/shared/index.tsx b/libs/defi/oeth/src/components/shared/index.tsx deleted file mode 100644 index fa1f0843c..000000000 --- a/libs/defi/oeth/src/components/shared/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export * from './APY'; diff --git a/libs/defi/oeth/src/constants.ts b/libs/defi/oeth/src/constants.ts deleted file mode 100644 index 2337e9e1d..000000000 --- a/libs/defi/oeth/src/constants.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { FormatNumberOptions } from 'react-intl'; - -export const numberCurrencyFormat: FormatNumberOptions = { - minimumFractionDigits: 2, - style: 'currency', - currency: 'USD', -}; - -export const valueFormat: FormatNumberOptions = { - minimumFractionDigits: 2, -}; diff --git a/libs/defi/oeth/src/index.ts b/libs/defi/oeth/src/index.ts deleted file mode 100644 index 792962380..000000000 --- a/libs/defi/oeth/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './views'; diff --git a/libs/defi/oeth/src/views/History.tsx b/libs/defi/oeth/src/views/History.tsx deleted file mode 100644 index 23f534ce3..000000000 --- a/libs/defi/oeth/src/views/History.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import { APY, HistoryCard } from '../components'; - -export function HistoryView() { - return ( - <> - - - - ); -} diff --git a/libs/defi/oeth/src/views/Swap.tsx b/libs/defi/oeth/src/views/Swap.tsx deleted file mode 100644 index 8b5625709..000000000 --- a/libs/defi/oeth/src/views/Swap.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { Stack } from '@mui/material'; - -import { APY, Swap } from '../components'; - -export function SwapView() { - return ( - <> - - - - - - - ); -} diff --git a/libs/defi/oeth/src/views/Wrap.tsx b/libs/defi/oeth/src/views/Wrap.tsx deleted file mode 100644 index 364480292..000000000 --- a/libs/defi/oeth/src/views/Wrap.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import { Button, Stack } from '@mui/material'; -import { ActionButton, Card } from '@origin/shared/components'; -import { useIntl } from 'react-intl'; - -import { APY, PortfolioSwap } from '../components'; - -export function WrapView() { - const intl = useIntl(); - return ( - <> - - - - - - - - console.log('test')}> - {intl.formatMessage({ defaultMessage: 'Connect' })} - - - - ); -} diff --git a/libs/defi/oeth/src/views/index.tsx b/libs/defi/oeth/src/views/index.tsx deleted file mode 100644 index 68a2f7e59..000000000 --- a/libs/defi/oeth/src/views/index.tsx +++ /dev/null @@ -1,3 +0,0 @@ -export * from './Swap'; -export * from './Wrap'; -export * from './History'; diff --git a/libs/defi/oeth/tsconfig.json b/libs/defi/oeth/tsconfig.json deleted file mode 100644 index bcca652a1..000000000 --- a/libs/defi/oeth/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "allowJs": false, - "esModuleInterop": false, - "allowSyntheticDefaultImports": true, - "strict": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.lib.json" - }, - { - "path": "./tsconfig.storybook.json" - } - ], - "extends": "../../../tsconfig.base.json" -} diff --git a/libs/defi/oeth/tsconfig.lib.json b/libs/defi/oeth/tsconfig.lib.json deleted file mode 100644 index 0a600be77..000000000 --- a/libs/defi/oeth/tsconfig.lib.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": ["node"] - }, - "files": [ - "../../../node_modules/@nx/react/typings/cssmodule.d.ts", - "../../../node_modules/@nx/react/typings/image.d.ts" - ], - "exclude": [ - "jest.config.ts", - "src/**/*.spec.ts", - "src/**/*.test.ts", - "src/**/*.spec.tsx", - "src/**/*.test.tsx", - "src/**/*.spec.js", - "src/**/*.test.js", - "src/**/*.spec.jsx", - "src/**/*.test.jsx", - "**/*.stories.ts", - "**/*.stories.js", - "**/*.stories.jsx", - "**/*.stories.tsx" - ], - "include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"] -} diff --git a/libs/defi/oeth/tsconfig.storybook.json b/libs/defi/oeth/tsconfig.storybook.json deleted file mode 100644 index 7985e684a..000000000 --- a/libs/defi/oeth/tsconfig.storybook.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "emitDecoratorMetadata": true, - "outDir": "" - }, - "files": [ - "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nx/react/typings/cssmodule.d.ts", - "../../../node_modules/@nx/react/typings/image.d.ts" - ], - "exclude": [ - "src/**/*.spec.ts", - "src/**/*.test.ts", - "src/**/*.spec.js", - "src/**/*.test.js", - "src/**/*.spec.tsx", - "src/**/*.test.tsx", - "src/**/*.spec.jsx", - "src/**/*.test.js" - ], - "include": [ - "src/**/*.stories.ts", - "src/**/*.stories.js", - "src/**/*.stories.jsx", - "src/**/*.stories.tsx", - "src/**/*.stories.mdx", - ".storybook/*.js", - ".storybook/*.ts" -, ".storybook/preview.tsx" ] -} diff --git a/libs/defi/ousd/.babelrc b/libs/defi/ousd/.babelrc deleted file mode 100644 index 1ea870ead..000000000 --- a/libs/defi/ousd/.babelrc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "presets": [ - [ - "@nx/react/babel", - { - "runtime": "automatic", - "useBuiltIns": "usage" - } - ] - ], - "plugins": [] -} diff --git a/libs/defi/ousd/.eslintrc.json b/libs/defi/ousd/.eslintrc.json deleted file mode 100644 index 75b85077d..000000000 --- a/libs/defi/ousd/.eslintrc.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": ["plugin:@nx/react", "../../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], - "rules": {} - }, - { - "files": ["*.ts", "*.tsx"], - "rules": {} - }, - { - "files": ["*.js", "*.jsx"], - "rules": {} - } - ] -} diff --git a/libs/defi/ousd/.storybook/main.ts b/libs/defi/ousd/.storybook/main.ts deleted file mode 100644 index 257218aac..000000000 --- a/libs/defi/ousd/.storybook/main.ts +++ /dev/null @@ -1,26 +0,0 @@ -const config = { - stories: ['../src/**/*.stories.@(js|jsx|ts|tsx|mdx)'], - addons: ['@storybook/addon-essentials'], - framework: { - name: '@storybook/react-vite', - options: { - builder: { - viteConfigPath: `${__dirname}/../../../shared/storybook/vite.config.ts`, - }, - }, - }, - typescript: { - check: true, - checkOptions: { - typescript: { - configFile: `${__dirname}/../tsconfig.storybook.json`, - }, - }, - }, -}; - -export default config; - -// To customize your Vite configuration you can use the viteFinal field. -// Check https://storybook.js.org/docs/react/builders/vite#configuration -// and https://nx.dev/packages/storybook/documents/custom-builder-configs diff --git a/libs/defi/ousd/.storybook/preview.tsx b/libs/defi/ousd/.storybook/preview.tsx deleted file mode 100644 index d7cc85f52..000000000 --- a/libs/defi/ousd/.storybook/preview.tsx +++ /dev/null @@ -1,3 +0,0 @@ -import preview from '@origin/shared/storybook'; - -export default preview; diff --git a/libs/defi/ousd/README.md b/libs/defi/ousd/README.md deleted file mode 100644 index 4fbe00497..000000000 --- a/libs/defi/ousd/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# defi-ousd - -This library was generated with [Nx](https://nx.dev). - -## Running unit tests - -Run `nx test defi-ousd` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/libs/defi/ousd/project.json b/libs/defi/ousd/project.json deleted file mode 100644 index 382afe0b6..000000000 --- a/libs/defi/ousd/project.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "defi-ousd", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "libs/defi/ousd/src", - "projectType": "library", - "tags": [], - "targets": { - "lint": { - "executor": "@nx/linter:eslint", - "outputs": ["{options.outputFile}"], - "options": { - "lintFilePatterns": ["libs/defi/ousd/**/*.{ts,tsx,js,jsx}"] - } - }, - "storybook": { - "executor": "@nx/storybook:storybook", - "options": { - "port": 4400, - "configDir": "libs/defi/ousd/.storybook" - }, - "configurations": { - "ci": { - "quiet": true - } - } - }, - "build-storybook": { - "executor": "@nx/storybook:build", - "outputs": ["{options.outputDir}"], - "options": { - "outputDir": "dist/storybook/defi-ousd", - "configDir": "libs/defi/ousd/.storybook" - }, - "configurations": { - "ci": { - "quiet": true - } - } - } - } -} diff --git a/libs/defi/ousd/src/components/defi-ousd.tsx b/libs/defi/ousd/src/components/defi-ousd.tsx deleted file mode 100644 index 6ab60e347..000000000 --- a/libs/defi/ousd/src/components/defi-ousd.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { useIntl } from 'react-intl'; - -/* eslint-disable-next-line */ -export interface DefiOusdProps {} - -export function DefiOusd(props: DefiOusdProps) { - const intl = useIntl(); - return ( -
-

{intl.formatMessage({ defaultMessage: 'Welcome to DefiOusd!' })}

-
- ); -} - -export default DefiOusd; diff --git a/libs/defi/ousd/src/index.ts b/libs/defi/ousd/src/index.ts deleted file mode 100644 index 2e19a0b4d..000000000 --- a/libs/defi/ousd/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './components/defi-ousd'; diff --git a/libs/defi/ousd/tsconfig.json b/libs/defi/ousd/tsconfig.json deleted file mode 100644 index bcca652a1..000000000 --- a/libs/defi/ousd/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "allowJs": false, - "esModuleInterop": false, - "allowSyntheticDefaultImports": true, - "strict": true - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.lib.json" - }, - { - "path": "./tsconfig.storybook.json" - } - ], - "extends": "../../../tsconfig.base.json" -} diff --git a/libs/defi/ousd/tsconfig.lib.json b/libs/defi/ousd/tsconfig.lib.json deleted file mode 100644 index 0a600be77..000000000 --- a/libs/defi/ousd/tsconfig.lib.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": ["node"] - }, - "files": [ - "../../../node_modules/@nx/react/typings/cssmodule.d.ts", - "../../../node_modules/@nx/react/typings/image.d.ts" - ], - "exclude": [ - "jest.config.ts", - "src/**/*.spec.ts", - "src/**/*.test.ts", - "src/**/*.spec.tsx", - "src/**/*.test.tsx", - "src/**/*.spec.js", - "src/**/*.test.js", - "src/**/*.spec.jsx", - "src/**/*.test.jsx", - "**/*.stories.ts", - "**/*.stories.js", - "**/*.stories.jsx", - "**/*.stories.tsx" - ], - "include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"] -} diff --git a/libs/defi/ousd/tsconfig.storybook.json b/libs/defi/ousd/tsconfig.storybook.json deleted file mode 100644 index 7985e684a..000000000 --- a/libs/defi/ousd/tsconfig.storybook.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "emitDecoratorMetadata": true, - "outDir": "" - }, - "files": [ - "../../../node_modules/@nx/react/typings/styled-jsx.d.ts", - "../../../node_modules/@nx/react/typings/cssmodule.d.ts", - "../../../node_modules/@nx/react/typings/image.d.ts" - ], - "exclude": [ - "src/**/*.spec.ts", - "src/**/*.test.ts", - "src/**/*.spec.js", - "src/**/*.test.js", - "src/**/*.spec.tsx", - "src/**/*.test.tsx", - "src/**/*.spec.jsx", - "src/**/*.test.js" - ], - "include": [ - "src/**/*.stories.ts", - "src/**/*.stories.js", - "src/**/*.stories.jsx", - "src/**/*.stories.tsx", - "src/**/*.stories.mdx", - ".storybook/*.js", - ".storybook/*.ts" -, ".storybook/preview.tsx" ] -} diff --git a/libs/oeth/wrap/.babelrc b/libs/oeth/wrap/.babelrc deleted file mode 100644 index 1ea870ead..000000000 --- a/libs/oeth/wrap/.babelrc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "presets": [ - [ - "@nx/react/babel", - { - "runtime": "automatic", - "useBuiltIns": "usage" - } - ] - ], - "plugins": [] -} diff --git a/libs/oeth/wrap/.eslintrc.json b/libs/oeth/wrap/.eslintrc.json deleted file mode 100644 index a786f2cf3..000000000 --- a/libs/oeth/wrap/.eslintrc.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "extends": [ - "plugin:@nx/react", - "../../../.eslintrc.json" - ], - "ignorePatterns": [ - "!**/*" - ], - "overrides": [ - { - "files": [ - "*.ts", - "*.tsx", - "*.js", - "*.jsx" - ], - "rules": {} - }, - { - "files": [ - "*.ts", - "*.tsx" - ], - "rules": {} - }, - { - "files": [ - "*.js", - "*.jsx" - ], - "rules": {} - } - ] -} diff --git a/libs/oeth/wrap/README.md b/libs/oeth/wrap/README.md deleted file mode 100644 index 446cad759..000000000 --- a/libs/oeth/wrap/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# oeth-wrap - -This library was generated with [Nx](https://nx.dev). - -## Running unit tests - -Run `nx test oeth-wrap` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/libs/oeth/wrap/project.json b/libs/oeth/wrap/project.json deleted file mode 100644 index 1f8a9626e..000000000 --- a/libs/oeth/wrap/project.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "oeth-wrap", - "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "libs/oeth/wrap/src", - "projectType": "library", - "tags": [], - "targets": { - "lint": { - "executor": "@nx/linter:eslint", - "outputs": [ - "{options.outputFile}" - ], - "options": { - "lintFilePatterns": [ - "libs/oeth/wrap/**/*.{ts,tsx,js,jsx}" - ] - } - } - } -} diff --git a/libs/oeth/wrap/src/components/SwapWrap.tsx b/libs/oeth/wrap/src/components/SwapWrap.tsx deleted file mode 100644 index 2aa99896d..000000000 --- a/libs/oeth/wrap/src/components/SwapWrap.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import { useState } from 'react'; - -import { SwapCard } from '@origin/shared/components'; -import { useIntl } from 'react-intl'; - -export function PortfolioSwap() { - const intl = useIntl(); - const [values, setValues] = useState({ - baseToken: { - abbreviation: 'OETH', - imgSrc: 'https://app.oeth.com/images/currency/oeth-icon-small.svg', - quantity: 0, - }, - exchangeCurrency: { - abbreviation: 'wOETH', - imgSrc: 'https://app.oeth.com/images/currency/woeth-icon-small.svg', - quantity: 0, - }, - }); - - function handleValueChange(value: string) { - const number = parseInt(value) || 0; - setValues((prev) => ({ - baseToken: { - ...prev.baseToken, - quantity: number, - }, - exchangeCurrency: { - ...prev.exchangeCurrency, - quantity: number * number - 0.5, - }, - })); - } - - function swapTokens() { - setValues((prev) => ({ - baseToken: { - ...prev.exchangeCurrency, - quantity: prev.baseToken.quantity, - }, - exchangeCurrency: { - ...prev.baseToken, - quantity: prev.baseToken.quantity * prev.baseToken.quantity - 0.5, - }, - })); - } - - return ( - - ); -} diff --git a/libs/oeth/wrap/src/index.ts b/libs/oeth/wrap/src/index.ts deleted file mode 100644 index 0fe462b97..000000000 --- a/libs/oeth/wrap/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './views/WrapView'; diff --git a/libs/oeth/wrap/src/views/WrapView.tsx b/libs/oeth/wrap/src/views/WrapView.tsx deleted file mode 100644 index 0dcab5d10..000000000 --- a/libs/oeth/wrap/src/views/WrapView.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import { Button, Stack } from '@mui/material'; -import { ActionButton, Card } from '@origin/shared/components'; -import { useIntl } from 'react-intl'; - -import { PortfolioSwap } from '../components/SwapWrap'; - -export function WrapView() { - const intl = useIntl(); - - return ( - - - - - - console.log('test')}> - {intl.formatMessage({ defaultMessage: 'Connect' })} - - - ); -} diff --git a/libs/oeth/wrap/tsconfig.json b/libs/oeth/wrap/tsconfig.json deleted file mode 100644 index 90fcf85c5..000000000 --- a/libs/oeth/wrap/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "jsx": "react-jsx", - "allowJs": false, - "esModuleInterop": false, - "allowSyntheticDefaultImports": true, - "strict": false - }, - "files": [], - "include": [], - "references": [ - { - "path": "./tsconfig.lib.json" - } - ], - "extends": "../../../tsconfig.base.json" -} diff --git a/libs/oeth/wrap/tsconfig.lib.json b/libs/oeth/wrap/tsconfig.lib.json deleted file mode 100644 index 78f9e0f1c..000000000 --- a/libs/oeth/wrap/tsconfig.lib.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "../../../dist/out-tsc", - "types": ["node"] - }, - "files": [ - "../../../node_modules/@nx/react/typings/cssmodule.d.ts", - "../../../node_modules/@nx/react/typings/image.d.ts", - "../../../libs/shared/theme/src/theme.d.ts" - ], - "exclude": [ - "jest.config.ts", - "src/**/*.spec.ts", - "src/**/*.test.ts", - "src/**/*.spec.tsx", - "src/**/*.test.tsx", - "src/**/*.spec.js", - "src/**/*.test.js", - "src/**/*.spec.jsx", - "src/**/*.test.jsx" - ], - "include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"] -} diff --git a/tsconfig.base.json b/tsconfig.base.json index f5378cdcf..1c53af813 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -20,12 +20,6 @@ "strict": false, "baseUrl": ".", "paths": { - "@origin/defi/oeth": [ - "libs/defi/oeth/src/index.ts" - ], - "@origin/defi/ousd": [ - "libs/defi/ousd/src/index.ts" - ], "@origin/oeth/history": [ "libs/oeth/history/src/index.ts" ], @@ -35,9 +29,6 @@ "@origin/oeth/swap": [ "libs/oeth/swap/src/index.ts" ], - "@origin/oeth/wrap": [ - "libs/oeth/wrap/src/index.ts" - ], "@origin/shared/components": [ "libs/shared/components/src/index.ts" ],