Skip to content

Commit f447f62

Browse files
committed
fix: prevent error when overlay size is smaller than min modal height
Fixes RIS-960
1 parent 6d35250 commit f447f62

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/trustBadge/index.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@ import {
1111
useWindowDimensions,
1212
} from 'react-native';
1313
import { Tick } from './Tick';
14-
import {
15-
Bundle,
16-
loadingHeight as bundleLoadingHeight,
17-
minModalHeight,
18-
} from '../bundle';
14+
import { Bundle, loadingHeight as bundleLoadingHeight } from '../bundle';
1915
import { ProofPoint } from './ProofPoint';
2016
import { useOffers } from '../hooks/useOffers';
2117
import { getClaimIcons } from '../utils';
@@ -61,12 +57,6 @@ const TrustBadgeComponent = ({
6157
(parseInt(overlayHeight.replace('%', ''), 10) / 100) * height;
6258
}
6359

64-
if (overlayHeight && overlayHeight <= minModalHeight) {
65-
throw new Error(
66-
`The current value: ${overlayHeight} of overlayHeight is invalid. It should be bigger than ${minModalHeight}`
67-
);
68-
}
69-
7060
if (!supportedVariants.includes(variant))
7161
throw new Error(
7262
`Trust badge variant "${variant}" is invalid. Please pass one of ${supportedVariants.join(',')}`

0 commit comments

Comments
 (0)