-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
…p-v1-api-code-base [DDW-321] Clean Up V1 API Code Base
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// @flow | ||
import type { RequestConfig } from '../../common/types'; | ||
import type { Accounts } from '../types'; | ||
import { request } from '../../utils/request'; | ||
|
||
export type GetAccountsParams = { | ||
walletId: string, | ||
}; | ||
|
||
export const getAccounts = ( | ||
config: RequestConfig, | ||
{ walletId }: GetAccountsParams | ||
): Promise<Accounts> => ( | ||
request({ | ||
hostname: 'localhost', | ||
method: 'GET', | ||
path: `/api/v1/wallets/${walletId}/accounts`, | ||
...config, | ||
}) | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// @flow | ||
import type { Addresses } from '../addresses/types'; | ||
|
||
export type Account = { | ||
amount: number, | ||
addresses: Addresses, | ||
name: string, | ||
walletId: string, | ||
index: number | ||
}; | ||
|
||
export type Accounts = Array<Account>; |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.