-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cab): Add error banner for CAB delete failure (#5000)
### Description For [ACT-767](https://linear.app/valora/issue/ACT-767/backup-deletion-loading-and-error-states). ### Test plan Manual and unit tested. See video below. You can manually trigger this to appear without code changes by just backing out of PIN entry after pressing the delete button. https://github.com/valora-inc/wallet/assets/569401/e70db41a-d4a4-49be-8bf4-ef61f0656bfa ### Related issues - Fixes [ACT-767](https://linear.app/valora/issue/ACT-767/backup-deletion-loading-and-error-states). ### Backwards compatibility Yes. ### Network scalability If a new NetworkId and/or Network are added in the future, the changes in this PR will: - [x] Continue to work without code changes, OR trigger a compilation error (guaranteeing we find it when a new network is added)
- Loading branch information
Showing
13 changed files
with
138 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import * as React from 'react' | ||
import { StyleSheet } from 'react-native' | ||
import Modal from 'src/components/Modal' | ||
import { Spacing } from 'src/styles/styles' | ||
import InLineNotification, { InLineNotificationProps } from 'src/components/InLineNotification' | ||
|
||
type InLineNotificationModalProps = InLineNotificationProps & { | ||
onDismiss: () => void | ||
isVisible: boolean | ||
} | ||
|
||
export default function InLineNotificationModal({ | ||
severity, | ||
title, | ||
description, | ||
style, | ||
ctaLabel, | ||
onPressCta, | ||
ctaLabel2, | ||
onPressCta2, | ||
testID, | ||
onDismiss, | ||
isVisible, | ||
}: InLineNotificationModalProps) { | ||
return ( | ||
<Modal | ||
modalStyle={styles.modalStyle} | ||
style={styles.modalContentStyle} | ||
isVisible={isVisible} | ||
onModalHide={onDismiss} | ||
onBackgroundPress={onDismiss} | ||
> | ||
<InLineNotification | ||
severity={severity} | ||
title={title} | ||
description={description} | ||
style={style} | ||
ctaLabel={ctaLabel} | ||
onPressCta={onPressCta} | ||
ctaLabel2={ctaLabel2} | ||
onPressCta2={onPressCta2} | ||
testID={testID} | ||
/> | ||
</Modal> | ||
) | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
modalStyle: { | ||
justifyContent: 'flex-end', | ||
marginHorizontal: Spacing.Regular16, | ||
marginBottom: Spacing.XLarge48, | ||
}, | ||
modalContentStyle: { | ||
padding: 0, | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1594,4 +1594,5 @@ export const migrations = { | |
isEncryptingComment: false, | ||
}, | ||
}), | ||
195: (state: any) => state, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters