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-80] Integrate network parameters api endpoint #1915

Conversation

topseniors
Copy link
Contributor

This PR integrated network parameters api endpoint.
Jira Ticket

Todos

  • Integrate network parameters api endpoint

Review Checklist

Basics

  • PR has been assigned and has appropriate labels (feature/bug/chore, release-x.x.x)
  • PR is updated to the most recent version of the target branch (and there are no conflicts)
  • PR has a good description that summarizes all changes and shows some screenshots or animated GIFs of important UI changes
  • CHANGELOG entry has been added to the top of the appropriate section (Features, Fixes, Chores) and is linked to the correct PR on GitHub
  • Automated tests: All acceptance and unit tests are passing (yarn test)
  • Manual tests (minimum tests should cover newly added feature/fix): App works correctly in development build (yarn dev)
  • Manual tests (minimum tests should cover newly added feature/fix): App works correctly in production build (yarn package / CI builds)
  • There are no flow errors or warnings (yarn flow:test)
  • There are no lint errors or warnings (yarn lint)
  • There are no prettier errors or warnings (yarn prettier:check)
  • There are no missing translations (running yarn manage:translations produces no changes)
  • Text changes are proofread and approved (Jane Wild / Amy Reeve)
  • Japanese text changes are proofread and approved (Junko Oda)
  • UI changes look good in all themes (Alexander Rukin)
  • Storybook works and no stories are broken (yarn storybook)
  • In case of dependency changes yarn.lock file is updated

Code Quality

  • Important parts of the code are properly commented and documented
  • Code is properly typed with flow
  • React components are split-up enough to avoid unnecessary re-renderings
  • Any code that only works in main process is neatly separated from components

Testing

  • New feature/change is covered by acceptance tests
  • New feature/change is manually tested and approved by QA team
  • All existing acceptance tests are still up-to-date
  • New feature/change is covered by Daedalus Testing scenario
  • All existing Daedalus Testing scenarios are still up-to-date

After Review

  • Merge the PR
  • Delete the source branch
  • Move the ticket to done column on the YouTrack board
  • Update Slack QA thread by marking it with a green checkmark

};
} catch (error) {
logger.error('AdaApi::getNetworkParameters error', { error });
// @API TODO - Inspect this implementation once TLS support is implemented on the BE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yakovkaravelov please remove this todo as we don't need it for this endpoint.

import { request } from '../../utils/request';

export const getNetworkParameters = (
epochId: string,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yakovkaravelov epochId should be a number 🙏

@@ -79,6 +82,43 @@ export default (api: AdaApi) => {
}
};

api.getNetworkParameters = async (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yakovkaravelov we don't need the patched Api method here. Please remove it.

@@ -5,6 +5,7 @@ import { action } from 'mobx';
import BigNumber from 'bignumber.js/bignumber';
import AdaApi from '../api';
import { getNetworkInfo } from '../network/requests/getNetworkInfo';
import { getNetworkParameters } from '../network/requests/getNetworkParameters';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yakovkaravelov remove this unused import

@@ -17,6 +18,8 @@ import StakePool from '../../domains/StakePool';
import type {
GetNetworkInfoResponse,
NetworkInfoResponse,
GetNetworkParametersResponse,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yakovkaravelov please remove these unused imports

Copy link
Contributor

@nikolaglumac nikolaglumac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@nikolaglumac nikolaglumac merged commit 78e96d2 into v2-integration Mar 27, 2020
@iohk-bors iohk-bors bot deleted the feature/ddw-80-integrate-network-parameters-api-endpoint branch March 27, 2020 21:26
disassembler added a commit that referenced this pull request Mar 27, 2020
…ub.com:input-output-hk/daedalus into chore/ddw-69-set-new-daedalus-name-and-version

* 'chore/ddw-69-set-new-daedalus-name-and-version' of github.com:input-output-hk/daedalus:
  [DDW-69] Handle Flight network
  [DDW-39] Flight release information window (#1917)
  [DDW-80] Integrate network parameters api endpoint (#1915)
@nikolaglumac nikolaglumac added release-1.0.0-FC1 Daedalus Flight and removed ⏳release-vNext labels Apr 1, 2020
@nikolaglumac nikolaglumac mentioned this pull request Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants