View on GitHub
File Changes
m
+1/-1

                      
### Features

                      
-
- Integrated Cardano V2 API endpoints ([PR 1548](https://github.com/input-output-hk/daedalus/pull/1548), [PR 1551](https://github.com/input-output-hk/daedalus/pull/1551), [PR 1552](https://github.com/input-output-hk/daedalus/pull/1552))
+
- Integrated Cardano V2 API endpoints ([PR 1548](https://github.com/input-output-hk/daedalus/pull/1548), [PR 1551](https://github.com/input-output-hk/daedalus/pull/1551), [PR 1552](https://github.com/input-output-hk/daedalus/pull/1552), [PR 1553](https://github.com/input-output-hk/daedalus/pull/1553))
- Removed select dropdown arrow ([PR 1550](https://github.com/input-output-hk/daedalus/pull/1550))
- Implemented automated and manual update flows unification ([PR 1491](https://github.com/input-output-hk/daedalus/pull/1491))
- Updated behavior of system dialogs ([PR 1494](https://github.com/input-output-hk/daedalus/pull/1494))
import { createTransaction } from './transactions/requests/createTransaction';

                      
// Wallets requests
-
import { resetWalletState } from './wallets/requests/resetWalletState';
import { changeSpendingPassword } from './wallets/requests/changeSpendingPassword';
import { deleteWallet } from './wallets/requests/deleteWallet';
import { exportWalletAsJSON } from './wallets/requests/exportWalletAsJSON';
  testReset = async (): Promise<void> => {
    Logger.debug('AdaApi::testReset called');
    try {
-
      const response: Promise<void> = await resetWalletState(this.config);
+
      const wallets: AdaWallets = await getWallets(this.config);
+
      wallets.map(wallet => deleteWallet(this.config, { walletId: wallet.id }));
      Logger.debug('AdaApi::testReset success');
-
      return response;
    } catch (error) {
      Logger.error('AdaApi::testReset error', { error });
      throw new GenericApiError();
    }`;
    Logger.debug(`${loggerText} called`);
    try {
-
      /* TODO: Uncomment once implemented
+
      /* @API TODO: Uncomment once implemented

                      
      const nodeInfo: NodeInfoResponse = await getNodeInfo(
        this.config,
// @flow
import { get } from 'lodash';
import AdaApi from '../api';
-
import { getNodeInfo } from '../nodes/requests/getNodeInfo';
+
// import { getNodeInfo } from '../nodes/requests/getNodeInfo';
import { getNodeSettings } from '../nodes/requests/getNodeSettings';
import { getLatestAppVersion } from '../nodes/requests/getLatestAppVersion';
import { GenericApiError } from '../common/errors';
import { Logger } from '../../utils/logging';
import type { NodeInfoQueryParams } from '../nodes/requests/getNodeInfo';
import type {
  LatestAppVersionInfoResponse,
-
  NodeInfoResponse,
+
  // NodeInfoResponse,
  GetNetworkStatusResponse,
  NodeSettingsResponse,
  GetNodeSettingsResponse,
  ): Promise<GetNetworkStatusResponse> => {
    Logger.debug('AdaApi::getNetworkStatus (PATCHED) called');
    try {
+
      /* @API TODO: Uncomment once implemented
      const nodeInfo: NodeInfoResponse = await getNodeInfo(
        api.config,
        queryInfoParams
        subscriptionStatus,
        syncProgress,
        localBlockchainHeight,
-
      } = nodeInfo;
+
      } = nodeInfo; */
+

                      
+
      const blockchainHeight = { quantity: 100 };
+
      const subscriptionStatus = 'subscribed';
+
      const syncProgress = { quantity: 1 };
+
      const localTimeInformation = { status: 'available' };
+
      const localBlockchainHeight = { quantity: 100 };

                      
      // extract relevant data before sending to NetworkStatusStore
      const response = {
        localBlockchainHeight:
          LOCAL_BLOCK_HEIGHT || localBlockchainHeight.quantity,
        localTimeInformation: {
-
          status: 'available',
-
          difference: LOCAL_TIME_DIFFERENCE,
+
          status: localTimeInformation.status,
+
          difference: get(
+
            localTimeInformation,
+
            'localTimeDifference.quantity',
+
            LOCAL_TIME_DIFFERENCE
+
          ),
        },
      };

                      
-
// @flow
-
import type { RequestConfig } from '../../common/types';
-
import { request } from '../../utils/request';
-

                      
-
export const resetWalletState = (config: RequestConfig): Promise<void> =>
-
  request({
-
    method: 'DELETE',
-
    path: '/api/internal/reset-wallet-state',
-
    ...config,
-
  });