-
Notifications
You must be signed in to change notification settings - Fork 5
feat: use user history #4
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
Conversation
AAVE-1467 userHistory - React hook and SDK logic
API Endpoint: userHistory(request: UserHistoryRequest!): PaginatedUserHistoryResult!Reference the main ticket to see full request and response types. |
AAVE-1451 userSummaryHistory - React hook and SDK logic
API Endpoint: userSummaryHistory(request: UserSummaryHistoryRequest!): [UserSummaryHistoryItem]!Reference the main ticket to see full request and response types. |
packages/client/src/actions/user.ts
Outdated
| * ```ts | ||
| * const result = await userSummaryHistory(client, { | ||
| * user: evmAddress('0x742d35cc…'), | ||
| * window: 'LAST_WEEK', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's define an enum, bind it in the graphql.ts to the corresponding scalar name, and use it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe TimeWindow enum might already exist unless we deleted it, not sure if contains 'all' variant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah i think we had itt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, updated in 5c988ec
AAVE-1511 hubAssets - React hook and SDK logic
API Endpoint: hubAssets(request: HubAssetsRequest!): [HubAsset!]!Reference the main ticket to see full request and response types. |
| * user: evmAddress('0x742d35cc…'), | ||
| * chainId: chainId(1), | ||
| * activityTypes: ['SUPPLY', 'BORROW', 'WITHDRAW', 'REPAY'], | ||
| * pageSize: 'FIFTY', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enum to use PageSize (probably already defined)
| * const { data, error, loading } = useUserHistory({ | ||
| * user: evmAddress('0x742d35cc…'), | ||
| * chainId: chainId(1), | ||
| * activityTypes: ['SUPPLY', 'BORROW', 'WITHDRAW', 'REPAY'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new enum to define and use in the example
closes https://linear.app/avara/issue/AAVE-1467/userhistory-react-hook-and-sdk-logic
closes https://linear.app/avara/issue/AAVE-1451/usersummaryhistory-react-hook-and-sdk-logic
closes https://linear.app/avara/issue/AAVE-1511/hubassets-react-hook-and-sdk-logic