Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add wallet balance transfer Page #6878
Add wallet balance transfer Page #6878
Changes from 8 commits
68395a0
d0d742e
e89e58e
a616f37
7967331
b541e5c
1ccd2f7
11b8df1
dce8300
0998c3d
1408f61
6105dd5
2464a57
a36bd7b
2050722
f2c2765
3225c7e
66f3bfb
00fb74c
66ba6bc
437e0c3
a491cf4
9d8207c
e46e185
0cea1a9
6e3df64
4883344
f09a386
f3f30ef
b51397e
3e44bc0
0782a10
efeb43c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
NAB, but these docs are inconsistent with how we do things. If there are multiple types we use
*
and the last one should beString
. I will try to propose a style guide change so it doesn't need to be mentioned.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.
Not sure about this alert and think we should remove it for now. We can see in the server logs why a request returned a jsonCode other than 200. @stitesExpensify do you agree?
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 to use a
merge()
here instead of aset()
?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.
Yeah. It does not hurt. Sorry, forgot the conflict issues between set and merge.
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.
Remove please.
Future reference: avoid docs that don't add any additional information - https://github.com/Expensify/App/blob/main/STYLE.md#jsdocs
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 am not sure what would be the best way to handle these but I need these to share data across screens.
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.
There's perhaps no other way to share this data. But the logic can be improved.
cancelWalletTransfer
sounds like either:But then if we look at where this method is called we see it happens when we "confirm" a modal that says
{amount} will hit your account shortly!
.If we are just sharing data about a pending transfer then maybe it's best to call this
resetWalletTransferData()
.But looking into it more - it seems like the primary purpose is to dismiss the confirm modal. So, why not do this instead...
If we need to "clear" the rest of the data like balance, accountID, etc why are we doing that when the modal button is pressed? Shouldn't this always happen when we have a successful transfer here:
App/src/libs/actions/PaymentMethods.js
Lines 112 to 119 in 11b8df1
And not just when a user "confirms"?
App/src/pages/settings/Payments/PaymentsPage.js
Lines 176 to 180 in 11b8df1
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.
It was just the shorter way to do two things at once. reset the data and hide the confirm modal.
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 understand that instinct, but my feedback would be that the shorter way is not always the easiest to understand. It's usually better to write code that leaves no doubt about what is happening vs. code where we must inspect the details of every method to figure out what it does.