-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat-header-update
- Loading branch information
Showing
17 changed files
with
616 additions
and
46 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
30 changes: 30 additions & 0 deletions
30
app/components/Views/confirmations/components/UI/InfoRow/InfoValue/Address/Address.test.tsx
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,30 @@ | ||
import React from 'react'; | ||
|
||
import renderWithProvider from '../../../../../../../../util/test/renderWithProvider'; | ||
import { backgroundState } from '../../../../../../../../util/test/initial-root-state'; | ||
import { | ||
MOCK_ACCOUNTS_CONTROLLER_STATE, | ||
MOCK_ADDRESS_1, | ||
} from '../../../../../../../../util/test/accountsControllerTestUtils'; | ||
|
||
import Address from './Address'; | ||
|
||
const mockInitialState = { | ||
engine: { | ||
backgroundState: { | ||
...backgroundState, | ||
AccountsController: { | ||
...MOCK_ACCOUNTS_CONTROLLER_STATE, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
describe('InfoAddress', () => { | ||
it('should match snapshot', async () => { | ||
const container = renderWithProvider(<Address address={MOCK_ADDRESS_1} />, { | ||
state: mockInitialState, | ||
}); | ||
expect(container).toMatchSnapshot(); | ||
}); | ||
}); |
14 changes: 14 additions & 0 deletions
14
app/components/Views/confirmations/components/UI/InfoRow/InfoValue/Address/Address.tsx
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,14 @@ | ||
import React from 'react'; | ||
|
||
import Name from '../../../../../../../UI/Name'; | ||
import { NameType } from '../../../../../../../UI/Name/Name.types'; | ||
|
||
interface AddressProps { | ||
address: string; | ||
} | ||
|
||
const Address = ({ address }: AddressProps) => ( | ||
<Name type={NameType.EthereumAddress} value={address} /> | ||
); | ||
|
||
export default Address; |
50 changes: 50 additions & 0 deletions
50
...confirmations/components/UI/InfoRow/InfoValue/Address/__snapshots__/Address.test.tsx.snap
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,50 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`InfoAddress should match snapshot 1`] = ` | ||
<View | ||
style={ | ||
{ | ||
"alignItems": "center", | ||
"alignSelf": "center", | ||
"backgroundColor": "#f2f4f6", | ||
"borderRadius": 99, | ||
"flexDirection": "row", | ||
"gap": 5, | ||
"paddingLeft": 8, | ||
"paddingRight": 8, | ||
"paddingVertical": 4, | ||
} | ||
} | ||
> | ||
<SvgMock | ||
color="#141618" | ||
height={20} | ||
name="Question" | ||
style={ | ||
{ | ||
"height": 20, | ||
"width": 20, | ||
} | ||
} | ||
width={20} | ||
/> | ||
<Text | ||
accessibilityRole="text" | ||
ellipsizeMode="middle" | ||
numberOfLines={1} | ||
style={ | ||
{ | ||
"color": "#141618", | ||
"flexShrink": 1, | ||
"fontFamily": "EuclidCircularB-Regular", | ||
"fontSize": 14, | ||
"fontWeight": "400", | ||
"letterSpacing": 0, | ||
"lineHeight": 22, | ||
} | ||
} | ||
> | ||
0xC4955...4D272 | ||
</Text> | ||
</View> | ||
`; |
1 change: 1 addition & 0 deletions
1
app/components/Views/confirmations/components/UI/InfoRow/InfoValue/Address/index.ts
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 @@ | ||
export { default } from './Address'; |
2 changes: 1 addition & 1 deletion
2
app/components/Views/confirmations/components/UI/InfoRow/InfoValue/InfoURL/InfoURL.test.tsx
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
Oops, something went wrong.