-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Temporarily return false for isCardTransaction()
as all transactions are treated as card
#32081
Conversation
…eated as card transactions
@Santhosh-Sellavel Please 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] |
return (transaction?.cardID ?? 0) > 0; | ||
// We are returning cash cardID via the API. We can undo this after it is fixed in Auth. | ||
// return (transaction?.cardID ?? 0) > 0; | ||
return false; |
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 this might introduce another issue. We use this logic to decide if transactions are editable, so always returning false means users might see card transactions as editable in the UI. Can we check if the card is a CASH card instead?
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.
Can we check if the card is a CASH card instead?
Yes, that would be the "real" fix. Or are you saying we are returning that somewhere already?
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.
We can maybe fix it in the PHP layer and CP that... ?
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.
Hmm I think not - it is still missing some things to determine if it is the cash card. Like - bank
, managedCard
etc
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.
WRT to editing card transactions. Do we prevent that in the API? Them being editable might be weird, but I'd take that bug over this one.
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's also... what we have on production already? 😄
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 don't think this is a problem with what we're sending- let's just filter out cash cards in this function?
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.
@grgia I like the solution you came up with to fix the Deploy Blocker.
In web-expensify it looks like we download all cards and then check to see if the card is cash by looking at the cardName
, bank
etc. Having something like isCashCard
returned from Auth and attached to the transaction might be more direct.
Details
The
cardID
in the commented out code can be a "cash" card. Which leads to bugs and must be fixed in Auth.cc @luacmartins @grgia
Fixed Issues
$ #32077
Tests
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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)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.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop