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

Feat: Persistent User Data #1617

merged 86 commits into from
Jan 14, 2025

Conversation

tokdaniel
Copy link
Collaborator

@tokdaniel tokdaniel commented Oct 30, 2024

Summary of Changes

Added APIv2 integration, and persistent user entity, + persisted trades

YourTokens is rewritten into PortfolioWidget, but for now the old YourTokens is kept, with the old leverage/history endpoint rendamed to legacy-history, as the behavior has changed.

SessionStorage usage for refId is added.

Test Data or Screenshots

By submitting this pull request, you are confirming the following to be true:
  • I have reviewed the Contribution Guidelines.
  • I have performed a self-review of my own code.
  • I have updated my repository to match the master at IndexCoop/index-app.
  • I have included test data or screenshots that prove my fix is effective or that my feature works.

@tokdaniel tokdaniel self-assigned this Oct 30, 2024
Copy link

vercel bot commented Oct 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
index-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 14, 2025 8:01pm

@tokdaniel tokdaniel marked this pull request as draft October 30, 2024 11:40
.gitignore Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
prisma/schema.prisma Outdated Show resolved Hide resolved
prisma/schema.prisma Outdated Show resolved Hide resolved
prisma/schema.prisma Outdated Show resolved Hide resolved
src/app/providers.tsx Outdated Show resolved Hide resolved
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.

* update github workflow to include generate

* update docs
Copy link
Collaborator

@janndriessen janndriessen left a comment

Choose a reason for hiding this comment

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

🥇

@@ -56,7 +56,7 @@ export interface TokenContext {
onSelectLeverageType: (type: LeverageType) => void
onSelectOutputToken: (tokenSymbol: string) => void
reset: () => void
toggleIsMinting: () => void
toggleIsMinting: (force?: boolean) => void
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this force used anywhere?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure atm, but I wanted to have an option at some point to explicitly set this, because in certain cases toggle will not work

@0xonramp 0xonramp self-requested a review January 13, 2025 17:32
Copy link
Collaborator

@0xonramp 0xonramp left a comment

Choose a reason for hiding this comment

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

looks great 🔥 - few tiny nits

package.json Outdated Show resolved Hide resolved
package.json Outdated
@@ -34,16 +35,18 @@
"@safe-global/api-kit": "2.5.4",
"@safe-global/protocol-kit": "4.0.4",
"@safe-global/safe-core-sdk-types": "5.0.3",
"@sentry/cli": "2.40.0",
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this dep used somewhere, or was it for testing something/can it be removed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah yes good catch, i can remove it I was just experimenting with the mess of failing vercel builds

)
}

return
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: could update to return <></> if it's the idiomatic way in react-table

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ignore, this review in the other pr please: #1731

@@ -93,6 +93,7 @@ export default function Page() {
</div>
<div className='flex flex-col gap-6 lg:flex-row'>
<div className='h-full w-full lg:min-w-[67%] lg:max-w-[67%]'>
{/* <PortfolioWidget /> */}
Copy link
Collaborator

Choose a reason for hiding this comment

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

something that will be added soon?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, the new YourTokens basically

@tokdaniel tokdaniel merged commit 6b263d0 into master Jan 14, 2025
3 checks passed
@tokdaniel tokdaniel deleted the feat/persistent-user-data branch January 14, 2025 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants