11import {
22 type ActivitiesQuery ,
3+ type Asset ,
34 type BorrowActivity ,
45 type Chain ,
56 type Erc20Token ,
@@ -16,9 +17,6 @@ import {
1617 type ReserveInfo ,
1718 type Spoke ,
1819 type SupplyActivity ,
19- type SwapByIntent ,
20- type SwapByIntentWithApprovalRequired ,
21- type SwapByTransaction ,
2220 type TokenInfo ,
2321 type UpdatedDynamicConfigActivity ,
2422 type UpdatedRiskPremiumActivity ,
@@ -118,12 +116,6 @@ export const exchange = cacheExchange({
118116 AssetBorrowSample : {
119117 date : transformToDate ,
120118 } ,
121- AssetCategoryBorrowSample : {
122- date : transformToDate ,
123- } ,
124- AssetCategorySupplySample : {
125- date : transformToDate ,
126- } ,
127119 AssetSupplySample : {
128120 date : transformToDate ,
129121 } ,
@@ -268,30 +260,24 @@ export const exchange = cacheExchange({
268260 } ,
269261 } ,
270262 keys : {
271- // Entitied with composite key
263+ // Entities with id field as key
264+ Asset : ( data : Asset ) => data . id ,
265+ BorrowActivity : ( data : BorrowActivity ) => data . id ,
272266 Hub : ( data : Hub ) => data . id ,
273267 HubAsset : ( data : HubAsset ) => data . id ,
268+ LiquidatedActivity : ( data : LiquidatedActivity ) => data . id ,
269+ RepayActivity : ( data : RepayActivity ) => data . id ,
274270 Reserve : ( data : Reserve ) => data . id ,
275271 ReserveInfo : ( data : ReserveInfo ) => data . id ,
276272 Spoke : ( data : Spoke ) => data . id ,
277-
278- // Entities with id field as key
279- BorrowActivity : ( data : BorrowActivity ) => data . id ,
280- LiquidatedActivity : ( data : LiquidatedActivity ) => data . id ,
281273 SupplyActivity : ( data : SupplyActivity ) => data . id ,
282- SwapByIntent : ( data : SwapByIntent ) => data . quote . quoteId ,
283- SwapByIntentWithApprovalRequired : (
284- data : SwapByIntentWithApprovalRequired ,
285- ) => data . quote . quoteId ,
286- SwapByTransaction : ( data : SwapByTransaction ) => data . quote . quoteId ,
274+ TokenInfo : ( data : TokenInfo ) => data . id ,
287275 UserPosition : ( data : UserPosition ) => data . id ,
276+ UsingAsCollateralActivity : ( data : UsingAsCollateralActivity ) => data . id ,
277+ WithdrawActivity : ( data : WithdrawActivity ) => data . id ,
288278 UpdatedDynamicConfigActivity : ( data : UpdatedDynamicConfigActivity ) =>
289279 data . id ,
290280 UpdatedRiskPremiumActivity : ( data : UpdatedRiskPremiumActivity ) => data . id ,
291- UsingAsCollateralActivity : ( data : UsingAsCollateralActivity ) => data . id ,
292- WithdrawActivity : ( data : WithdrawActivity ) => data . id ,
293- RepayActivity : ( data : RepayActivity ) => data . id ,
294- TokenInfo : ( data : TokenInfo ) => data . id ,
295281
296282 // Entities with address field as key
297283 Erc20Token : ( data : Erc20Token ) => data . address ,
@@ -300,29 +286,13 @@ export const exchange = cacheExchange({
300286 Chain : ( data : Chain ) => data . chainId . toString ( ) ,
301287 NativeToken : ( data : NativeToken ) => data . chain . chainId . toString ( ) ,
302288
303- // Entities without keys will be embedded directly on the parent entity
304- PaginatedActivitiesResult : ( ) => null ,
305- PaginatedResultInfo : ( ) => null ,
306- PaginatedSpokePositionManagerResult : ( ) => null ,
307- PaginatedSpokeUserPositionManagerResult : ( ) => null ,
308- PaginatedUserSwapsResult : ( ) => null ,
309- SpokePositionManger : ( ) => null ,
310- SpokeUserPositionManager : ( ) => null ,
311- SwapReceipt : ( ) => null ,
312- SwapTransactionRequest : ( ) => null ,
313-
314289 // Value objects and result types
315290 ApySample : ( ) => null ,
316- Asset : ( ) => null ,
317291 AssetAmountWithChange : ( ) => null ,
318292 AssetBorrowSample : ( ) => null ,
319- AssetCategoryBorrowSample : ( ) => null ,
320- AssetCategorySupplySample : ( ) => null ,
321293 AssetPriceSample : ( ) => null ,
322294 AssetSummary : ( ) => null ,
323295 AssetSupplySample : ( ) => null ,
324- CancelSwapTypedData : ( ) => null ,
325- CancelSwapTypeDefinition : ( ) => null ,
326296 DecimalNumber : ( ) => null ,
327297 DecimalNumberWithChange : ( ) => null ,
328298 DomainData : ( ) => null ,
@@ -342,11 +312,19 @@ export const exchange = cacheExchange({
342312 HubSummarySample : ( ) => null ,
343313 InsufficientBalanceError : ( ) => null ,
344314 NativeAmount : ( ) => null ,
315+ PaginatedActivitiesResult : ( ) => null ,
316+ PaginatedResultInfo : ( ) => null ,
317+ PaginatedSpokePositionManagerResult : ( ) => null ,
318+ PaginatedSpokeUserPositionManagerResult : ( ) => null ,
319+ PaginatedUserSwapsResult : ( ) => null ,
345320 PercentNumber : ( ) => null ,
346321 PercentNumberVariation : ( ) => null ,
347322 PercentNumberWithChange : ( ) => null ,
348323 PermitMessageData : ( ) => null ,
349324 PermitTypedDataResponse : ( ) => null ,
325+ PositionSwapAdapterContractApproval : ( ) => null ,
326+ PositionSwapByIntentApprovalsRequired : ( ) => null ,
327+ PositionSwapPositionManagerApproval : ( ) => null ,
350328 PreContractActionRequired : ( ) => null ,
351329 PrepareSwapCancelResult : ( ) => null ,
352330 PreviewUserPosition : ( ) => null ,
@@ -355,16 +333,22 @@ export const exchange = cacheExchange({
355333 ReserveStatus : ( ) => null ,
356334 ReserveSummary : ( ) => null ,
357335 ReserveUserState : ( ) => null ,
336+ SpokePositionManger : ( ) => null ,
337+ SpokeUserPositionManager : ( ) => null ,
358338 SwapApprovalRequired : ( ) => null ,
359- SwapByIntentTypedData : ( ) => null ,
360- SwapByIntentTypeDefinition : ( ) => null ,
339+ SwapByIntent : ( ) => null ,
340+ SwapByIntentWithApprovalRequired : ( ) => null ,
341+ SwapByTransaction : ( ) => null ,
361342 SwapCancelled : ( ) => null ,
362343 SwapExpired : ( ) => null ,
363344 SwapFulfilled : ( ) => null ,
364345 SwapOpen : ( ) => null ,
365346 SwapPendingSignature : ( ) => null ,
366347 SwapQuote : ( ) => null ,
367348 SwapQuoteCosts : ( ) => null ,
349+ SwapReceipt : ( ) => null ,
350+ SwapTransactionRequest : ( ) => null ,
351+ SwapTypedData : ( ) => null ,
368352 TransactionRequest : ( ) => null ,
369353 TypeDefinition : ( ) => null ,
370354 TypeField : ( ) => null ,
0 commit comments