Skip to content

Commit

Permalink
Add request for get transaction detail by id
Browse files Browse the repository at this point in the history
  • Loading branch information
juan-cieri committed Nov 18, 2020
1 parent 41ae30a commit c212733
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
19 changes: 19 additions & 0 deletions source/renderer/app/api/transactions/requests/getTransaction.js
@@ -0,0 +1,19 @@
// @flow
import type { RequestConfig } from '../../common/types';
import type { Transaction } from '../types';
import { request } from '../../utils/request';

export const getTransaction = (
config: RequestConfig,
walletId: string,
transactionId: string
): Promise<Transaction> =>
request(
{
method: 'GET',
path: `/v2/wallets/${walletId}/transactions/${transactionId}`,
...config,
},
{},
null
);
5 changes: 5 additions & 0 deletions source/renderer/app/api/transactions/types.js
Expand Up @@ -90,6 +90,11 @@ export type GetTransactionsRequest = {
// cachedTransactions: Array<WalletTransaction>,
};

export type GetTransactionRequest = {
walletId: string,
transactionId: string,
};

export type GetTransactionFeeRequest = {
walletId: string,
address: string,
Expand Down

0 comments on commit c212733

Please sign in to comment.