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

Fix payment channels request #946

Merged
merged 8 commits into from
Jul 26, 2019
Merged

Conversation

brunobar79
Copy link
Contributor

This PR fixes and improves payment channels requests via deeplinks / qr codes.

  • Added validation for amount
  • Added support for ENS names
  • Added validation for address & ENS names
  • Added validation for insufficient balance
  • Fixed QR code scanning (wasn't working)

@brunobar79 brunobar79 added the needs-qa Any New Features that needs a full manual QA prior to being added to a release. label Jul 26, 2019
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.

Looks good on both iOS and Android, QA Passed 👍

@brunobar79 brunobar79 merged commit bec20ae into develop Jul 26, 2019
@brunobar79 brunobar79 deleted the fix-payment-channels-request branch July 26, 2019 20:38
)}
</View>
</View>
<Text style={styles.intro}>{strings('paymentRequest.is_requesting_you_to_pay')}</Text>
<View style={styles.total}>
<Text style={styles.totalPrice}> ${formattedAmount}</Text>
<Text style={styles.totalPrice}>{formattedAmount} DAI</Text>
Copy link
Contributor

Choose a reason for hiding this comment

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

we have locale for this, strings('unit.dai') i believe

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I really don't think there's a good reason to add DAI, ETH to locales since it doesn't have translation but if want to keep it consistent I'll do it.

});

PaymentChannelsClient.hub.on('payment::complete', () => {
// show the success screen
this.setState({ paymentChannelRequestCompleted: true });
// hide the modal and reset state
setTimeout(() => {
setTimeout(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

this is strange, why two settimeouts? you're calling one settimeout inside the other directly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there are different timeouts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right. My bad. Fixed it here: #957

paymentChannelRequestLoading: false,
paymentChannelRequestInfo: {}
});
setTimeout(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

did you do this on purpose? no delay time and you're setting the state two times in this callback

Copy link
Contributor Author

@brunobar79 brunobar79 Jul 29, 2019

Choose a reason for hiding this comment

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

I did it on purpose. The delay times are below (See here) The reason of it is that I need to give enough time the modal to close before changing the flag.

rickycodes pushed a commit that referenced this pull request Jan 31, 2022
* fix

* fixed payment channels requests

* fixed payment channels requests

* fix detail

* increase timeout for hiding popup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-qa Any New Features that needs a full manual QA prior to being added to a release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants