FIX: Options for sheet were broken on iPhone

This commit is contained in:
Marcos Rodriguez Velez 2024-03-10 05:24:07 -04:00
parent f06cc850e1
commit 34c6881cfb
No known key found for this signature in database
GPG Key ID: 6030B2F48CCE86D7

View File

@ -413,15 +413,14 @@ const ViewEditMultisigCosigners = ({ route }: Props) => {
/>
)}
{/* destructiveButtonIndex and cancelButtonIndex are different numbers on Mac Catalyst and mobile */}
<MultipleStepsListItem
useActionSheet
actionSheetOptions={{
options: isDesktop ? [loc.multisig.confirm, loc._.cancel] : ['', loc.multisig.confirm, loc._.cancel],
options: [loc._.cancel, loc.multisig.confirm],
title: loc._.seed,
message: loc.multisig.are_you_sure_seed_will_be_lost,
cancelButtonIndex: isDesktop ? 1 : 0,
destructiveButtonIndex: isDesktop ? 0 : 1,
cancelButtonIndex: 0,
confirmButtonIndex: 1,
}}
showActivityIndicator={vaultKeyData.keyIndex === el.index + 1 && vaultKeyData.isLoading}
dashes={el.index === length - 1 ? MultipleStepsListItemDashType.top : MultipleStepsListItemDashType.topAndBottom}
@ -430,8 +429,8 @@ const ViewEditMultisigCosigners = ({ route }: Props) => {
disabled: vaultKeyData.isLoading,
buttonType: MultipleStepsListItemButtohType.full,
onPress: buttonIndex => {
if ((isDesktop && buttonIndex === 1) || (!isDesktop && buttonIndex === 2)) return;
onPress: (buttonIndex: number) => {
if (buttonIndex === 0) return;
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
setVaultKeyData({
...vaultKeyData,