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

Feat: Persistent User Data #1617

Merged
merged 86 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from 78 commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
5648454
persistent user data with prisma
tokdaniel Oct 30, 2024
9ec2cdc
fix lint
tokdaniel Oct 30, 2024
c0a0655
ignore regular .env too
tokdaniel Oct 30, 2024
fa575a7
remove unnecessary async
tokdaniel Oct 30, 2024
c4cde7a
Merge branch 'master' into feat/persistent-user-data
tokdaniel Oct 30, 2024
bd05c7f
address comments
tokdaniel Oct 31, 2024
5c6e243
rename hooks and provider to userMetadata...
tokdaniel Oct 31, 2024
1e2d6cb
add trade table and extend providers executeTrade with callback
tokdaniel Nov 4, 2024
c182bd3
fix npm command
tokdaniel Nov 4, 2024
dc60836
update schema.prisma
tokdaniel Nov 5, 2024
f3889ee
merge master
tokdaniel Nov 5, 2024
79bdaaf
isminting passed in
tokdaniel Nov 5, 2024
1042814
better schema without unnecessary stuff
tokdaniel Nov 6, 2024
c81e04a
include view from materializedview
tokdaniel Nov 6, 2024
fe4228f
remove comment
tokdaniel Nov 6, 2024
398a156
remove totalFeesUSD
tokdaniel Nov 6, 2024
f462dfd
fix linting
tokdaniel Nov 7, 2024
23cbb4f
merge master
tokdaniel Nov 19, 2024
ceed86e
merge master update prisma schema
tokdaniel Nov 19, 2024
2988ca5
update prisma
tokdaniel Nov 19, 2024
2c9deb2
no need toBigInt anymore
tokdaniel Nov 19, 2024
3803ae5
quoteType mapping, and indexcoop refid
tokdaniel Nov 19, 2024
aef2fb3
add placeholders for mint and redeem fees
tokdaniel Nov 20, 2024
271ee49
update prisma schema
tokdaniel Nov 20, 2024
84783c7
Merge branch 'master' of github.com:IndexCoop/index-app into feat/per…
tokdaniel Nov 25, 2024
c539f4a
move to apiv2
tokdaniel Nov 28, 2024
e8dd9c1
add eslint disable to generated files
tokdaniel Nov 28, 2024
e19a575
ts-nocheck for generated as well
tokdaniel Nov 28, 2024
9ad9949
allow .ts imports in tsconfig
tokdaniel Nov 28, 2024
f021c0b
Merge branch 'master' into feat/persistent-user-data
tokdaniel Nov 28, 2024
944b3ab
fix linting and imports
tokdaniel Nov 28, 2024
e22c127
use api.indexcoop as baseurl
tokdaniel Nov 28, 2024
28dd7ec
handle ep errors and send messages back
tokdaniel Nov 28, 2024
0996cf8
exclude admin endpoints from kubb generator
tokdaniel Nov 28, 2024
ccc299d
comment fixes
tokdaniel Nov 28, 2024
288960c
Merge branch 'master' of github.com:IndexCoop/index-app into feat/per…
tokdaniel Dec 2, 2024
1b2a02b
Merge branch 'master' of github.com:IndexCoop/index-app into feat/per…
tokdaniel Dec 9, 2024
0073710
change url to cloudflare redirect
tokdaniel Dec 9, 2024
fee2bc8
fix kubb conf api baseUrl
tokdaniel Dec 9, 2024
1fd81c8
remove /api/v2 from the url for the redirect
tokdaniel Dec 9, 2024
ad3a2d2
change api url back to render one for now
tokdaniel Dec 9, 2024
c604f79
remove url replace
tokdaniel Dec 9, 2024
8ceaeb3
merge master
tokdaniel Dec 13, 2024
05161dd
add fees to trade
tokdaniel Dec 13, 2024
3df97db
add working history and open positions
tokdaniel Dec 20, 2024
c66f0e4
underlyingAsset symbol & denominator
tokdaniel Dec 20, 2024
4fb04fb
use USD as default denominator
tokdaniel Dec 20, 2024
946f9b9
merge master
tokdaniel Dec 20, 2024
5d7c436
lint fix
tokdaniel Dec 20, 2024
fd5cec7
move history sorting to backend too
tokdaniel Dec 20, 2024
6291e16
reinstall dependencies
tokdaniel Dec 20, 2024
c22271e
linting issues on gha
tokdaniel Dec 20, 2024
8f52247
linting again
tokdaniel Dec 20, 2024
158bd93
Merge branch 'master' of github.com:IndexCoop/index-app into feat/per…
tokdaniel Dec 20, 2024
967f155
Fix lint
0xonramp Dec 20, 2024
8bdaadb
fix gasestimatoor
tokdaniel Dec 20, 2024
8b508af
fix typeerrors in tests
tokdaniel Dec 20, 2024
3594d3c
fix viem / wagmi versions
tokdaniel Dec 20, 2024
f6d8a51
lint with no cache
tokdaniel Dec 20, 2024
a23cf31
update eslint
tokdaniel Dec 20, 2024
6268af4
merge master
tokdaniel Jan 6, 2025
12994d9
full on transfer data
tokdaniel Jan 6, 2025
f6b45f1
adjust netBalance with transferAmount
tokdaniel Jan 6, 2025
da2b9f6
dont need to adjust netbalance
tokdaniel Jan 6, 2025
966d74a
fix unrealised pnl adjustment with tx
tokdaniel Jan 6, 2025
89d40a2
merge master
tokdaniel Jan 6, 2025
4df192b
scrollable history and positions
tokdaniel Jan 9, 2025
d528d1a
merge master
tokdaniel Jan 10, 2025
ee23784
move back to old your tokens for the ui
tokdaniel Jan 10, 2025
35eb788
add refId submission
tokdaniel Jan 10, 2025
364f918
handle optional refid on app side
tokdaniel Jan 10, 2025
8f117b9
simpify new history route
tokdaniel Jan 10, 2025
9e00ad3
remove shadow blur
tokdaniel Jan 10, 2025
cd67e20
remove unnecessary address cast
tokdaniel Jan 10, 2025
8dbfd90
recreate lock
tokdaniel Jan 10, 2025
45c06bf
chore: lint peristent user data (#1730)
janndriessen Jan 10, 2025
6c627ba
add sentry cli again
tokdaniel Jan 10, 2025
6d62865
Merge branch 'feat/persistent-user-data' of github.com:IndexCoop/inde…
tokdaniel Jan 10, 2025
fd7764a
remove sentri-cli dep
tokdaniel Jan 14, 2025
b3dc1df
update npm lint:fix command
tokdaniel Jan 14, 2025
53b8332
merge master
tokdaniel Jan 14, 2025
2f256b9
update lock
tokdaniel Jan 14, 2025
6503701
readd lock
tokdaniel Jan 14, 2025
3c37041
fix deps
tokdaniel Jan 14, 2025
60f31a1
remove underlyingAssetDenominator
tokdaniel Jan 14, 2025
6ef1085
remove denominator function too
tokdaniel Jan 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.default
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ NEXT_PUBLIC_TENDERLY_ACCESS_KEY=
NEXT_PUBLIC_TENDERLY_USER=
NEXT_PUBLIC_VERCEL_ENV=development
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=

INDEX_COOP_API_V2_KEY=
2 changes: 2 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
run: echo "NEXT_PUBLIC_ALCHEMY_ID=$(echo $NEXT_PUBLIC_ALCHEMY_ID | cut -c 1-6)" >> $NEXT_PUBLIC_ALCHEMY_ID
- name: Install
run: npm ci
- name: Generate kubb files
run: npm run generate
- name: Lint
run: npm run lint
- name: Run unit tests
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

# debug
npm-debug.log*

yarn-debug.log*
yarn-error.log*

Expand All @@ -37,3 +38,6 @@ next-env.d.ts

# Sentry Config File
.env.sentry-build-plugin

# Generated
src/gen
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ cp .env.default .env.local
npm install
```

3. Start dev mode
3. Generate kubb files

```bash
npm run generate
```

4. Start dev mode

```bash
npm run dev
Expand Down
71 changes: 71 additions & 0 deletions kubb.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import { defineConfig } from '@kubb/core'
import { pluginClient } from '@kubb/plugin-client'
import { pluginOas } from '@kubb/plugin-oas'
import { pluginTs } from '@kubb/plugin-ts'

const config = defineConfig({
root: '.',
input: {
path: 'https://api.indexcoop.com/v2/docs/json',
},
output: {
path: './src/gen',
clean: true,
},
plugins: [
pluginOas({
generators: [],
}),
pluginTs({
output: {
path: 'models',
barrelType: 'propagate',
banner: `/* eslint-disable */`,
},
exclude: [
{
type: 'tag',
pattern: 'admin',
},
],
group: {
type: 'tag',
},
enumType: 'asConst',
dateType: 'date',
}),
pluginClient({
baseURL: 'https://api-q513.onrender.com',
output: {
path: './clients/axios',
barrelType: 'propagate',
banner: `/* eslint-disable */`,
},
exclude: [
{
type: 'tag',
pattern: 'admin',
},
],
importPath: '@/lib/axios',
group: {
type: 'tag',
name({ group }) {
return `${group}Service`
},
},
operations: true,
pathParamsType: 'object',
dataReturnType: 'full',
}),
// pluginTanstackQuery({
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case we want to access api endpoints which are public from the frontend this can be useful, but of course, we can just write it with a useQuery as well.

// output: {
// path: './hooks',
// },
// framework: 'react',
// dataReturnType: 'full',
// }),
],
})

export default defineConfig(config)
Loading
Loading