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

Implement redux logic for switching active token - closes #1947 #1968

Merged
merged 5 commits into from Apr 30, 2019

Conversation

Projects
None yet
2 participants
@osvaldovega
Copy link
Contributor

commented Apr 29, 2019

What issue have I solved?

-- #1947

How have I implemented/fixed it?

This PR includes the following changes.

Added service actions, reducer and api service file.
Added settings middleware.

The intention of these files are for check/retrieve every time the token (LSK, BTC) switch change the settings of token to properly set the active one and after that retrieve the prices for BTC and LSK.
After the prices are retrieved these will be store in the service reducer where the application can get the the values and dynamics fees for BTC.

How has this been tested?

For test this I had to call the action creator pricesRetrieved from the service action file and see how update/retrieve the prices for the tokens for this the service reducer must be check and see how that get updated from.

service: {
  priceTicker: { BTC: {}, LSK: {} },
  dynamicFees: {},
}

to

service: {
  priceTicker: {
      BTC: { LSK: <value>, USD: <value>, EU: <value>, ... },
      LSK: { BTC: <value>, USD: <value>, EU: <value>, ... },
  },
  dynamicFees: {},
}

This PR is just for the add the functionality and needs to be tested as a whole once the BTC be available in the UI with the switcher.

Review checklist

@osvaldovega osvaldovega requested a review from slaweet Apr 29, 2019

@osvaldovega osvaldovega self-assigned this Apr 29, 2019

osvaldovega added some commits Apr 29, 2019

Show resolved Hide resolved src/utils/api/functionMapper.js Outdated
Show resolved Hide resolved src/utils/api/functionMapper.js Outdated
Show resolved Hide resolved src/actions/service.js Outdated
Show resolved Hide resolved src/actions/service.js Outdated
Show resolved Hide resolved src/store/middlewares/settings.js Outdated
Show resolved Hide resolved src/store/middlewares/settings.test.js Outdated

osvaldovega added some commits Apr 30, 2019

@slaweet
Copy link
Member

left a comment

Thank you, Osvaldo 👍

@slaweet slaweet added the ready label Apr 30, 2019

@slaweet slaweet merged commit cb3945a into development Apr 30, 2019

4 checks passed

Jenkins e2e tests e2e tests passed
Details
Jenkins test deployment Commit was deployed to test
Details
continuous-integration/jenkins/pr-merge This commit looks good
Details
security/snyk - package.json (LiskHQ) No new issues
Details

@slaweet slaweet deleted the 1947-implement-logic-for-switching-active-token branch Apr 30, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.