Skip to content

Commit

Permalink
Merge pull request #547 from 0xsend/dev
Browse files Browse the repository at this point in the history
deploy
  • Loading branch information
0xBigBoss authored Jul 5, 2024
2 parents 6a914c0 + 399f113 commit 62ed945
Show file tree
Hide file tree
Showing 26 changed files with 113 additions and 95 deletions.
2 changes: 1 addition & 1 deletion apps/next/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function MyApp({
<title>Send</title>
<meta
name="description"
content="Send App harnesses Ethereum's latest advancements, notably account abstraction, to simplify cryptocurrency entry. By integrating this into Ethereum, we streamline transactions and contracts, complemented by Send App's user-friendly design."
content="With a primary focus on enabling seamless USDC (USD Coin) transfers, Send offers scalability, global accessibility, and cost-effectiveness for both merchants and consumers."
/>
<meta
name="viewport"
Expand Down
2 changes: 1 addition & 1 deletion packages/app/components/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ function SearchResultRow({
$theme-light={{ color: '$darkGrayTextField' }}
$gtSm={{ fontSize: '$2' }}
>
{profile.tag_name ? `@${profile.tag_name}` : `#${profile.send_id}`}
{profile.tag_name ? `/${profile.tag_name}` : `#${profile.send_id}`}
</Text>
</YStack>
</XStack>
Expand Down
11 changes: 1 addition & 10 deletions packages/app/components/TopNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,16 +224,7 @@ export function TopNav({
top={0}
justifyContent="center"
>
<View
bw={1}
br={'$2'}
$theme-dark={{ boc: '$decay' }}
$theme-light={{ boc: '$gray4Light' }}
py={'$1.5'}
px={'$2'}
miw="$18"
bc="$background"
>
<View bw={1} br={'$2'} boc="$decay" py={'$1.5'} px={'$2'} miw="$18" bc="$background">
<TokenDetailsMarketData coin={selectedCoin} />
</View>
</View>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ exports[`AccountScreen renders the account screen: AccountScreen 1`] = `
"alignItems": "center",
"flexDirection": "column",
"gap": 24,
"paddingBottom": 32,
"paddingTop": 32,
"width": "100%",
}
}
Expand Down Expand Up @@ -231,7 +229,7 @@ exports[`AccountScreen renders the account screen: AccountScreen 1`] = `
}
suppressHighlighting={true}
>
@
/
test
</Text>
</View>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ exports[`EarnTokensScreen renders: EarnTokensScreen 1`] = `
{
"alignItems": "center",
"backgroundColor": "transparent",
"color": "#666666",
"color": "#3E4A3C",
"display": "flex",
"fontFamily": "System",
"fontSize": 19.2,
Expand Down Expand Up @@ -384,7 +384,7 @@ exports[`EarnTokensScreen renders: EarnTokensScreen 1`] = `
{
"alignItems": "center",
"backgroundColor": "transparent",
"color": "#666666",
"color": "#3E4A3C",
"display": "flex",
"fontFamily": "System",
"fontSize": 19.2,
Expand Down Expand Up @@ -463,7 +463,7 @@ exports[`EarnTokensScreen renders: EarnTokensScreen 1`] = `
{
"alignItems": "center",
"backgroundColor": "transparent",
"color": "#666666",
"color": "#3E4A3C",
"display": "flex",
"fontFamily": "System",
"fontSize": 19.2,
Expand Down Expand Up @@ -671,7 +671,7 @@ exports[`EarnTokensScreen renders: EarnTokensScreen 1`] = `
selectable={true}
style={
{
"color": "#666666",
"color": "#FFFFFF",
"fontFamily": "System",
"fontSize": 13.2,
"fontWeight": "300",
Expand Down Expand Up @@ -708,7 +708,7 @@ exports[`EarnTokensScreen renders: EarnTokensScreen 1`] = `
selectable={true}
style={
{
"color": "#666666",
"color": "#FFFFFF",
"fontFamily": "System",
"fontSize": 13.2,
"fontWeight": "300",
Expand Down Expand Up @@ -745,7 +745,7 @@ exports[`EarnTokensScreen renders: EarnTokensScreen 1`] = `
selectable={true}
style={
{
"color": "#666666",
"color": "#FFFFFF",
"fontFamily": "System",
"fontSize": 13.2,
"fontWeight": "300",
Expand Down Expand Up @@ -782,7 +782,7 @@ exports[`EarnTokensScreen renders: EarnTokensScreen 1`] = `
selectable={true}
style={
{
"color": "#666666",
"color": "#FFFFFF",
"fontFamily": "System",
"fontSize": 13.2,
"fontWeight": "300",
Expand Down Expand Up @@ -819,7 +819,7 @@ exports[`EarnTokensScreen renders: EarnTokensScreen 1`] = `
selectable={true}
style={
{
"color": "#666666",
"color": "#FFFFFF",
"fontFamily": "System",
"fontSize": 13.2,
"fontWeight": "300",
Expand Down Expand Up @@ -856,7 +856,7 @@ exports[`EarnTokensScreen renders: EarnTokensScreen 1`] = `
selectable={true}
style={
{
"color": "#666666",
"color": "#FFFFFF",
"fontFamily": "System",
"fontSize": 13.2,
"fontWeight": "300",
Expand Down Expand Up @@ -893,7 +893,7 @@ exports[`EarnTokensScreen renders: EarnTokensScreen 1`] = `
selectable={true}
style={
{
"color": "#666666",
"color": "#FFFFFF",
"fontFamily": "System",
"fontSize": 13.2,
"fontWeight": "300",
Expand Down Expand Up @@ -930,7 +930,7 @@ exports[`EarnTokensScreen renders: EarnTokensScreen 1`] = `
selectable={true}
style={
{
"color": "#666666",
"color": "#FFFFFF",
"fontFamily": "System",
"fontSize": 13.2,
"fontWeight": "300",
Expand Down Expand Up @@ -967,7 +967,7 @@ exports[`EarnTokensScreen renders: EarnTokensScreen 1`] = `
selectable={true}
style={
{
"color": "#666666",
"color": "#FFFFFF",
"fontFamily": "System",
"fontSize": 13.2,
"fontWeight": "300",
Expand Down Expand Up @@ -1004,7 +1004,7 @@ exports[`EarnTokensScreen renders: EarnTokensScreen 1`] = `
selectable={true}
style={
{
"color": "#666666",
"color": "#FFFFFF",
"fontFamily": "System",
"fontSize": 13.2,
"fontWeight": "300",
Expand Down
54 changes: 44 additions & 10 deletions packages/app/features/account/rewards/screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
View,
XStack,
YStack,
useThemeName,
} from '@my/ui'
import {
type UseDistributionsResultData,
Expand Down Expand Up @@ -206,7 +207,7 @@ const DistributionRewardsSection = ({
</Stack>
</XStack>
</Stack>
{confirmedTags?.length === 0 ? (
{confirmedTags?.length === -1 ? (
<Card
w="100%"
jc={'space-around'}
Expand Down Expand Up @@ -333,14 +334,20 @@ const SendBalanceCard = ({
<Card
bw={1}
br={12}
theme="ghost_dim"
theme="ghost_alt1"
p="$4"
$xs={{ p: '$2.5' }}
$gtLg={{ p: '$4' }}
jc="center"
>
<YStack gap="$2" $gtLg={{ gap: '$4' }}>
<Label fontFamily={'$mono'} fontSize={'$5'} color="$color9">
<Label
fontFamily={'$mono'}
fontSize={'$5'}
theme="green"
col={'$color2'}
$theme-light={{ col: '$color12' }}
>
Snapshot Send Balance
</Label>
{isLoadingSnapshotBalance || isLoadingChainAddresses ? (
Expand All @@ -366,7 +373,7 @@ const SendBalanceCard = ({
const MinBalanceCard = ({ hodler_min_balance }: { hodler_min_balance: number }) => (
<Card
f={2}
theme="ghost_dim"
theme="ghost_alt1"
bw={1}
br={12}
$xs={{ p: '$2.5' }}
Expand All @@ -375,7 +382,13 @@ const MinBalanceCard = ({ hodler_min_balance }: { hodler_min_balance: number })
jc="center"
>
<YStack gap="$2" $gtLg={{ gap: '$4' }}>
<Label fontFamily={'$mono'} fontSize={'$5'} color="$color9">
<Label
fontFamily={'$mono'}
fontSize={'$5'}
theme="green"
col={'$color2'}
$theme-light={{ col: '$color12' }}
>
Min Balance required
</Label>
<Paragraph fontFamily={'$mono'} fontSize={'$7'} fontWeight={'500'} color={'$color12'}>
Expand All @@ -390,14 +403,20 @@ const ReferralsCard = ({ referrals }: { referrals: number | null }) => (
f={1}
borderWidth={1}
br={12}
theme="ghost_dim"
theme="ghost_alt1"
$xs={{ p: '$2.5' }}
p="$4"
$gtLg={{ p: '$4' }}
jc="center"
>
<YStack gap="$2" $gtLg={{ gap: '$4' }}>
<Label fontFamily={'$mono'} fontSize={'$5'} col={'$color9'}>
<Label
fontFamily={'$mono'}
fontSize={'$5'}
theme="green"
col={'$color2'}
$theme-light={{ col: '$color12' }}
>
Referrals
</Label>

Expand Down Expand Up @@ -467,6 +486,8 @@ const DistributionRewardsList = ({
const { isLoading, error } = useDistributions()
const [queryParams, setParams] = useRewardsScreenParams()

const isDark = useThemeName().includes('dark')

const mock = (len: number, start = 0) =>
new Array(len).fill(undefined).map((_, i) => ({ number: start + i + 1 }))

Expand Down Expand Up @@ -504,7 +525,13 @@ const DistributionRewardsList = ({
jc="center"
opacity={0.5}
>
<Paragraph size={'$1'} padding={'unset'} ta="center" margin={'unset'} col="$color9">
<Paragraph
size={'$1'}
padding={'unset'}
ta="center"
margin={'unset'}
col="$color12"
>
{`# ${i + 1}`}
</Paragraph>
</Card>
Expand Down Expand Up @@ -557,12 +584,19 @@ const DistributionRewardsList = ({
miw="$7"
h="$2"
br={6}
theme="green_alt2"
theme={isDark ? 'green_alt2' : undefined}
$theme-light={{ bc: '$color2' }}
onPress={() =>
setParams({ distribution: distribution.number }, { webBehavior: 'replace' })
}
>
<ButtonText size={'$1'} padding={'unset'} ta="center" margin={'unset'} col="white">
<ButtonText
size={'$1'}
padding={'unset'}
ta="center"
margin={'unset'}
col="$color12"
>
{`# ${distribution?.number} `}
</ButtonText>
</Button>
Expand Down
4 changes: 2 additions & 2 deletions packages/app/features/account/screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export function AccountScreen() {
]

return (
<YStack w={'100%'} ai={'center'} gap={'$size.1.5'} py="$6">
<YStack w={'100%'} ai={'center'} gap={'$size.1.5'}>
<Card p={'$size.3.5'} w={'100%'}>
<XStack gap={'$size.3.5'} w={'100%'} flexWrap="wrap">
<View width={'100%'} $gtMd={{ width: 'auto' }}>
Expand Down Expand Up @@ -213,7 +213,7 @@ export function AccountScreen() {

{tags?.[0] ? (
<Paragraph fontSize={'$7'} fontWeight={'600'} theme={'alt2'}>
@{tags[0].name}
/{tags[0].name}
</Paragraph>
) : null}
</YStack>
Expand Down
10 changes: 5 additions & 5 deletions packages/app/features/activity/ActivityRow.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('ActivityRow', () => {
// expect(getByText('Alice')).toBeOnTheScreen() // should we show the user's name?
expect(getByText('Sent')).toBeOnTheScreen()
expect(getByText('0.019032 USDC')).toBeOnTheScreen()
expect(getByText('@alice')).toBeOnTheScreen() // shows receivers first tag
expect(getByText('/alice')).toBeOnTheScreen() // shows receivers first tag
})

it('should render send account transfers event when received and sender is a send app user', () => {
Expand All @@ -67,7 +67,7 @@ describe('ActivityRow', () => {
)
expect(getByText('Received')).toBeOnTheScreen()
expect(getByText('0.019032 USDC')).toBeOnTheScreen() // show senders address if not a send app user
expect(getByText('@alice')).toBeOnTheScreen() // shows senders first tag
expect(getByText('/alice')).toBeOnTheScreen() // shows senders first tag
})

it('should render tag receipts event', () => {
Expand All @@ -78,7 +78,7 @@ describe('ActivityRow', () => {
</TamaguiProvider>
)
expect(getByText('Sendtag Registered')).toBeOnTheScreen()
expect(getByText('@yuw')).toBeOnTheScreen()
expect(getByText('/yuw')).toBeOnTheScreen()
expect(getByText('0.02 ETH')).toBeOnTheScreen()
})

Expand All @@ -90,7 +90,7 @@ describe('ActivityRow', () => {
</TamaguiProvider>
)
expect(getByText('Referral')).toBeOnTheScreen()
expect(getByText('@disconnect_whorl7351')).toBeOnTheScreen()
expect(getByText('/disconnect_whorl7351')).toBeOnTheScreen()
expect(getByTestId('ActivityRowAmount')).toHaveTextContent('1 Referrals')
})

Expand All @@ -104,7 +104,7 @@ describe('ActivityRow', () => {
</TamaguiProvider>
)
expect(getByText('Referred By')).toBeOnTheScreen()
expect(getByText('@disconnect_whorl7351')).toBeOnTheScreen()
expect(getByText('/disconnect_whorl7351')).toBeOnTheScreen()
expect(getByTestId('ActivityRowAmount')).toBeEmptyElement()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ exports[`ActivityScreen renders activity screen: ActivityScreen 1`] = `
}
suppressHighlighting={true}
>
@yuw
/yuw
</Text>
<Text
style={
Expand Down Expand Up @@ -1482,7 +1482,7 @@ exports[`ActivityScreen renders activity screen: ActivityScreen 1`] = `
}
suppressHighlighting={true}
>
@disconnect_whorl7351
/disconnect_whorl7351
</Text>
<Text
style={
Expand Down Expand Up @@ -2443,7 +2443,7 @@ exports[`ActivityScreen renders activity screen: ActivityScreen 1`] = `
}
suppressHighlighting={true}
>
@dan
/dan
</Text>
<Text
style={
Expand Down
Loading

0 comments on commit 62ed945

Please sign in to comment.