-
Notifications
You must be signed in to change notification settings - Fork 3.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
prevent send/request money multiple times #13733
Conversation
@youssef-lr @aimane-chnaif One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
src/pages/iou/IOUModal.js
Outdated
onConfirm={this.createTransaction} | ||
onSendMoney={this.sendMoney} | ||
onConfirm={(selectedParticipants) => { | ||
if (this.creatingIOUTransaction) { return; } |
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.
if (this.creatingIOUTransaction) { return; } | |
// Prevent creating multiple transactions if the button is pressed repeatedly | |
if (this.creatingIOUTransaction) { return; } |
Let's add a comment here to clarify the change.
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.
done
LGTM! Left a comment. |
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.
LGTM and tested well! All yours @aimane-chnaif :)
@youssef-lr is there any clear step of failure case? I tried to fail but always success. I believe it will work but just to confirm :) |
I think the failures that we used to handle in the IOU modal date back to when the API wasn't offline first, so we get an error right away if there's one. Now I believe this is handled in our But just to double check, let me try and force an error in the backend locally and see how it's handled. |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromemchrome.mp4Mobile Web - Safarimsafari.mp4Desktopdesktop.moviOSios.mp4Androidandroid.mp4 |
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.
LGTM too and tests well!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Performance Comparison Report 📊Significant Changes To DurationThere are no entries Meaningless Changes To DurationShow entries
Show details
|
🚀 Deployed to staging by @youssef-lr in version: 1.2.43-0 🚀
|
🚀 Deployed to production by @chiragsalian in version: 1.2.43-1 🚀
|
Details
Use local flag (stateless) to check whether send/request event should be triggered or not
Fixed Issues
$ #12714 (comment)
PROPOSAL: #12714
Tests
Request
/I'll settle up elsewhere
button multiple times on mobile)Offline tests
Request
/I'll settle up elsewhere
button multiple times on mobile)QA Steps
Request
/I'll settle up elsewhere
button multiple times on mobile)PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.Screenshots/Videos
Web
web.mov
Mobile Web - Chrome
mchrome.mp4
Mobile Web - Safari
msafari.mp4
Desktop
desktop.mov
iOS
ios.mp4
Android
android.mp4