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

Payment channel opt in #1573

Merged
merged 13 commits into from
Jul 8, 2020
Merged

Payment channel opt in #1573

merged 13 commits into from
Jul 8, 2020

Conversation

estebanmino
Copy link
Contributor

Description

This PR will hide the option for turning on payment channel if no funds on the channel for current selectedAddress and provider.type

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

Issue

Resolves #???

componentDidMount = async () => {
const paymentChannelHasBalance = await PaymentChannelsClient.addressHasBalance(this.props.selectedAddress);
if (paymentChannelHasBalance) this.setState({ paymentChannelHasBalance });
this.setState({ paymentChannelHasBalance: true });
Copy link
Contributor

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;
Copy link
Contributor

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?

Copy link
Contributor Author

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

@andrepimenta andrepimenta added needs-qa Any New Features that needs a full manual QA prior to being added to a release. and removed needs-qa Any New Features that needs a full manual QA prior to being added to a release. labels May 19, 2020
@ibrahimtaveras00 ibrahimtaveras00 added the needs-qa Any New Features that needs a full manual QA prior to being added to a release. label May 29, 2020
@ibrahimtaveras00 ibrahimtaveras00 requested a review from a team as a code owner May 29, 2020 22:10
Copy link
Contributor

@ibrahimtaveras00 ibrahimtaveras00 left a 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

@ibrahimtaveras00 ibrahimtaveras00 added QA'd - Issues Found QA has been complete, however issues have been discovered that need to be addressed and removed needs-qa Any New Features that needs a full manual QA prior to being added to a release. labels Jul 2, 2020
Copy link
Contributor

@ibrahimtaveras00 ibrahimtaveras00 left a 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 👍

@ibrahimtaveras00 ibrahimtaveras00 added QA Passed A successful QA run through has been done and removed QA'd - Issues Found QA has been complete, however issues have been discovered that need to be addressed labels Jul 8, 2020
@estebanmino estebanmino merged commit d6aca89 into develop Jul 8, 2020
@estebanmino estebanmino deleted the payment-channel-opt-in branch July 8, 2020 16:55
rickycodes pushed a commit that referenced this pull request Jan 31, 2022
* check for balance

* snaps?

* stop client

* stop client

* paymentChannelHasBalance

* ip has txs

* local

* snapshots

Co-authored-by: Ibrahim Taveras <ibrahimtaveras00@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA Passed A successful QA run through has been done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants