Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

mui implementation and new app header #429

Merged
merged 218 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
218 commits
Select commit Hold shift + click to select a range
ff9e741
feat: implement figma tokens resolver
ignromanov Sep 16, 2024
0d1259b
feat: implement figma tokens validation
ignromanov Sep 18, 2024
9ebd95f
feat: add `curve–ui–kit` package with `MUI` & `storybook`
ignromanov Sep 19, 2024
b39ead1
chore: implement `storybook` main preferences
ignromanov Sep 20, 2024
815d99b
feat: implement basic `MUI` theme
ignromanov Sep 21, 2024
f4e34e9
feat: implement `CssBaseline` ui component
ignromanov Sep 27, 2024
c6d0470
feat: implement `Typography` ui styling
ignromanov Sep 30, 2024
9994cb0
feat: implement `Typography` story
ignromanov Oct 1, 2024
3707e6c
feat: implement `Button` ui style
ignromanov Oct 1, 2024
80df14c
create useTvl hook and lend query structure
DanielSchiavini Oct 1, 2024
115b3e5
Merge branch 'tanstack-lend' into llama-lend-queries
DanielSchiavini Oct 2, 2024
d13d870
feat: first llamalend queries
DanielSchiavini Oct 3, 2024
9139388
Merge branch 'main' of github.com:curvefi/curve-frontend into tanstac…
DanielSchiavini Oct 3, 2024
468cdfb
feat: useTokenUsdRate query hook
DanielSchiavini Oct 3, 2024
be0b049
refactor: get rid of usdRate slice
DanielSchiavini Oct 3, 2024
bb10315
refactor: cleanup unused code + review
DanielSchiavini Oct 4, 2024
122090f
fix: build errors
DanielSchiavini Oct 4, 2024
c4a4bf8
Merge branch 'main' of github.com:curvefi/curve-frontend into tanstac…
DanielSchiavini Oct 4, 2024
2c0feff
fix: unused import
DanielSchiavini Oct 4, 2024
c12cf1d
fix: lock file
DanielSchiavini Oct 4, 2024
82f0cb1
refactor: start replacing marketsSlice (WIP)
DanielSchiavini Oct 4, 2024
b8f2407
feat: implement `Button` story
ignromanov Oct 5, 2024
e9f5cdc
fix: review comments and formatting
DanielSchiavini Oct 7, 2024
1087b2f
refactor: inline function, re-enable cache
DanielSchiavini Oct 7, 2024
26d4aa8
Merge branch 'tanstack-lend' into llama-lend-queries
DanielSchiavini Oct 7, 2024
4f96b71
Merge branch 'main' of github.com:curvefi/curve-frontend into tanstac…
DanielSchiavini Oct 8, 2024
959677f
refactor: try to fix review comments
DanielSchiavini Oct 8, 2024
2f788a2
Merge branch 'main' of github.com:curvefi/curve-frontend into tanstac…
DanielSchiavini Oct 8, 2024
f3f657b
refactor: get rid of OWMData in favor of OneWayMarketTemplate
DanielSchiavini Oct 8, 2024
1980bae
fix: update usage after owm refactor
DanielSchiavini Oct 8, 2024
2038e57
refactor: get rid of `assertTokenParams`
DanielSchiavini Oct 8, 2024
4b69aae
refactor: create generic `createGetQueryData`
DanielSchiavini Oct 8, 2024
31153b9
Merge branch 'main' of github.com:curvefi/curve-frontend into tanstac…
DanielSchiavini Oct 9, 2024
f478696
Merge pull request #376 from curvefi/tanstack-lend
DanielSchiavini Oct 10, 2024
8cd636b
Merge branch 'main' of github.com:curvefi/curve-frontend into develop
DanielSchiavini Oct 11, 2024
4212f5c
Merge branch 'develop' of github.com:curvefi/curve-frontend into llam…
DanielSchiavini Oct 11, 2024
3a501d8
fix: load markets
DanielSchiavini Oct 11, 2024
af4d332
Merge branch 'main' of github.com:curvefi/curve-frontend into develop
DanielSchiavini Oct 14, 2024
b632736
Lint
DanielSchiavini Oct 14, 2024
4c8954d
self-review
DanielSchiavini Oct 14, 2024
096b8e8
Merge branch 'main' into chore/develop
DanielSchiavini Oct 14, 2024
243c58d
fix: markets page load stalled
DanielSchiavini Oct 14, 2024
2296ab5
Merge pull request #394 from curvefi/chore/develop
DanielSchiavini Oct 14, 2024
c73360c
fix: remove logging
DanielSchiavini Oct 14, 2024
a846146
Merge branch 'develop' of github.com:curvefi/curve-frontend into llam…
DanielSchiavini Oct 14, 2024
a075c5c
feat: implement `MUI` themes generator
ignromanov Oct 15, 2024
a5b81ec
Merge branch 'main' into update-dev
ignromanov Oct 17, 2024
da14484
Merge pull request #399 from curvefi/update-dev
ignromanov Oct 17, 2024
34ad574
Merge pull request #402 from curvefi/main
ignromanov Oct 21, 2024
f10fa38
Merge branch 'develop' into task/new-design-system
ignromanov Oct 21, 2024
3ce481b
ci: `vercel` deployment branch filtering
ignromanov Oct 21, 2024
547055d
chore: add empty `dao` folder
ignromanov Oct 21, 2024
44eb911
chore: after review changes
ignromanov Oct 21, 2024
6e1cc76
ci: deploy storybook from the current branch
ignromanov Oct 21, 2024
42f52ea
Merge pull request #405 from curvefi/main
DanielSchiavini Oct 21, 2024
bb1842a
Merge branch 'develop' into llama-lend-queries
DanielSchiavini Oct 21, 2024
ed5166c
Merge branch 'develop' into task/new-design-system
ignromanov Oct 21, 2024
54d2050
chore: remove `.gitkeep` file
ignromanov Oct 21, 2024
5b7dd47
chore: after review changes
ignromanov Oct 22, 2024
bfd98b2
Merge pull request #400 from curvefi/task/new-design-system
ignromanov Oct 22, 2024
0936224
Merge branch 'develop' into llama-lend-queries
DanielSchiavini Oct 23, 2024
9520b93
Merge branch 'refactor/query-model' of github.com:curvefi/curve-front…
DanielSchiavini Oct 23, 2024
c7e3d84
refactor: use query factory
DanielSchiavini Oct 23, 2024
b1d7544
Merge branch 'refactor/query-model' into chore/develop
DanielSchiavini Oct 23, 2024
8d38714
Merge branch 'chore/develop' into llama-lend-queries
DanielSchiavini Oct 23, 2024
03da037
fix: hotfix validation
DanielSchiavini Oct 23, 2024
0a4ba4d
Merge branch 'chore/develop' into llama-lend-queries
DanielSchiavini Oct 23, 2024
4de9bb2
fix: review comments
DanielSchiavini Oct 23, 2024
982d2b2
Merge branch 'refactor/query-model' into chore/develop
DanielSchiavini Oct 23, 2024
dd97eae
refactor: get rid of API hook
DanielSchiavini Oct 23, 2024
9faf901
Merge branch 'chore/develop' of github.com:curvefi/curve-frontend int…
DanielSchiavini Oct 23, 2024
de5e692
Merge branch 'main' into chore/develop
DanielSchiavini Oct 23, 2024
a38e18c
Merge pull request #410 from curvefi/chore/develop
DanielSchiavini Oct 23, 2024
7221270
Merge branch 'develop' into llama-lend-queries
DanielSchiavini Oct 25, 2024
c79ecfb
Merge pull request #378 from curvefi/llama-lend-queries
DanielSchiavini Oct 25, 2024
462e046
Merge branch 'develop' of github.com:curvefi/curve-frontend into feat…
DanielSchiavini Oct 25, 2024
bfa22fd
Merge branch 'develop' of github.com:curvefi/curve-frontend into feat…
DanielSchiavini Oct 25, 2024
267f5b0
Fix imports
DanielSchiavini Oct 25, 2024
97cdc87
Merge pull request #418 from curvefi/chore/develop
DanielSchiavini Oct 25, 2024
b0d072f
feat: connect wallet ui
DanielSchiavini Oct 27, 2024
63decf9
fix: import, lint and build issues
DanielSchiavini Oct 29, 2024
eaeb67b
fix: fonts
DanielSchiavini Oct 29, 2024
27fcc1f
fix: Update lock file
DanielSchiavini Oct 29, 2024
05c5143
feat: chain/language selectors
DanielSchiavini Oct 29, 2024
7f2e0be
Merge pull request #419 from curvefi/feat/develop/connect-wallet
DanielSchiavini Oct 29, 2024
3cefa5e
Merge branch 'develop' of github.com:curvefi/curve-frontend into feat…
DanielSchiavini Oct 29, 2024
dbf48ed
refactor: separate pages and apps
DanielSchiavini Oct 30, 2024
984fd40
feat: implement app buttons
DanielSchiavini Oct 30, 2024
478393a
feat: implement new llamalend desktop header
DanielSchiavini Oct 30, 2024
fd49762
Merge branch 'main' of github.com:curvefi/curve-frontend into chore/d…
DanielSchiavini Oct 30, 2024
3531dde
fix: update lock file
DanielSchiavini Oct 30, 2024
86853e4
feat: theme switcher
DanielSchiavini Oct 30, 2024
e0585f7
feat: advanced mode switcher
DanielSchiavini Oct 30, 2024
a6f2f34
feat: new mobile menu
DanielSchiavini Nov 1, 2024
900857c
feat: social buttons
DanielSchiavini Nov 1, 2024
2949bce
feat: new documentation/security sections
DanielSchiavini Nov 1, 2024
e0b807d
feat: Chinese sites
DanielSchiavini Nov 1, 2024
eb1dea1
feat: new settings accordion for mobile
DanielSchiavini Nov 2, 2024
20ca8ef
fix: build
DanielSchiavini Nov 4, 2024
13baa41
feat: update settings menu for mobile
DanielSchiavini Nov 4, 2024
1f11b7f
chore: update design tokens
DanielSchiavini Nov 4, 2024
57e7970
fix: review comments
DanielSchiavini Nov 5, 2024
5296a8b
fix: theme issues
DanielSchiavini Nov 5, 2024
b327628
feat: animate menu toggle
DanielSchiavini Nov 5, 2024
de41cb7
ux: larger hamburger icon, padding subtitle
DanielSchiavini Nov 6, 2024
f743359
Merge branch 'feat/develop/connect-wallet' into figma-tokens
DanielSchiavini Nov 6, 2024
b39dfa7
refactor: rework figma token extraction
DanielSchiavini Nov 6, 2024
abc6a11
chore: self-review
DanielSchiavini Nov 6, 2024
ce89616
fix: menu drawer animation
DanielSchiavini Nov 6, 2024
15e8140
feat: pin the menu bar
DanielSchiavini Nov 6, 2024
bef3b9d
fix: header stats
DanielSchiavini Nov 6, 2024
b8bee5b
feat: use new header for `main` app
DanielSchiavini Nov 8, 2024
74f0b3c
Merge branch 'feat/develop/connect-wallet' into figma-tokens
DanielSchiavini Nov 8, 2024
a9f65be
Merge pull request #421 from curvefi/feat/develop/connect-wallet
DanielSchiavini Nov 8, 2024
fd4c4e1
fix: main header
DanielSchiavini Nov 8, 2024
f67e58a
chore: improve switch animation
DanielSchiavini Nov 8, 2024
18219bb
Merge branch 'develop' of github.com:curvefi/curve-frontend into figm…
DanielSchiavini Nov 8, 2024
989a559
fix: border radius, dropdown design
DanielSchiavini Nov 8, 2024
b4f6fe3
feat: new header in crvUSD app
DanielSchiavini Nov 8, 2024
c01fd93
Merge branch 'develop' of github.com:curvefi/curve-frontend into header
DanielSchiavini Nov 8, 2024
c55f0a8
fix: bad references
DanielSchiavini Nov 8, 2024
9072c9c
chore: delete unused AppNav
DanielSchiavini Nov 8, 2024
abeb784
Merge pull request #432 from curvefi/main
DanielSchiavini Nov 11, 2024
c760c22
Merge branch 'develop' of github.com:curvefi/curve-frontend into chor…
DanielSchiavini Nov 11, 2024
a9f62d3
Merge branch 'task-stake-withdraw-stcrvusd' of github.com:curvefi/cur…
DanielSchiavini Nov 11, 2024
c321cab
Merge branch 'develop' into figma-tokens
DanielSchiavini Nov 11, 2024
cfc23dc
Merge branch 'develop' into header
DanielSchiavini Nov 11, 2024
72d6ec6
feat: storybook publishing, add new components
DanielSchiavini Nov 11, 2024
c3cbf39
fix: storybook workflow
DanielSchiavini Nov 11, 2024
c09341a
refactor: cleanup separate toolbar colors
DanielSchiavini Nov 11, 2024
62344c3
chore: inline workflow
DanielSchiavini Nov 11, 2024
04a651a
Merge pull request #433 from curvefi/chore/develop
DanielSchiavini Nov 11, 2024
d15edae
fix: storybook static build
DanielSchiavini Nov 13, 2024
19dfbe0
fix: add env
DanielSchiavini Nov 13, 2024
0af0a0b
Merge branch 'main' of github.com:curvefi/curve-frontend into chore/d…
DanielSchiavini Nov 14, 2024
ca19394
Merge branch 'develop' of github.com:curvefi/curve-frontend into header
DanielSchiavini Nov 14, 2024
9964420
Merge pull request #442 from curvefi/chore/develop
DanielSchiavini Nov 14, 2024
9eb0930
Merge branch 'develop' of github.com:curvefi/curve-frontend into header
DanielSchiavini Nov 14, 2024
52720b3
Merge pull request #427 from curvefi/figma-tokens
DanielSchiavini Nov 14, 2024
1b79f37
Merge branch 'develop' of github.com:curvefi/curve-frontend into header
DanielSchiavini Nov 14, 2024
5b077c3
Merge pull request #430 from curvefi/header
DanielSchiavini Nov 14, 2024
de9e664
Merge branch 'main' of github.com:curvefi/curve-frontend into chore/d…
DanielSchiavini Nov 15, 2024
0227fa6
fix: manually change name of heading variant for now
DanielSchiavini Nov 15, 2024
d050263
fix: header items size
DanielSchiavini Nov 15, 2024
13ab266
feat: Palette story
DanielSchiavini Nov 15, 2024
34e6db1
fix: single story with the full palette
DanielSchiavini Nov 15, 2024
c2b654a
Merge branch 'main' of github.com:curvefi/curve-frontend into chore/d…
DanielSchiavini Nov 18, 2024
160a164
Merge branch 'chore/develop' of github.com:curvefi/curve-frontend int…
DanielSchiavini Nov 18, 2024
506ec2f
Merge pull request #448 from curvefi/chore/develop
DanielSchiavini Nov 18, 2024
a69f54e
fix: new SwitcherTabs component
DanielSchiavini Nov 18, 2024
ac8c881
fix: use SwitcherTabs component in header
DanielSchiavini Nov 18, 2024
5dcddbb
Merge branch 'develop' of github.com:curvefi/curve-frontend into header
DanielSchiavini Nov 18, 2024
76d79e5
fix: header margins
DanielSchiavini Nov 18, 2024
f7f92aa
feat: add different background layers
DanielSchiavini Nov 18, 2024
224df22
fix: navigation borders, shadows, stickyness, sizes
DanielSchiavini Nov 18, 2024
78fab3c
fix: subnav current style
DanielSchiavini Nov 18, 2024
063ad90
fix: remove toggle shadow
DanielSchiavini Nov 18, 2024
c804b20
fix: close down navigation when clicking link
DanielSchiavini Nov 18, 2024
9f575f3
chore: add sidebar settings bottom padding
DanielSchiavini Nov 18, 2024
6b17168
fix: chad mode fonts
DanielSchiavini Nov 19, 2024
0232fc3
fix: gray subnav labels
DanielSchiavini Nov 19, 2024
f8c0f09
fix: mobile nav item colors
DanielSchiavini Nov 19, 2024
34463f9
fix: theme selected button colors
DanielSchiavini Nov 19, 2024
69b4235
fix: mobile navigation
DanielSchiavini Nov 19, 2024
540a830
fix: cypress header tests
DanielSchiavini Nov 19, 2024
d751000
chore: save cypress screenshots
DanielSchiavini Nov 19, 2024
acceb4b
fix: handle cypress dark vs light modes
DanielSchiavini Nov 19, 2024
4985dfe
chore: lint
DanielSchiavini Nov 19, 2024
0da3b03
chore: get rid of hubot sans
DanielSchiavini Nov 19, 2024
bda04e4
fix: export correct font
DanielSchiavini Nov 19, 2024
56289d2
Adds Minecraft font and updates typography in curve-ui-kit typography
0xtutti Nov 20, 2024
7dddb4b
fix: storybook
DanielSchiavini Nov 20, 2024
846258d
refactor: get rid of figma tokens
DanielSchiavini Nov 20, 2024
0853fe9
chore: delete language switcher
DanielSchiavini Nov 20, 2024
86c0e15
Merge branch 'header' into refactor/figma
DanielSchiavini Nov 20, 2024
cdec093
Merge branch 'main' of github.com:curvefi/curve-frontend into chore/d…
DanielSchiavini Nov 20, 2024
bba4950
Merge pull request #455 from curvefi/chore/develop
DanielSchiavini Nov 20, 2024
0f45849
Merge branch 'develop' of github.com:curvefi/curve-frontend into header
DanielSchiavini Nov 20, 2024
fd3f719
chore: remove react-query devtools
DanielSchiavini Nov 20, 2024
c0e56e5
Merge pull request #454 from curvefi/refactor/figma
DanielSchiavini Nov 20, 2024
2f55206
fix: hide crypto share to avoid layout issues
DanielSchiavini Nov 20, 2024
9f20c74
Updates colours of the light theme to match the new colours that will…
0xtutti Nov 21, 2024
e8ae52a
fix: switch, tabs and button colors
DanielSchiavini Nov 21, 2024
f5db44c
chore: remove advanced toggle for DEX app
DanielSchiavini Nov 21, 2024
9969cc1
Merge pull request #449 from curvefi/header
DanielSchiavini Nov 21, 2024
733669e
Assigns all transparent primary400 colors to primary 400
0xtutti Nov 21, 2024
980c58b
Merge pull request #457 from curvefi/Temporary-color-adjustment
DanielSchiavini Nov 21, 2024
127609e
fix: page height and width observers
DanielSchiavini Nov 21, 2024
9d471e9
Updates dark theme to new colour theme
0xtutti Nov 21, 2024
c885069
Updates Chad theme to new colors and menu fixes in dark and light theme
0xtutti Nov 21, 2024
a6f3cdb
Merge pull request #460 from curvefi/Update-dark-theme-colours
DanielSchiavini Nov 22, 2024
1983eca
Merge branch 'develop' of github.com:curvefi/curve-frontend into header
DanielSchiavini Nov 22, 2024
37afdd9
refactor: invert palettes to keep colors together
DanielSchiavini Nov 22, 2024
208a9c6
fix: button/tab borders
DanielSchiavini Nov 22, 2024
98a356f
fix: node version
DanielSchiavini Nov 22, 2024
78582ab
fix: subheader height
DanielSchiavini Nov 22, 2024
3684fcf
Merge pull request #458 from curvefi/header
DanielSchiavini Nov 22, 2024
2ad24a0
Merge branch 'main' of github.com:curvefi/curve-frontend into chore/d…
DanielSchiavini Nov 25, 2024
78bb130
fix: chain icon size
DanielSchiavini Nov 25, 2024
b39ba69
chore: delete unused code
DanielSchiavini Nov 25, 2024
ccddc46
Merge pull request #465 from curvefi/chore/develop
DanielSchiavini Nov 25, 2024
0537292
fix: curve lite and hubot sans
DanielSchiavini Nov 25, 2024
8b868a0
Merge branch 'develop' of github.com:curvefi/curve-frontend into header
DanielSchiavini Nov 25, 2024
3e839b3
fix: build
DanielSchiavini Nov 25, 2024
b9a1668
Updates scrvUSD Action card background colour and inputs
0xtutti Nov 25, 2024
594637c
fix: hubot vs minecraft
DanielSchiavini Nov 25, 2024
9a2cfdf
feat: use compact notation in header
DanielSchiavini Nov 25, 2024
6c2f294
styling: updated scrvusd input label color
OnlyJousting Nov 25, 2024
9fd06f1
feat: move integration to the footer
DanielSchiavini Nov 25, 2024
d35c429
fix: lend tvl
DanielSchiavini Nov 25, 2024
e526daa
fix: cypress test
DanielSchiavini Nov 25, 2024
bac32c4
Merge branch 'main' of github.com:curvefi/curve-frontend into chore/d…
DanielSchiavini Nov 25, 2024
a96f8c0
Merge pull request #468 from curvefi/chore/develop
DanielSchiavini Nov 25, 2024
388f2d4
Fixes colors on tabs for scrvUSD
0xtutti Nov 25, 2024
7e215c0
Merge branch 'develop' into header
DanielSchiavini Nov 25, 2024
f12ff2f
Merge pull request #467 from curvefi/header
DanielSchiavini Nov 25, 2024
0f3bb93
fix: added back translation string literal
OnlyJousting Nov 25, 2024
cf1996d
Merge pull request #469 from curvefi/Match_scrvUSD_Styling-to-update-…
OnlyJousting Nov 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 8 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@ jobs:
timeout-minutes: 5
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
app: [main, loan, lend]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
Expand All @@ -32,3 +33,9 @@ jobs:
working-directory: apps/${{ matrix.app }}
- run: yarn run cy:run:e2e:${{ matrix.app }}
working-directory: tests

- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-${{ matrix.app }}
path: tests/cypress
42 changes: 42 additions & 0 deletions .github/workflows/storybook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Storybook
description: Builds and deploys Storybook to GitHub Pages

on:
push:
branches:
- main

permissions:
contents: read
pages: write
id-token: write

jobs:
deploy:
environment:
name: github-pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn

- name: 'Build'
working-directory: packages/curve-ui-kit
run: |
yarn install --immutable
yarn build:storybook
- name: 'upload'
uses: actions/upload-pages-artifact@v3
with:
path: packages/curve-ui-kit/storybook-static
name: 'github-pages'

- id: deploy
name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
with:
token: ${{ github.token }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,7 @@ report.*.json

# hardhat
tests/cache

# storybook
storybook-static
*storybook.log
4 changes: 2 additions & 2 deletions .vercel/storybook-branch-filtering.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

echo "VERCEL_GIT_COMMIT_REF: $VERCEL_GIT_COMMIT_REF"

if [[ "$VERCEL_GIT_COMMIT_REF" == "develop" ]] ; then
if [[ "$VERCEL_GIT_COMMIT_REF" == "develop" || "$VERCEL_GIT_COMMIT_REF" == "feat/develop/connect-wallet" ]] ; then
# Proceed with the build
echo "✅ - Build can proceed"
exit 1;
Expand All @@ -11,4 +11,4 @@ else
# Don't build
echo "🛑 - Build cancelled"
exit 0;
fi
fi
2 changes: 1 addition & 1 deletion apps/lend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"curve-common": "*",
"curve-lib": "*",
"dayjs": "^1.11.7",
"ethers": "^6.10.0",
"ethers": "^6.11.0",
"external-rewards": "*",
"focus-visible": "5.2.0",
"fuse.js": "^6.6.2",
Expand Down
6 changes: 3 additions & 3 deletions apps/lend/src/components/AlertLoanSummary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import SummaryPartial from '@/components/AlertLoanSummary/components/SummaryPart
import SummarySelfLiquidate from '@/components/AlertLoanSummary/components/SummarySelfLiquidate'
import SummaryChange from '@/components/AlertLoanSummary/components/SummaryChange'

const AlertLoanSummary = ({ borrowed_token, collateral_token, type, ...props }: AlertSummaryProps) => {
const { symbol: collateralSymbol = '' } = collateral_token ?? {}
const { symbol: borrowedSymbol = '' } = borrowed_token ?? {}
const AlertLoanSummary = ({ market, type, ...props }: AlertSummaryProps) => {
const { symbol: collateralSymbol = '' } = market?.collateral_token ?? {}
const { symbol: borrowedSymbol = '' } = market?.borrowed_token ?? {}

const message = {
repayAndClose: t`Repay and Close Loan Details:`,
Expand Down
4 changes: 2 additions & 2 deletions apps/lend/src/components/AlertLoanSummary/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'

export type AlertSummaryProps = Pick<PageContentProps, 'borrowed_token' | 'collateral_token'> & {
export type AlertSummaryProps = Pick<PageContentProps, 'market'> & {
pendingMessage: React.ReactNode
receive: string | undefined
formValueStateDebt?: string | undefined
Expand All @@ -12,7 +12,7 @@ export type AlertSummaryProps = Pick<PageContentProps, 'borrowed_token' | 'colla
type: 'create' | 'full' | 'partial' | 'self' | 'change'
}

export type SummaryProps = Omit<AlertSummaryProps, 'borrowed_token' | 'collateral_token' | 'type'> & {
export type SummaryProps = Omit<AlertSummaryProps, 'market' | 'type'> & {
title: React.ReactNode
borrowedSymbol: string
collateralSymbol: string
Expand Down
6 changes: 3 additions & 3 deletions apps/lend/src/components/ChartBandBalances/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ const ChartBandBalances = ({
showLiquidationIndicator,
title,
setBrushIndex,
borrowed_token,
collateral_token,
}: Pick<PageContentProps, 'rChainId' | 'rOwmId' | 'borrowed_token' | 'collateral_token'> & {
market,
}: Pick<PageContentProps, 'rChainId' | 'rOwmId' | 'market'> & {
brushIndex: BrushStartEndIndex
data: ParsedBandsBalances[]
oraclePrice: string | undefined
Expand All @@ -49,6 +48,7 @@ const ChartBandBalances = ({
title: string
setBrushIndex: React.Dispatch<BrushStartEndIndex>
}) => {
const { borrowed_token, collateral_token } = market ?? {};
const xAxisDisplayType = useStore((state) => state.chartBands.xAxisDisplayType)
const statsCapAndAvailable = useStore((state) => state.markets.statsCapAndAvailableMapper[rChainId]?.[rOwmId])

Expand Down
5 changes: 3 additions & 2 deletions apps/lend/src/components/ChartLiquidationRange/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
ResponsiveContainer,
Tooltip,
XAxis,
YAxis,
YAxis
} from 'recharts'
import { t } from '@lingui/macro'
import React from 'react'
Expand All @@ -17,14 +17,15 @@ import styled from 'styled-components'
import { formatNumber } from '@/ui/utils'

import ChartTooltip, { TipContent, TipIcon, TipTitle } from '@/components/ChartTooltip'
import type { ThemeKey } from 'curve-ui-kit/src/themes/basic-theme'

interface Props {
data: { name: string; curr: number[]; new: number[]; oraclePrice: string; oraclePriceBand: number | null }[]
healthColorKey: HeathColorKey | undefined
height?: number
isDetailView?: boolean // component not inside the form
isManage: boolean
theme: Theme
theme: ThemeKey
}

const ChartLiquidationRange = ({ height, data, healthColorKey, isManage, isDetailView, theme }: Props) => {
Expand Down
97 changes: 52 additions & 45 deletions apps/lend/src/components/ChartOhlcWrapper/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ import Box from '@/ui/Box'
import PoolActivity from '@/components/ChartOhlcWrapper/PoolActivity'
import TextCaption from '@/ui/TextCaption'
import AlertBox from '@/ui/AlertBox'
import { useOneWayMarket } from '@/entities/chain'

const ChartOhlcWrapper: React.FC<ChartOhlcWrapperProps> = ({ rChainId, userActiveKey, rOwmId }) => {
const market = useOneWayMarket(rChainId, rOwmId).data
const isAdvanceMode = useStore((state) => state.isAdvanceMode)
const themeType = useStore((state) => state.themeType)
const owm = useStore((state) => state.markets.owmDatasMapper[rChainId]?.[rOwmId]?.owm)
const borrowMoreActiveKey = useStore((state) => state.loanBorrowMore.activeKey)
const loanRepayActiveKey = useStore((state) => state.loanRepay.activeKey)
const loanCollateralAddActiveKey = useStore((state) => state.loanCollateralAdd.activeKey)
Expand Down Expand Up @@ -174,26 +175,26 @@ const ChartOhlcWrapper: React.FC<ChartOhlcWrapperProps> = ({ rChainId, userActiv
])

const coins: LendingMarketTokens = useMemo(() => {
return owm
return market
? {
borrowedToken: {
symbol: owm?.borrowed_token.symbol,
address: owm?.borrowed_token.address,
symbol: market?.borrowed_token.symbol,
address: market?.borrowed_token.address,
},
collateralToken: {
symbol: owm?.collateral_token.symbol,
address: owm?.collateral_token.address,
symbol: market?.collateral_token.symbol,
address: market?.collateral_token.address,
},
}
: null
}, [owm])
}, [market])

const selectChartList = useCallback(() => {
if (chartOraclePoolOhlc.fetchStatus === 'LOADING') {
return [{ label: t`Loading` }, { label: t`Loading` }]
}

if (owm) {
if (market) {
if (chartOraclePoolOhlc.dataDisabled) {
return [{ label: t`${coins?.collateralToken.symbol} / ${coins?.borrowedToken.symbol} (LLAMMA)` }]
}
Expand All @@ -216,7 +217,7 @@ const ChartOhlcWrapper: React.FC<ChartOhlcWrapperProps> = ({ rChainId, userActiv
chartOraclePoolOhlc.fetchStatus,
coins?.borrowedToken.symbol,
coins?.collateralToken.symbol,
owm,
market,
])

// set chart selected index to llamma if oracle pool is disabled due to no oracle pools being found for market on the api
Expand Down Expand Up @@ -265,51 +266,55 @@ const ChartOhlcWrapper: React.FC<ChartOhlcWrapperProps> = ({ rChainId, userActiv
}, [timeOption])

const refetchPricesData = useCallback(() => {
fetchOraclePoolOhlcData(
rChainId,
owm?.addresses.controller,
chartInterval,
timeUnit,
chartTimeSettings.start,
chartTimeSettings.end
)
fetchLlammaOhlcData(
rChainId,
rOwmId,
owm?.addresses.amm,
chartInterval,
timeUnit,
chartTimeSettings.start,
chartTimeSettings.end
)
if (market?.addresses.controller) {
fetchOraclePoolOhlcData(
rChainId,
market.addresses.controller,
chartInterval,
timeUnit,
chartTimeSettings.start,
chartTimeSettings.end
)
}
if (market?.addresses.amm) {
fetchLlammaOhlcData(
rChainId,
rOwmId,
market.addresses.amm,
chartInterval,
timeUnit,
chartTimeSettings.start,
chartTimeSettings.end
)
}
}, [
chartInterval,
chartTimeSettings.end,
chartTimeSettings.start,
fetchLlammaOhlcData,
fetchOraclePoolOhlcData,
owm?.addresses.amm,
owm?.addresses.controller,
market?.addresses.amm,
market?.addresses.controller,
rChainId,
rOwmId,
timeUnit,
])

// initial fetch
useEffect(() => {
if (owm !== undefined) {
if (market !== undefined) {
fetchLlammaOhlcData(
rChainId,
rOwmId,
owm?.addresses.amm,
market.addresses.amm,
chartInterval,
timeUnit,
chartTimeSettings.start,
chartTimeSettings.end
)
fetchOraclePoolOhlcData(
rChainId,
owm?.addresses.controller,
market.addresses.controller,
chartInterval,
timeUnit,
chartTimeSettings.start,
Expand All @@ -325,7 +330,7 @@ const ChartOhlcWrapper: React.FC<ChartOhlcWrapperProps> = ({ rChainId, userActiv
timeUnit,
fetchLlammaOhlcData,
fetchOraclePoolOhlcData,
owm,
market,
rOwmId,
])

Expand All @@ -334,17 +339,19 @@ const ChartOhlcWrapper: React.FC<ChartOhlcWrapperProps> = ({ rChainId, userActiv
const endTime = subtractTimeUnit(timeOption, lastFetchEndTime)
const startTime = getThreeHundredResultsAgo(timeOption, endTime)

fetchMoreData(
rChainId,
owm?.addresses.controller,
owm?.addresses.amm,
chartInterval,
timeUnit,
startTime,
endTime
)
if (market?.addresses.controller && market?.addresses.amm) {
fetchMoreData(
rChainId,
market?.addresses.controller,
market?.addresses.amm,
chartInterval,
timeUnit,
startTime,
endTime
)
}
},
[timeOption, fetchMoreData, rChainId, owm?.addresses.amm, owm?.addresses.controller, chartInterval, timeUnit]
[timeOption, fetchMoreData, rChainId, market?.addresses.amm, market?.addresses.controller, chartInterval, timeUnit]
)

if (ohlcDataUnavailable) {
Expand Down Expand Up @@ -391,7 +398,7 @@ const ChartOhlcWrapper: React.FC<ChartOhlcWrapperProps> = ({ rChainId, userActiv
/>
</Wrapper>
<LpEventsWrapperExpanded>
<PoolActivity poolAddress={owm?.addresses.amm} chainId={rChainId} coins={coins} />
{market && <PoolActivity poolAddress={market.addresses.amm} chainId={rChainId} coins={coins} />}
</LpEventsWrapperExpanded>
</ExpandedWrapper>
) : (
Expand All @@ -418,8 +425,8 @@ const ChartOhlcWrapper: React.FC<ChartOhlcWrapperProps> = ({ rChainId, userActiv
</ExpandButton>
)}
</SelectorRow>
{poolInfo === 'poolActivity' && (
<PoolActivity poolAddress={owm?.addresses.amm} chainId={rChainId} coins={coins} />
{poolInfo === 'poolActivity' && market && (
<PoolActivity poolAddress={market.addresses.amm} chainId={rChainId} coins={coins} />
)}
{poolInfo === 'chart' && (
<ChartWrapper
Expand Down
5 changes: 2 additions & 3 deletions apps/lend/src/components/DetailInfoCrvIncentives.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import styled from 'styled-components'
import { FORMAT_OPTIONS, formatNumber } from '@/ui/utils'
import { INVALID_ADDRESS } from '@/constants'
import useAbiTotalSupply from '@/hooks/useAbiTotalSupply'
import useStore from '@/store/useStore'
import useSupplyTotalApr from '@/hooks/useSupplyTotalApr'

import DetailInfo from '@/ui/DetailInfo'
import Icon from '@/ui/Icon'
import TooltipIcon from '@/ui/Tooltip/TooltipIcon'
import { useOneWayMarket } from '@/entities/chain'

type Data = {
label: string
Expand All @@ -32,8 +32,7 @@ const DetailInfoCrvIncentives = ({
lpTokenAmount: string
}) => {
const { tooltipValues } = useSupplyTotalApr(rChainId, rOwmId)
const owmData = useStore((state) => state.markets.owmDatasMapper[rChainId]?.[rOwmId])
const { gauge: gaugeAddress } = owmData?.owm?.addresses ?? {}
const gaugeAddress = useOneWayMarket(rChainId, rOwmId).data?.addresses?.gauge
const gaugeTotalSupply = useAbiTotalSupply(rChainId, gaugeAddress)
const isGaugeAddressInvalid = gaugeAddress === INVALID_ADDRESS

Expand Down
Loading
Loading