Skip to content

Commit 73a37ac

Browse files
committed
chore: update most recent schema
1 parent 39baa52 commit 73a37ac

File tree

7 files changed

+651
-137
lines changed

7 files changed

+651
-137
lines changed

packages/client/src/actions/reserve.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export type ReserveRequest = {
1616
/**
1717
* The asset for the reserve
1818
*/
19-
token: EvmAddress;
19+
underlyingToken: EvmAddress;
2020
/**
2121
* The chain id the pool is deployed on
2222
*/
@@ -35,7 +35,7 @@ export type ReserveRequest = {
3535
* ```ts
3636
* const result = await reserve(client, {
3737
* market: evmAddress('0x87870bca3f3fd6335c3f4ce8392d69350b4fa4e2'),
38-
* token: evmAddress('0xa0b86a33e6441c8c5f0bb9b7e5e1f8bbf5b78b5c'),
38+
* underlyingToken: evmAddress('0xa0b86a33e6441c8c5f0bb9b7e5e1f8bbf5b78b5c'),
3939
* chainId: chainId(1)
4040
* });
4141
* ```
@@ -46,10 +46,10 @@ export type ReserveRequest = {
4646
*/
4747
export function reserve(
4848
client: AaveClient,
49-
{ market, token, chainId, userAddress }: ReserveRequest,
49+
{ market, underlyingToken, chainId, userAddress }: ReserveRequest,
5050
): ResultAsync<Reserve | null, UnexpectedError> {
5151
return client.query(ReserveQuery, {
52-
request: { market, token, chainId },
52+
request: { market, underlyingToken, chainId },
5353
includeUserFields: !!userAddress,
5454
userAddress: userAddress ?? ZERO_ADDRESS,
5555
});

packages/client/src/actions/transactions.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import {
33
type BorrowRequest,
44
EModeToggleQuery,
55
type EModeToggleRequest,
6+
type ExecutionPlan,
67
RepayQuery,
78
type RepayRequest,
89
SupplyQuery,
910
type SupplyRequest,
10-
type Transaction,
1111
type TransactionRequest,
1212
WithdrawQuery,
1313
type WithdrawRequest,
@@ -40,7 +40,7 @@ import type { UnexpectedError } from '../errors';
4040
export function borrow(
4141
client: AaveClient,
4242
request: BorrowRequest,
43-
): ResultAsync<Transaction, UnexpectedError> {
43+
): ResultAsync<ExecutionPlan, UnexpectedError> {
4444
return client.query(BorrowQuery, { request });
4545
}
4646

@@ -68,7 +68,7 @@ export function borrow(
6868
export function supply(
6969
client: AaveClient,
7070
request: SupplyRequest,
71-
): ResultAsync<Transaction, UnexpectedError> {
71+
): ResultAsync<ExecutionPlan, UnexpectedError> {
7272
return client.query(SupplyQuery, { request });
7373
}
7474

@@ -96,7 +96,7 @@ export function supply(
9696
export function repay(
9797
client: AaveClient,
9898
request: RepayRequest,
99-
): ResultAsync<Transaction, UnexpectedError> {
99+
): ResultAsync<ExecutionPlan, UnexpectedError> {
100100
return client.query(RepayQuery, { request });
101101
}
102102

@@ -124,7 +124,7 @@ export function repay(
124124
export function withdraw(
125125
client: AaveClient,
126126
request: WithdrawRequest,
127-
): ResultAsync<Transaction, UnexpectedError> {
127+
): ResultAsync<ExecutionPlan, UnexpectedError> {
128128
return client.query(WithdrawQuery, { request });
129129
}
130130

packages/client/src/types.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import type { Transaction, TransactionRequest } from '@aave/graphql';
1+
import type { ExecutionPlan, TransactionRequest } from '@aave/graphql';
22
import type { ResultAsync, TxHash } from '@aave/types';
3-
import type { SigningError } from '../dist';
4-
import type { ValidationError } from './errors';
3+
import type { SigningError, ValidationError } from './errors';
54

6-
export type OperationHandler<T extends Transaction = Transaction> = (
5+
export type OperationHandler<T extends ExecutionPlan = ExecutionPlan> = (
76
result: T,
87
) => ResultAsync<
98
TxHash,

0 commit comments

Comments
 (0)