Skip to content

Commit

Permalink
fix eReceipt image crash
Browse files Browse the repository at this point in the history
  • Loading branch information
grgia committed Dec 8, 2023
1 parent d94c1e3 commit 8472d23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/EReceiptThumbnail.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function EReceiptThumbnail({transaction}) {
receiptMCCSize = variables.eReceiptMCCHeightWidthMedium;
}

const getBackgroundImage = useMemo((trans) => backgroundImages[StyleUtils.getEReceiptColorCode(trans)], [StyleUtils]);
const backgroundImage = useMemo(() => backgroundImages[StyleUtils.getEReceiptColorCode(transaction)], [StyleUtils, transaction]);

return (
<View
Expand All @@ -86,7 +86,7 @@ function EReceiptThumbnail({transaction}) {
onLayout={onContainerLayout}
>
<Image
source={getBackgroundImage(transaction)}
source={backgroundImage}
style={styles.eReceiptBackgroundThumbnail}
resizeMode="cover"
/>
Expand Down

0 comments on commit 8472d23

Please sign in to comment.