-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
123 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 1 addition & 7 deletions
8
...ctions/api/getAddressTransactions.graphql → ...api/getPaymentAddressTransactions.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
source/features/transactions/api/getStakeAddressTransactions.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#import "./TransactionDetails.graphql" | ||
|
||
query getStakeAddressTransactions( | ||
$address: StakeAddress! | ||
$offset: Int! | ||
$limit: Int! | ||
) { | ||
transactions( | ||
where: { | ||
withdrawals: { | ||
address: { | ||
_eq: $address | ||
} | ||
} | ||
} | ||
offset: $offset | ||
limit: $limit | ||
) { | ||
...TransactionDetails | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,42 @@ | ||
import { GraphQLClient } from 'graphql-request'; | ||
import { | ||
GetAddressTransactionsQuery, | ||
GetAddressTransactionsQueryVariables, | ||
GetBlockTransactionsQuery, | ||
GetBlockTransactionsQueryVariables, | ||
GetPaymentAddressTransactionsQuery, | ||
GetPaymentAddressTransactionsQueryVariables, | ||
GetStakeAddressTransactionsQuery, | ||
GetStakeAddressTransactionsQueryVariables, | ||
} from '../../../../generated/typings/graphql-schema'; | ||
import { GraphQLRequest } from '../../../lib/graphql/GraphQLRequest'; | ||
import getAddressTransactions from './getAddressTransactions.graphql'; | ||
import getBlockTransactions from './getBlockTransactions.graphql'; | ||
import getPaymentAddressTransactions from './getPaymentAddressTransactions.graphql'; | ||
import getStakeAddressTransactions from './getStakeAddressTransactions.graphql'; | ||
|
||
export class TransactionsApi { | ||
public getBlockTransactionsQuery: GraphQLRequest< | ||
GetBlockTransactionsQuery, | ||
GetBlockTransactionsQueryVariables | ||
>; | ||
public getAddressTransactionsQuery: GraphQLRequest< | ||
GetAddressTransactionsQuery, | ||
GetAddressTransactionsQueryVariables | ||
public getPaymentAddressTransactionsQuery: GraphQLRequest< | ||
GetPaymentAddressTransactionsQuery, | ||
GetPaymentAddressTransactionsQueryVariables | ||
>; | ||
public getStakeAddressTransactionsQuery: GraphQLRequest< | ||
GetStakeAddressTransactionsQuery, | ||
GetStakeAddressTransactionsQueryVariables | ||
>; | ||
constructor(client: GraphQLClient) { | ||
this.getBlockTransactionsQuery = new GraphQLRequest( | ||
client, | ||
getBlockTransactions | ||
); | ||
this.getAddressTransactionsQuery = new GraphQLRequest( | ||
this.getPaymentAddressTransactionsQuery = new GraphQLRequest( | ||
client, | ||
getPaymentAddressTransactions | ||
); | ||
this.getStakeAddressTransactionsQuery = new GraphQLRequest( | ||
client, | ||
getAddressTransactions | ||
getStakeAddressTransactions | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters