-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Payment channel opt in #1573
Payment channel opt in #1573
Conversation
componentDidMount = async () => { | ||
const paymentChannelHasBalance = await PaymentChannelsClient.addressHasBalance(this.props.selectedAddress); | ||
if (paymentChannelHasBalance) this.setState({ paymentChannelHasBalance }); | ||
this.setState({ paymentChannelHasBalance: true }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think line 84 can be deleted
* Returns whether the address has balance in channel | ||
*/ | ||
addressHasBalance: async address => { | ||
if (client) return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible for a client to have been initialized but no balance sent to the address?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, just enabling the experimental setting with the channel just opened
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue 1
I am unable to enable payment channels on an account that has a balance
steps:
- I started in a state where instapay was already enabled on the app (came from develop branch)
- built this branch and saw instapay was still enabled with the correct balance
- I then toggled off/disabled state channels on that account
- switched to another account that didn't have any instapay balance
- killed the app and relaunched
- switched back to the account that DOES have an instapay balance
- however, when I attempted to enable payment channels, I didn't have the option to do so
Issue 2
I don't see the option to enable payment channels when importing via seed phrase
- started app in fresh state
- imported my wallet via seed phrase
- once I got to the wallet view I went to settings > experimental
- I did not see the option to enable payment channels even though my Account 1 does indeed have instapay funds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issues have been resolved on both OS's, QA Passed 👍
* check for balance * snaps? * stop client * stop client * paymentChannelHasBalance * ip has txs * local * snapshots Co-authored-by: Ibrahim Taveras <ibrahimtaveras00@gmail.com>
Description
This PR will hide the option for turning on payment channel if no funds on the channel for current
selectedAddress
andprovider.type
Checklist
Issue
Resolves #???