Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DDW-321] Clean Up V1 API Code Base #1088

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
fc37a7f
[DDW-321] Removes depreciated types
MarcusHurney Sep 11, 2018
28a7df5
[DDW-321] Pulls wallet constants containing types into Wallet.js domain
MarcusHurney Sep 11, 2018
1089432
[DDW-321] Pulls wallet constants containing types into Wallet.js domain
MarcusHurney Sep 11, 2018
0e1b9bc
[DDW-321] Pulls transactions constants containing types into WalletTr…
MarcusHurney Sep 11, 2018
7d4e0da
[DDW-321] Replaces old type names with new ones
MarcusHurney Sep 11, 2018
6ec8cdc
[DDW-321] Pulls in latest and resolves conflicts
MarcusHurney Sep 12, 2018
d27be0c
[DDW-321] Implements new API file structure. Renames requests.
MarcusHurney Sep 12, 2018
874eac4
[DDW-321] Moves common and wallet errors into their respective files
MarcusHurney Sep 12, 2018
540b780
[DDW-321] Moves types in respective files. Deletes redundant type def…
MarcusHurney Sep 12, 2018
aa76938
[DDW-321] Fixes incorrect spelling of a constant
MarcusHurney Sep 13, 2018
29902fe
[DDW-321] Adds flow to config files
MarcusHurney Sep 13, 2018
38bb6f7
[DDW-321] Moves redemption-key-validation.js to /api/utils
MarcusHurney Sep 14, 2018
9234a69
[DDW-321] Moves commented out API helper methods to api/utils
MarcusHurney Sep 14, 2018
b86844f
[DDW-321] Renames paper vended ada redemption request file
MarcusHurney Sep 14, 2018
163131b
[DDW-321] Separates API errors into sub-directories by category
MarcusHurney Sep 14, 2018
30dc394
[DDW-321] Separates API types into sub-directories by category
MarcusHurney Sep 14, 2018
0d227e7
[DDW-321] Separates Accounts requests into its own sub-directory
MarcusHurney Sep 14, 2018
1865c67
[DDW-321] Separates Addresses requests into their own sub-directory
MarcusHurney Sep 14, 2018
9eb48c0
[DDW-321] Separates Nodes requests into their own sub-directory
MarcusHurney Sep 14, 2018
4ccd7b7
[DDW-321] Separates Transactions requests into their own sub-directory
MarcusHurney Sep 14, 2018
16a012b
[DDW-321] Separates Wallets requests into their own sub-directory
MarcusHurney Sep 14, 2018
3bf5441
[DDW-321] Updates name of flow types in patchAdaApi.js
MarcusHurney Sep 14, 2018
43f4ae4
[DDW-321] Updates name of flow types in components
MarcusHurney Sep 14, 2018
5eb9aa1
[DDW-321] Updates name of flow types in domains
MarcusHurney Sep 14, 2018
cde2038
[DDW-321] Updates name of flow types in stores
MarcusHurney Sep 14, 2018
058dee4
[DDW-321] Updates name of flow types and request names in api.js - pr…
MarcusHurney Sep 14, 2018
e510a4d
[DDW-321] Pulls in latest from feature/ddw-321-v1-api-integration and…
MarcusHurney Sep 17, 2018
4f0a744
[DDW-321] Deletes file that was added after merge conflict
MarcusHurney Sep 17, 2018
c36265c
[DDW-321] Updates CHANGELOG
MarcusHurney Sep 18, 2018
59077fb
[DDW-321] Punctuation fix in CHANGELOG
MarcusHurney Sep 18, 2018
ce81032
[DDW-321] Runs translation manager
MarcusHurney Sep 18, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Changelog

### Features

- Removes depreciated types, requests, and API methods associated with the V0 API. Within the /api directory, organizes requests, types, and errors into subdirectories based on the categories Accounts, Addresses, Common, Nodes, Transactions, and Wallets. ([PR 1088](https://github.com/input-output-hk/daedalus/pull/1088))
- Refactors and improves Network Status Store to use V1 API. ([PR 1081](https://github.com/input-output-hk/daedalus/pull/1081))
- Implemented the V1 API endpoints for redeeming ADA with all types of certificates. Updates ADA redemption API methods, flow types, and variable names to match the V1 nomenclature. ([PR 1080](https://github.com/input-output-hk/daedalus/pull/1080))
- Implements the missing V1 API endpoints for checking if a node update is available and responding to the update by either applying it or postponing it. Adds the V1 endpoint for adaTestReset.js. ([PR 1079](https://github.com/input-output-hk/daedalus/pull/1079))
Expand Down
4 changes: 2 additions & 2 deletions features/support/helpers/notifications-helpers.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { syncStateTags } from '../../../source/renderer/app/domains/Wallet';
import { WalletSyncStateTags } from '../../../source/renderer/app/domains/Wallet';

export const isActiveWalletBeingRestored = async (client) => {
const result = await client.execute((expectedSyncTag) => (
daedalus.stores.ada.wallets.active.syncState.tag === expectedSyncTag
), syncStateTags.RESTORING);
), WalletSyncStateTags.RESTORING);
return result.value;
};

Expand Down
Empty file.
20 changes: 20 additions & 0 deletions source/renderer/app/api/accounts/requests/getAccounts.js
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,
})
);
12 changes: 12 additions & 0 deletions source/renderer/app/api/accounts/types.js
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>;
15 changes: 0 additions & 15 deletions source/renderer/app/api/ada/adaTxFee.js

This file was deleted.

19 changes: 0 additions & 19 deletions source/renderer/app/api/ada/deleteAdaWallet.js

This file was deleted.

7 changes: 0 additions & 7 deletions source/renderer/app/api/ada/getAdaAccountRecoveryPhrase.js

This file was deleted.

18 changes: 0 additions & 18 deletions source/renderer/app/api/ada/getAdaAccounts.js

This file was deleted.

20 changes: 0 additions & 20 deletions source/renderer/app/api/ada/getAdaAddress.js

This file was deleted.

22 changes: 0 additions & 22 deletions source/renderer/app/api/ada/getAdaAddressHistory.js

This file was deleted.

23 changes: 0 additions & 23 deletions source/renderer/app/api/ada/getAdaHistory.js

This file was deleted.

21 changes: 0 additions & 21 deletions source/renderer/app/api/ada/getAdaHistoryByAccount.js

This file was deleted.

19 changes: 0 additions & 19 deletions source/renderer/app/api/ada/getAdaWalletAccounts.js

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

18 changes: 0 additions & 18 deletions source/renderer/app/api/ada/getAdaWallets.js

This file was deleted.

9 changes: 0 additions & 9 deletions source/renderer/app/api/ada/lib/encryptPassphrase.js

This file was deleted.

5 changes: 0 additions & 5 deletions source/renderer/app/api/ada/lib/utils.js

This file was deleted.

31 changes: 0 additions & 31 deletions source/renderer/app/api/ada/newAdaAccount.js

This file was deleted.

15 changes: 0 additions & 15 deletions source/renderer/app/api/ada/newAdaPayment.js

This file was deleted.

19 changes: 0 additions & 19 deletions source/renderer/app/api/ada/newAdaWallet.js

This file was deleted.

21 changes: 0 additions & 21 deletions source/renderer/app/api/ada/newAdaWalletAddress.js

This file was deleted.

Loading