Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize WalletListModal components #5439

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased (develop)

- changed: Disconnect `CryptoIcon` from redux
- changed: Use number math when handling exchange rates
- changed: Optimize `getCreateWalletList` function and usage

## 4.22.0 (staging)

- added: `NotificationCenterScene`
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/components/CurrencyIcon.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('CryptoIcon', () => {
it('should render with loading props', () => {
const renderer = TestRenderer.create(
<FakeProviders initialState={mockState}>
<CryptoIcon pluginId="bitcoin" tokenId="bitcoin" walletId="332s0ds39f" marginRem={1} />
<CryptoIcon pluginId="bitcoin" tokenId="bitcoin" marginRem={1} />
</FakeProviders>
)

Expand Down
37 changes: 36 additions & 1 deletion src/__tests__/components/__snapshots__/BuyCrypto.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,42 @@ exports[`BuyCrypto should render with some props 1`] = `
"width": 51,
}
}
/>
>
<View
style={
[
{
"overflow": "hidden",
},
{
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
},
]
}
>
<FastImageView
resizeMode="cover"
source={
{
"uri": "https://content.edge.app/currencyIconsV3/bitcoin/bitcoin.png",
}
}
style={
{
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
}
}
/>
</View>
</View>
</View>
<Text
adjustsFontSizeToFit={true}
Expand Down
81 changes: 0 additions & 81 deletions src/__tests__/components/__snapshots__/CurrencyIcon.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -13,87 +13,6 @@ exports[`CryptoIcon should render with loading props 1`] = `
}
}
>
<RNSVGSvgView
align="xMidYMid"
bbHeight={61}
bbWidth={61}
focusable={false}
height={61}
meetOrSlice={0}
minX={-8}
minY={-8}
style={
[
{
"backgroundColor": "transparent",
"borderWidth": 0,
},
{
"left": -8,
"position": "absolute",
"top": -8,
"transform": [
{
"rotateZ": "-90deg",
},
],
},
{
"flex": 0,
"height": 61,
"width": 61,
},
]
}
vbHeight={61}
vbWidth={61}
width={61}
>
<RNSVGGroup
fill={
{
"payload": 4278190080,
"type": 0,
}
}
>
<RNSVGCircle
cx={22.5}
cy={22.5}
fill={
{
"payload": 0,
"type": 0,
}
}
opacity={0}
propList={
[
"fill",
"stroke",
"strokeWidth",
"strokeDasharray",
"strokeLinecap",
]
}
r={24}
stroke={
{
"payload": 4278251938,
"type": 0,
}
}
strokeDasharray={
[
150.79644737231007,
150.79644737231007,
]
}
strokeLinecap={1}
strokeWidth={4}
/>
</RNSVGGroup>
</RNSVGSvgView>
<View
style={
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,87 +67,6 @@ exports[`ExchangeQuote should render with loading props 1`] = `
}
}
>
<RNSVGSvgView
align="xMidYMid"
bbHeight={61}
bbWidth={61}
focusable={false}
height={61}
meetOrSlice={0}
minX={-8}
minY={-8}
style={
[
{
"backgroundColor": "transparent",
"borderWidth": 0,
},
{
"left": -8,
"position": "absolute",
"top": -8,
"transform": [
{
"rotateZ": "-90deg",
},
],
},
{
"flex": 0,
"height": 61,
"width": 61,
},
]
}
vbHeight={61}
vbWidth={61}
width={61}
>
<RNSVGGroup
fill={
{
"payload": 4278190080,
"type": 0,
}
}
>
<RNSVGCircle
cx={22.5}
cy={22.5}
fill={
{
"payload": 0,
"type": 0,
}
}
opacity={0}
propList={
[
"fill",
"stroke",
"strokeWidth",
"strokeDasharray",
"strokeLinecap",
]
}
r={24}
stroke={
{
"payload": 4278251938,
"type": 0,
}
}
strokeDasharray={
[
150.79644737231007,
150.79644737231007,
]
}
strokeLinecap={1}
strokeWidth={4}
/>
</RNSVGGroup>
</RNSVGSvgView>
<View
style={
{
Expand Down
Loading
Loading