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

enhancement - wallet - surface visibility of mainnet / testnet #16

Closed
johndpope opened this issue Feb 6, 2018 · 6 comments
Closed

enhancement - wallet - surface visibility of mainnet / testnet #16

johndpope opened this issue Feb 6, 2018 · 6 comments

Comments

@johndpope
Copy link

public static let mainnet: Network = Mainnet()
public static let testnet: Network = Testnet()

or show maybe just some way to control this flow from app developer without modifying Bitcoinkit.

@kishikawakatsumi
Copy link
Contributor

@johndpope What do you mean? HDWallet accepts network type (mainnet or testnet) by a parameter. For Wallet, network type is determined by the key which is corresponded to it. You don't need to modify the library code.

@johndpope
Copy link
Author

Closing this.

I have use case where it just needs to be clear to end user which network they’re on. It’s doesnt need to switch but just be visible in wallet.

@johndpope
Copy link
Author

I think when I saw this code - it would be desirable to be able to change the bitcoinkit network without having to recompile code. as in - using it as a pod.

eg. want to be able to hot swap which network from appdelegate.

@johndpope johndpope reopened this Feb 7, 2018
@kishikawakatsumi
Copy link
Contributor

kishikawakatsumi commented Feb 7, 2018

I don't understand what you are saying. I'm not sure that the behavior you describe is actually desirable. I think that it can be achieved depending on how you implement the application. What kind of support is needed on the library side?

@johndpope
Copy link
Author

looking at the bread library - they have some ruby scripts to toggle flags from at project level - this might be a better way to switch things moving forward. will close this.
to be clear - the idea that this codebase can be imported by a cocoapod as a dependency as a kit - the developer who consumes library will need some way to override the init call to use either the testnet or mainnet. at the moment that code lives inside bitcoinkit.

@kishikawakatsumi
Copy link
Contributor

You probably misunderstood the API. You can change the behavior just passing parameters in code. Do not need to override or else

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants