Skip to content

Commit

Permalink
putintornull
Browse files Browse the repository at this point in the history
  • Loading branch information
nazli-stripe committed Mar 28, 2024
1 parent 104e7c6 commit 879f06c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ private fun mapFromOfflineDetails(offlineDetails: OfflineDetails?): ReadableMap?
private fun mapFromAmountDetails(amountDetails: AmountDetails?): ReadableMap? =
amountDetails?.let {
nativeMapOf {
putMap("tip", nativeMapOf { putInt("amount", amountDetails.tip?.amount?.toInt() ?: 0) })
putMap("tip", nativeMapOf { putIntOrNull(this, "amount", amountDetails.tip?.amount?.toInt())})
}
}

Expand Down
5 changes: 3 additions & 2 deletions dev-app/src/screens/DatabaseScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ export default function DatabaseScreen() {
' ' +
(
Number(
offlinePaymentStatus.reader!
.offlinePaymentAmountsByCurrency[key]
offlinePaymentStatus.sdk.offlinePaymentAmountsByCurrency[
key
]
) / 100
).toFixed(2)
}
Expand Down

0 comments on commit 879f06c

Please sign in to comment.