Skip to content

Commit 59a9115

Browse files
committed
feat: update schema with the new active flag on reserves
1 parent 8dd3728 commit 59a9115

File tree

6 files changed

+19
-6
lines changed

6 files changed

+19
-6
lines changed

packages/client/src/actions/swap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export function swapQuote(
6666
*
6767
* ```ts
6868
* const result = await swappableTokens(client, {
69-
* query: { chainId: chainId(1) },
69+
* query: { chainIds: [chainId(1)] },
7070
* });
7171
* ```
7272
*

packages/graphql/schema.graphql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,7 @@ type ReserveSettings {
870870
type ReserveStatus {
871871
frozen: Boolean!
872872
paused: Boolean!
873+
active: Boolean!
873874
}
874875

875876
type ReserveSummary {
@@ -1276,7 +1277,7 @@ input SwappableTokensRequest {
12761277
}
12771278

12781279
input SwappableTokensRequestQuery {
1279-
chainId: ChainId!
1280+
chainIds: [ChainId!]!
12801281
}
12811282

12821283
enum TimeWindow {

packages/graphql/src/fragments/reserve.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export const ReserveStatusFragment = graphql(
3232
__typename
3333
frozen
3434
paused
35+
active
3536
}`,
3637
);
3738
export type ReserveStatus = FragmentOf<typeof ReserveStatusFragment>;

packages/graphql/src/graphql-env.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export type introspection_types = {
106106
'ReserveInfo': { kind: 'OBJECT'; name: 'ReserveInfo'; fields: { 'asset': { name: 'asset'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'HubAsset'; ofType: null; }; } }; 'chain': { name: 'chain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Chain'; ofType: null; }; } }; 'id': { name: 'id'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ReserveId'; ofType: null; }; } }; 'spoke': { name: 'spoke'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Spoke'; ofType: null; }; } }; }; };
107107
'ReserveInput': { kind: 'INPUT_OBJECT'; name: 'ReserveInput'; isOneOf: false; inputFields: [{ name: 'chainId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ChainId'; ofType: null; }; }; defaultValue: null }, { name: 'spoke'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; }; defaultValue: null }, { name: 'reserveId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ReserveId'; ofType: null; }; }; defaultValue: null }]; };
108108
'ReserveSettings': { kind: 'OBJECT'; name: 'ReserveSettings'; fields: { 'borrowable': { name: 'borrowable'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'collateral': { name: 'collateral'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'collateralFactor': { name: 'collateralFactor'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PercentValue'; ofType: null; }; } }; 'collateralRisk': { name: 'collateralRisk'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PercentValue'; ofType: null; }; } }; 'maxLiquidationBonus': { name: 'maxLiquidationBonus'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PercentValue'; ofType: null; }; } }; }; };
109-
'ReserveStatus': { kind: 'OBJECT'; name: 'ReserveStatus'; fields: { 'frozen': { name: 'frozen'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'paused': { name: 'paused'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; }; };
109+
'ReserveStatus': { kind: 'OBJECT'; name: 'ReserveStatus'; fields: { 'active': { name: 'active'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'frozen': { name: 'frozen'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'paused': { name: 'paused'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; }; };
110110
'ReserveSummary': { kind: 'OBJECT'; name: 'ReserveSummary'; fields: { 'borrowApy': { name: 'borrowApy'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PercentValue'; ofType: null; }; } }; 'borrowed': { name: 'borrowed'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Erc20Amount'; ofType: null; }; } }; 'supplied': { name: 'supplied'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Erc20Amount'; ofType: null; }; } }; 'supplyApy': { name: 'supplyApy'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PercentValue'; ofType: null; }; } }; }; };
111111
'ReserveUserState': { kind: 'OBJECT'; name: 'ReserveUserState'; fields: { 'balance': { name: 'balance'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Erc20Amount'; ofType: null; }; } }; 'borrowApy': { name: 'borrowApy'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PercentValue'; ofType: null; }; } }; 'borrowable': { name: 'borrowable'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Erc20Amount'; ofType: null; }; } }; 'suppliable': { name: 'suppliable'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Erc20Amount'; ofType: null; }; } }; }; };
112112
'ReservesRequest': { kind: 'INPUT_OBJECT'; name: 'ReservesRequest'; isOneOf: false; inputFields: [{ name: 'query'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'ReservesRequestQuery'; ofType: null; }; }; defaultValue: null }, { name: 'user'; type: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; defaultValue: null }, { name: 'filter'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'ReservesRequestFilter'; ofType: null; }; }; defaultValue: "ALL" }, { name: 'orderBy'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'ReservesRequestOrderBy'; ofType: null; }; }; defaultValue: "{assetName: ASC}" }]; };
@@ -158,7 +158,7 @@ export type introspection_types = {
158158
'SwapTransactionRequest': { kind: 'OBJECT'; name: 'SwapTransactionRequest'; fields: { 'orderReceipt': { name: 'orderReceipt'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'SwapReceipt'; ofType: null; }; } }; 'transaction': { name: 'transaction'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TransactionRequest'; ofType: null; }; } }; }; };
159159
'SwapWithTransactionInput': { kind: 'INPUT_OBJECT'; name: 'SwapWithTransactionInput'; isOneOf: false; inputFields: [{ name: 'quoteId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'SwapQuoteId'; ofType: null; }; }; defaultValue: null }, { name: 'permitSig'; type: { kind: 'SCALAR'; name: 'Signature'; ofType: null; }; defaultValue: null }, { name: 'isSenderSmartContractWallet'; type: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; defaultValue: null }]; };
160160
'SwappableTokensRequest': { kind: 'INPUT_OBJECT'; name: 'SwappableTokensRequest'; isOneOf: false; inputFields: [{ name: 'query'; type: { kind: 'INPUT_OBJECT'; name: 'SwappableTokensRequestQuery'; ofType: null; }; defaultValue: null }]; };
161-
'SwappableTokensRequestQuery': { kind: 'INPUT_OBJECT'; name: 'SwappableTokensRequestQuery'; isOneOf: false; inputFields: [{ name: 'chainId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ChainId'; ofType: null; }; }; defaultValue: null }]; };
161+
'SwappableTokensRequestQuery': { kind: 'INPUT_OBJECT'; name: 'SwappableTokensRequestQuery'; isOneOf: false; inputFields: [{ name: 'chainIds'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ChainId'; ofType: null; }; }; }; }; defaultValue: null }]; };
162162
'TimeWindow': { name: 'TimeWindow'; enumValues: 'LAST_DAY' | 'LAST_WEEK' | 'LAST_MONTH' | 'LAST_SIX_MONTHS' | 'LAST_YEAR' | 'ALL'; };
163163
'Token': { kind: 'UNION'; name: 'Token'; fields: {}; possibleTypes: 'Erc20Token' | 'NativeToken'; };
164164
'TokenAmount': { kind: 'UNION'; name: 'TokenAmount'; fields: {}; possibleTypes: 'Erc20Amount' | 'NativeAmount'; };

packages/graphql/src/schema.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3380,6 +3380,17 @@
33803380
}
33813381
},
33823382
"args": []
3383+
},
3384+
{
3385+
"name": "active",
3386+
"type": {
3387+
"kind": "NON_NULL",
3388+
"ofType": {
3389+
"kind": "SCALAR",
3390+
"name": "Any"
3391+
}
3392+
},
3393+
"args": []
33833394
}
33843395
],
33853396
"interfaces": []

packages/react/src/swap.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export type UseSwappableTokensArgs = SwappableTokensRequest;
171171
*
172172
* ```tsx
173173
* const { data } = useSwappableTokens({
174-
* query: { chainId: chainId(1) },
174+
* query: { chainIds: [chainId(1)] },
175175
* suspense: true,
176176
* });
177177
* ```
@@ -185,7 +185,7 @@ export function useSwappableTokens(
185185
*
186186
* ```tsx
187187
* const { data, error, loading } = useSwappableTokens({
188-
* query: { chainId: chainId(1) },
188+
* query: { chainIds: [chainId(1)] },
189189
* });
190190
* ```
191191
*/

0 commit comments

Comments
 (0)