Skip to content

Commit f5950a3

Browse files
committed
feat: updates PreviewUserPosition fragment
1 parent f9f081c commit f5950a3

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

.changeset/silent-waves-agree.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@aave/graphql": patch
3+
"@aave/client": patch
4+
"@aave/react": patch
5+
---
6+
7+
**feat:** updates PreviewUserPosition fragment.

packages/graphql/src/transactions.ts

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
Erc20AmountFragment,
77
type Erc20ApprovalRequired,
88
Erc20ApprovalRequiredFragment,
9+
Erc20TokenFragment,
910
ExchangeAmountValueVariationFragment,
1011
ExecutionPlanFragment,
1112
HealthFactorResultFragment,
@@ -179,6 +180,52 @@ export type UpdateUserPositionConditionsRequest = RequestOf<
179180
typeof UpdateUserPositionConditionsQuery
180181
>;
181182

183+
export const ChangedDynamicConfigUserPositionConditionsFragment = graphql(
184+
`fragment ChangedDynamicConfigUserPositionConditions on ChangedDynamicConfigUserPositionConditions {
185+
__typename
186+
... on DynamicConfigUserPositionCollateralFactorVariation {
187+
reserveId
188+
token {
189+
...Erc20Token
190+
}
191+
current {
192+
...PercentNumber
193+
}
194+
after {
195+
...PercentNumber
196+
}
197+
}
198+
... on DynamicConfigUserPositionLiquidationFeeVariation {
199+
reserveId
200+
token {
201+
...Erc20Token
202+
}
203+
current {
204+
...PercentNumber
205+
}
206+
after {
207+
...PercentNumber
208+
}
209+
}
210+
... on DynamicConfigUserPositionMaxLiquidationBonusVariation {
211+
reserveId
212+
token {
213+
...Erc20Token
214+
}
215+
current {
216+
...PercentNumber
217+
}
218+
after {
219+
...PercentNumber
220+
}
221+
}
222+
}`,
223+
[Erc20TokenFragment, PercentNumberFragment],
224+
);
225+
export type ChangedDynamicConfigUserPositionConditions = FragmentOf<
226+
typeof ChangedDynamicConfigUserPositionConditionsFragment
227+
>;
228+
182229
export const PreviewUserPositionFragment = graphql(
183230
`fragment PreviewUserPosition on PreviewUserPosition {
184231
__typename
@@ -198,11 +245,21 @@ export const PreviewUserPositionFragment = graphql(
198245
netBalance(currency: $currency) {
199246
...ExchangeAmountValueVariation
200247
}
248+
projectedEarnings(period: ANNUAL) {
249+
...ExchangeAmountValueVariation
250+
}
251+
borrowingPower {
252+
...ExchangeAmountValueVariation
253+
}
254+
changedDynamicConfigConditions {
255+
...ChangedDynamicConfigUserPositionConditions
256+
}
201257
}`,
202258
[
203259
HealthFactorResultFragment,
204260
PercentNumberVariationFragment,
205261
ExchangeAmountValueVariationFragment,
262+
ChangedDynamicConfigUserPositionConditionsFragment,
206263
],
207264
);
208265
export type PreviewUserPosition = FragmentOf<

0 commit comments

Comments
 (0)