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

Create basic logic for BTC peer store - Closes #1946 #1952

Merged
merged 28 commits into from Apr 29, 2019

Conversation

Projects
None yet
3 participants
@slaweet
Copy link
Member

commented Apr 23, 2019

What issue have I solved?

#1946

How have I implemented/fixed it?

I created a new reducer called network, which stores all data that Hub needs to connect to networks (LSK and BTC at the moment). All we need to store is:

  • network code (mainnet/testnet/customNode)
  • only for LSK: address (one of hubXX.lisk.io for mainnet, any other for custom node)
  • only for LSK: nethash (for custom node, it can be abything, so it's obtained form API call)

Everything for TBC can be derived from network code.

There are TODO comments in the old peers redux store and actions that it should be removed in the future after all code is updated to use the new store in follow-up tickets.

How has this been tested?

You can enable it by running this in console:

localStorage.setItem('btc', true);

Then check with browser redux extension that new actions are dispatched and new network store is created.

Review checklist

@slaweet slaweet self-assigned this Apr 23, 2019

slaweet added some commits Apr 23, 2019

🔥 Remove btcAPIClientSet from peers reducer
.. as it's not needed anymore

@slaweet slaweet force-pushed the 1946-logic-for-btc-peer branch from f7064cb to b25dc8b Apr 23, 2019

slaweet added some commits Apr 23, 2019

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

@osvaldovega

This comment has been minimized.

Copy link
Contributor

commented Apr 23, 2019

@slaweet I checked and looks easy to understand/maintain we still have all the information that we need and in case that we need to add more is properly separated. I would say it is ok

Show resolved Hide resolved src/actions/network/lsk.js Outdated
Show resolved Hide resolved src/actions/network/lsk.js Outdated
Show resolved Hide resolved src/actions/account.js Outdated

slaweet added some commits Apr 24, 2019

@slaweet slaweet marked this pull request as ready for review Apr 24, 2019

@slaweet slaweet requested a review from yasharAyari Apr 25, 2019

@osvaldovega
Copy link
Contributor

left a comment

🥇 great Vit looks good

Show resolved Hide resolved src/actions/network/index.test.js Outdated
Show resolved Hide resolved src/actions/network/index.js

@slaweet slaweet requested a review from yasharAyari Apr 25, 2019

@slaweet slaweet force-pushed the 1946-logic-for-btc-peer branch from 76dac08 to a1a72aa Apr 29, 2019

@slaweet slaweet force-pushed the 1946-logic-for-btc-peer branch from a1a72aa to 342ab79 Apr 29, 2019

slaweet added some commits Apr 29, 2019

Show resolved Hide resolved src/actions/account.js Outdated

slaweet added some commits Apr 29, 2019

@yasharAyari yasharAyari merged commit c4a224e into development Apr 29, 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 manifest changes detected

@yasharAyari yasharAyari deleted the 1946-logic-for-btc-peer branch Apr 30, 2019

@slaweet slaweet added the ready label 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.