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

Added mixpanel tracking, updated routes, referral system #99

Merged
merged 54 commits into from
Aug 28, 2024
Merged
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
abb2fb0
lint fix
VenkatTeja Jul 30, 2024
68bcac2
chore: added mixpanel tracking and updated strategy query parameters …
hemantwasthere Aug 2, 2024
ae73c3a
format and linting checks
hemantwasthere Aug 2, 2024
90df6a9
fix: build issue
hemantwasthere Aug 2, 2024
f1a9570
fix: lint and formats
hemantwasthere Aug 2, 2024
0857f15
fix: build issue
hemantwasthere Aug 5, 2024
aed6c6c
chore: added revalidation in stats api route
hemantwasthere Aug 5, 2024
81e4f05
fix: deleted api folder
hemantwasthere Aug 5, 2024
93b3a91
Merge pull request #21 from strkfarm/dev
akiraonstarknet Aug 6, 2024
e11bc52
chore: added api folder
hemantwasthere Aug 6, 2024
d5effe3
chore: updated mixpanel token id
hemantwasthere Aug 6, 2024
8d3bb7f
chore: removed .vscode folder
hemantwasthere Aug 6, 2024
ebedf90
Merge branch 'dev' of https://github.com/hemantwasthere/starkfarm-cli…
hemantwasthere Aug 6, 2024
625eaa9
chore: revamped the connect wallet tracking code
hemantwasthere Aug 6, 2024
2738a56
fix: removed unwanted test button from navbar
hemantwasthere Aug 6, 2024
2b57118
fix: updated wallet connect mixpanel tracking code
hemantwasthere Aug 6, 2024
de14e16
converted wallet connect tracking props
hemantwasthere Aug 15, 2024
5e5f698
converted wallet connect props
hemantwasthere Aug 15, 2024
3eb6c0e
updated mixpanel token
hemantwasthere Aug 16, 2024
61079b7
chore: added share modal on deposit txn submission
hemantwasthere Aug 17, 2024
ae51106
fix: added share modal check to be shown on deposit txn submission only
hemantwasthere Aug 17, 2024
0ab87bb
chore: updated twitter share modal content
hemantwasthere Aug 18, 2024
39c72a7
updated terms and condition points
hemantwasthere Aug 18, 2024
2421f62
Merge pull request #24 from strkfarm/dev
akiraonstarknet Aug 18, 2024
f96629a
chore: added api's for storing tnc signed data
hemantwasthere Aug 18, 2024
4290814
fix: removed async notation from client component
hemantwasthere Aug 19, 2024
0ebea51
fix: build issue
hemantwasthere Aug 19, 2024
eb05b44
chore: updated deposit share modal
hemantwasthere Aug 20, 2024
639007f
fix: tracking changes
hemantwasthere Aug 20, 2024
3e52cbd
Merge branch 'dev' of https://github.com/hemantwasthere/starkfarm-cli…
hemantwasthere Aug 20, 2024
c846e6a
fix: merge conflicts
hemantwasthere Aug 20, 2024
1180491
chore: updated tnc modal logic
hemantwasthere Aug 21, 2024
1fafe63
fix: response from useSignTypedData hook
hemantwasthere Aug 23, 2024
e33de98
fix: tnc modal close on sign
hemantwasthere Aug 23, 2024
6a0d37f
chore: generating and storing referral code
hemantwasthere Aug 24, 2024
c84c219
chore: handled all the edge cases for refer system
hemantwasthere Aug 24, 2024
07c4896
chore: added validations and standardization in apis
hemantwasthere Aug 25, 2024
bebd447
chore: removed tnc
hemantwasthere Aug 25, 2024
08ac585
chore: update db schema
hemantwasthere Aug 25, 2024
73a34f9
Merge pull request #25 from strkfarm/dev
akiraonstarknet Aug 26, 2024
90678c0
Merge pull request #26 from hemantwasthere/dev
akiraonstarknet Aug 27, 2024
924376a
merged
akiraonstarknet Aug 27, 2024
05276aa
merged
akiraonstarknet Aug 27, 2024
fb6aaa1
merged
akiraonstarknet Aug 27, 2024
f9b17d0
add createUser route validations and improvements
akiraonstarknet Aug 27, 2024
6ad1cee
fix referral issues
akiraonstarknet Aug 27, 2024
864d367
build fix
akiraonstarknet Aug 28, 2024
2d40bc6
Merge pull request #27 from akiraonstarknet/referral
akiraonstarknet Aug 28, 2024
ee7507f
referral validation fix
akiraonstarknet Aug 28, 2024
9274704
Merge pull request #28 from akiraonstarknet/referral
akiraonstarknet Aug 28, 2024
266f76f
improve referral UX
akiraonstarknet Aug 28, 2024
9895b51
convert 14 days compounding to 7
akiraonstarknet Aug 28, 2024
d70cd93
add ref document
akiraonstarknet Aug 28, 2024
24c668f
Merge pull request #29 from akiraonstarknet/referral
akiraonstarknet Aug 28, 2024
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
Prev Previous commit
Next Next commit
merged
  • Loading branch information
akiraonstarknet committed Aug 27, 2024
commit fb6aaa1489a13f1a24efcd2d4ffaa84113e1ceba
12 changes: 7 additions & 5 deletions src/components/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -24,6 +24,8 @@ import CONSTANTS from '@/constants';
import { getERC20Balance } from '@/store/balance.atoms';
import { addressAtom } from '@/store/claims.atoms';
import { referralCodeAtom } from '@/store/referral.store';
import { MyMenuItemProps, MyMenuListProps, shortAddress, truncate } from '@/utils';
import { useEffect } from 'react';
import { lastWalletAtom } from '@/store/utils.atoms';
import {
generateReferralCode,
@@ -317,20 +319,20 @@ export default function Navbar(props: NavbarProps) {
>
<Center>
{address ? (
<Box display="flex" alignItems="center" gap=".5rem">
<Center display="flex" alignItems="center" gap=".5rem">
<Image
src={starkProfile?.profilePicture}
alt="pfp"
width={30}
height={30}
rounded="full"
/>{' '}
<h3>
<Text as="h3" marginTop={"3px !important"}>
{starkProfile && starkProfile.name
? starkProfile.name
? truncate(starkProfile.name, 6, 6)
: shortAddress(address)}
</h3>
</Box>
</Text>
</Center>
) : (
'Connect'
)}
10 changes: 9 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
@@ -32,7 +32,15 @@ export function capitalize(str: string) {

export function shortAddress(_address: string) {
const x = num.toHex(num.getDecimalString(_address));
return `${x.slice(0, 4)}...${x.slice(x.length - 4, x.length)}`;
return truncate(x, 4, 4);
}

export function truncate(str: string, startChars: number, endChars: number) {
if (str.length <= startChars + endChars) {
return str;
}

return `${str.slice(0, startChars)}...${str.slice(str.length - endChars, str.length)}`;
}

export function standariseAddress(address: string | bigint) {