Skip to content

Commit

Permalink
Merge pull request #1088 from input-output-hk/feature/ddw-321-clean-u…
Browse files Browse the repository at this point in the history
…p-v1-api-code-base

[DDW-321] Clean Up V1 API Code Base
  • Loading branch information
nikolaglumac authored Sep 18, 2018
2 parents e532983 + ce81032 commit 1c0374d
Show file tree
Hide file tree
Showing 99 changed files with 1,304 additions and 1,479 deletions.
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

0 comments on commit 1c0374d

Please sign in to comment.