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

Issue 455/add stagenet support #456

Merged
merged 15 commits into from
Dec 29, 2021
Merged

Conversation

polaris-9r
Copy link
Contributor

@polaris-9r polaris-9r commented Dec 27, 2021

Description

This PR introduces a new stagenet value for the Network enum and stagenet support in theBaseXChainClient class in xchain-client, to be used in the xchain-thorchain for stagenet support. Originally these changes were only limited to the xchain-thorchain package, but because this is a breaking change for xchain-client, all other packages dependent on the Network enum have been updated to handle a stagenet case by resolving to the values for their respective mainnet configuration.

Notes

With respect to xchain-binance, there is a type dependency from the @binance-chain JS SDK in the chooseNetwork function that enforces only mainnet and testnet values that requires a workaround until the SDK supports a stagenet value.

To-dos

  • Update CHANGELOG dates when this is ready to merge to today's date

@polaris-9r
Copy link
Contributor Author

polaris-9r commented Dec 27, 2021

Looks like xchain-binance has a chooseNetwork method (using the binance JS SDK) that relies on an enum that doesn't have a 'stagenet'. Adding a workaround to handle this.

@polaris-9r polaris-9r force-pushed the issue-455/add-stagenet-support branch 2 times, most recently from 06d6e7d to 0680ae7 Compare December 28, 2021 19:02
@polaris-9r polaris-9r changed the title (WIP) Issue 455/add stagenet support Issue 455/add stagenet support Dec 28, 2021
@polaris-9r polaris-9r marked this pull request as ready for review December 28, 2021 21:25
@polaris-9r polaris-9r requested a review from veado December 28, 2021 21:32
@polaris-9r polaris-9r added the enhancement New feature or request label Dec 28, 2021
Copy link
Collaborator

@veado veado left a comment

Choose a reason for hiding this comment

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

Nice first PR :) Some suggestions ...

packages/xchain-binance/src/client.ts Outdated Show resolved Hide resolved
packages/xchain-binance/src/client.ts Outdated Show resolved Hide resolved
packages/xchain-bitcoin/src/blockstream-api.ts Outdated Show resolved Hide resolved
packages/xchain-client/src/BaseXChainClient.ts Outdated Show resolved Hide resolved
@veado veado requested a review from mikewyszinski December 29, 2021 07:07
…e mainnet thornode api base to point to thornode.ninerealms.com
…s for getPrefix and validateAddress for thorchain
@polaris-9r
Copy link
Contributor Author

Requested changes have been made @veado

@polaris-9r polaris-9r merged commit 56adf1e into master Dec 29, 2021
@polaris-9r polaris-9r deleted the issue-455/add-stagenet-support branch December 29, 2021 21:28
@veado veado mentioned this pull request Dec 30, 2021
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants