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

transactions: refactor #5369

Merged
merged 48 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
5c38c17
save
skylarbarrera Jan 30, 2024
dbe39a3
remove selectors and add types
skylarbarrera Jan 30, 2024
ae7a07e
single query, type refactor, pipe it up
skylarbarrera Jan 31, 2024
6ee0333
Merge branch 'develop' into @skylar/txs
skylarbarrera Feb 2, 2024
aef7ea0
Merge branch 'develop' into @skylar/txs
skylarbarrera Feb 2, 2024
b243106
pendingTx state & zustand
skylarbarrera Feb 4, 2024
cdff884
useWatchPendingTxs
skylarbarrera Feb 4, 2024
2090834
usePoll + usage
skylarbarrera Feb 4, 2024
73edda0
queries
skylarbarrera Feb 4, 2024
43ea9f2
use transactions
skylarbarrera Feb 4, 2024
1fb037e
messy types and structure
skylarbarrera Feb 4, 2024
f00741c
addNewTransactions
skylarbarrera Feb 4, 2024
0ead5a0
fix prettier
walmat Feb 5, 2024
820a461
Revert "fix prettier"
skylarbarrera Feb 6, 2024
538f3de
save
skylarbarrera Feb 6, 2024
30d5a0e
lint
skylarbarrera Feb 6, 2024
d3b85f7
Merge branch 'develop' into @skylar/txs
skylarbarrera Feb 6, 2024
89a6898
save
skylarbarrera Feb 7, 2024
e4a27f7
ui tweaks
skylarbarrera Feb 8, 2024
c2648ec
Merge branch 'develop' into @skylar/txs
skylarbarrera Feb 8, 2024
0bc2f3b
clean up state and add nonces
skylarbarrera Feb 8, 2024
734f9c6
ben ui review
skylarbarrera Feb 9, 2024
a96374c
Merge branch 'develop' into @skylar/txs
skylarbarrera Feb 9, 2024
4a6b4b7
pipe up once shit
skylarbarrera Feb 9, 2024
6842d51
clean
skylarbarrera Feb 9, 2024
518a9b0
clean
skylarbarrera Feb 9, 2024
b8c6cc0
rename and fix case
skylarbarrera Feb 11, 2024
144eed2
fix tag color and position
skylarbarrera Feb 11, 2024
0207b90
clean up
skylarbarrera Feb 12, 2024
6cfff41
clean up
skylarbarrera Feb 12, 2024
079e7f3
rm logs
skylarbarrera Feb 12, 2024
7f1fe49
use new tx handling for notifs
skylarbarrera Feb 12, 2024
babf8d0
clean
skylarbarrera Feb 12, 2024
f5d1f78
rm comment
skylarbarrera Feb 12, 2024
272e5db
rm space
skylarbarrera Feb 12, 2024
69147a2
fix
skylarbarrera Feb 12, 2024
e10d1c4
speed up + cancel tweaks
skylarbarrera Feb 13, 2024
2784cad
remove clear specific pending tx logic
skylarbarrera Feb 13, 2024
f49d059
remove cancelled description
skylarbarrera Feb 13, 2024
c3d30ff
Merge branch 'develop' into @skylar/txs
skylarbarrera Feb 13, 2024
f988126
Merge remote-tracking branch 'origin/develop' into @skylar/txs
skylarbarrera Feb 22, 2024
29478ea
fix swap label
skylarbarrera Feb 22, 2024
5b9b564
updating pending based on consolidated txs
skylarbarrera Feb 22, 2024
d7e7a46
fix cancel + speed up
skylarbarrera Feb 22, 2024
47cc921
fix ens logo + rm asset
skylarbarrera Feb 22, 2024
9517ab0
rm fall back
skylarbarrera Feb 22, 2024
e059757
fix asset quantity display
skylarbarrera Feb 22, 2024
190d120
ts
skylarbarrera Feb 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/activity-list/ActivityList.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import lang from 'i18n-js';
import * as lang from '@/languages';
import React, { useCallback, useEffect, useMemo, useState } from 'react';
import { SectionList, StyleSheet, View } from 'react-native';
import sectionListGetItemLayout from 'react-native-section-list-get-item-layout';
Expand Down Expand Up @@ -95,7 +95,7 @@ const ActivityList = ({
let currentPendingTransactionsCount = 0;
const pendingTxSection = sections[requests?.length ? 1 : 0];

if (pendingTxSection && pendingTxSection.title === 'Pending') {
if (pendingTxSection && pendingTxSection.title === lang.t(lang.l.transactions.pending_title)) {
currentPendingTransactionsCount = pendingTxSection.data.length;
}
return currentPendingTransactionsCount;
Expand Down Expand Up @@ -139,7 +139,7 @@ const ActivityList = ({
}
} else {
return (
<ActivityListEmptyState emoji="👻" label={lang.t('activity_list.empty_state.testnet_label')}>
<ActivityListEmptyState emoji="👻" label={lang.t(lang.l.empty_state.testnet_label)}>
{header}
</ActivityListEmptyState>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,14 @@ export default React.memo(function FastCoinIcon({
network,
symbol,
theme,
ignoreBadge = false,
}: {
address: string;
mainnetAddress?: string;
network: Network;
symbol: string;
theme: ThemeContextProps;
ignoreBadge?: boolean;
}) {
const { colors } = theme;

Expand Down Expand Up @@ -105,7 +107,7 @@ export default React.memo(function FastCoinIcon({
</FastFallbackCoinIconImage>
)}

{network && <FastChainBadge network={network} theme={theme} />}
{!ignoreBadge && network && <FastChainBadge network={network} theme={theme} />}
</View>
);
});
Expand Down
66 changes: 66 additions & 0 deletions src/components/coin-icon/TwoCoinsIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import React from 'react';
import { Box } from '@/design-system';
import { ParsedAddressAsset } from '@/entities';
import { useTheme } from '@/theme';
import { ImgixImage } from '@/components/images';
import ChainBadge from './ChainBadge';

export function TwoCoinsIcon({
size = 45,
under,
over,
badge = true,
}: {
size?: number;
under: ParsedAddressAsset;
over: ParsedAddressAsset;
badge?: boolean;
}) {
const theme = useTheme();
const overSize = size * 0.85;
const underSize = size * 0.75;

return (
<Box style={{ minWidth: size, height: size, marginRight: -5 }}>
<Box
style={{
position: 'absolute',
top: 8,
right: 4,
minWidth: size,
height: size,
}}
>
<Box
borderRadius={100}
style={{
zIndex: 0,
position: 'absolute',
top: -underSize / 4,
left: -0,
}}
>
<ImgixImage
source={{ uri: under?.icon_url }}
style={{ borderRadius: 100, width: underSize, height: underSize }}
size={underSize}
/>
</Box>
<Box borderRadius={100} style={{ zIndex: 10, position: 'absolute', top: 0, right: 0 }}>
<ImgixImage
source={{ uri: over?.icon_url }}
style={{
borderRadius: 100,
width: overSize,
height: overSize,
borderWidth: 2,
borderColor: theme.colors.white,
}}
size={overSize}
/>
</Box>
{badge && <ChainBadge network={over.network} badgeYPosition={9} badgeXPosition={-7.5} />}
</Box>
</Box>
);
}