-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Wallet] Add support for social wallet (Safeguards) import (#1414)
* Implement the latest import wallet flow designs * Add support for social wallet (Safeguards) import * A bit of style cleanup
- Loading branch information
Showing
41 changed files
with
1,880 additions
and
864 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
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 |
---|---|---|
@@ -1,10 +1,54 @@ | ||
import * as React from 'react' | ||
import 'react-native' | ||
import * as renderer from 'react-test-renderer' | ||
import BackupPhraseContainer from 'src/backup/BackupPhraseContainer' | ||
import { mockMnemonic } from 'test/values' | ||
import BackupPhraseContainer, { | ||
BackupPhraseContainerMode, | ||
BackupPhraseType, | ||
} from 'src/backup/BackupPhraseContainer' | ||
import { mockMnemonic, mockMnemonicShard1 } from 'test/values' | ||
|
||
it('renders correctly', () => { | ||
const tree = renderer.create(<BackupPhraseContainer words={mockMnemonic} />) | ||
expect(tree).toMatchSnapshot() | ||
describe(BackupPhraseContainer, () => { | ||
it('renders correctly for readonly backup phrase', () => { | ||
const tree = renderer.create( | ||
<BackupPhraseContainer | ||
value={mockMnemonic} | ||
mode={BackupPhraseContainerMode.READONLY} | ||
type={BackupPhraseType.BACKUP_KEY} | ||
/> | ||
) | ||
expect(tree).toMatchSnapshot() | ||
}) | ||
|
||
it('renders correctly for input backup phrase', () => { | ||
const tree = renderer.create( | ||
<BackupPhraseContainer | ||
value={mockMnemonic} | ||
mode={BackupPhraseContainerMode.INPUT} | ||
type={BackupPhraseType.BACKUP_KEY} | ||
/> | ||
) | ||
expect(tree).toMatchSnapshot() | ||
}) | ||
|
||
it('renders correctly for readonly social backup phrase', () => { | ||
const tree = renderer.create( | ||
<BackupPhraseContainer | ||
value={mockMnemonicShard1} | ||
mode={BackupPhraseContainerMode.READONLY} | ||
type={BackupPhraseType.SOCIAL_BACKUP} | ||
/> | ||
) | ||
expect(tree).toMatchSnapshot() | ||
}) | ||
|
||
it('renders correctly for input social backup phrase', () => { | ||
const tree = renderer.create( | ||
<BackupPhraseContainer | ||
value={mockMnemonicShard1} | ||
mode={BackupPhraseContainerMode.INPUT} | ||
type={BackupPhraseType.SOCIAL_BACKUP} | ||
/> | ||
) | ||
expect(tree).toMatchSnapshot() | ||
}) | ||
}) |
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
Oops, something went wrong.