-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2969 from IX-Swap/staging
v1.2.1 Patch: Rainbowkit bug fixes + Jumptask integration
- Loading branch information
Showing
19 changed files
with
187 additions
and
82 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { useDispatch } from 'react-redux' | ||
import axios from 'axios' | ||
import { useJumpTaskState } from 'state/jumpTask/hooks' | ||
import { resetJumpTaskState } from 'state/jumpTask' | ||
|
||
const usePostbackJumpTask = () => { | ||
const dispatch = useDispatch() | ||
const { transactionId, affUnique1 } = useJumpTaskState() | ||
|
||
const callPostbackEndpoint = async () => { | ||
const url = `https://jumptask.go2cloud.org/aff_lsr?transaction_id=${transactionId}&adv_sub=${affUnique1}` | ||
|
||
try { | ||
const { status } = await axios.get(url) | ||
|
||
if (status === 200) { | ||
dispatch(resetJumpTaskState()) | ||
} | ||
} catch (error) { | ||
console.error('Error calling postback endpoint:', error) | ||
} | ||
} | ||
|
||
return { callPostbackEndpoint } | ||
} | ||
|
||
export default usePostbackJumpTask |
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,7 @@ | ||
import { useLocation } from 'react-router-dom'; | ||
|
||
const useQuery = () => { | ||
return new URLSearchParams(useLocation().search); | ||
}; | ||
|
||
export default useQuery; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ import React, { useCallback, FC, useEffect, useState, useMemo } from 'react' | |
import { Trans } from '@lingui/macro' | ||
import { isMobile } from 'react-device-detect' | ||
import { Flex, Text } from 'rebass' | ||
import { Link } from 'react-router-dom' | ||
import { Link, useHistory } from 'react-router-dom' | ||
import dayjs from 'dayjs' | ||
import { useCookies } from 'react-cookie' | ||
import _get from 'lodash/get' | ||
|
@@ -98,6 +98,7 @@ const KYC = () => { | |
const description = useMemo(() => kyc?.message || getStatusDescription(status), [kyc, status]) | ||
const [referralCode, setReferralCode] = useState<string | null>('') | ||
const getMe = useGetMe() | ||
const history = useHistory() | ||
|
||
const supportEmail = _get(config, 'supportEmail', '[email protected]') | ||
|
||
|
@@ -160,7 +161,7 @@ const KYC = () => { | |
sx={{ gap: '1rem', marginTop: '40px' }} | ||
> | ||
<Flex | ||
// onClick={() => openModal('individual')} | ||
onClick={() => history.push(getKYCLink())} | ||
sx={{ | ||
border: '1px solid #E6E6FF', | ||
marginBottom: isMobile ? '32px' : '0px', | ||
|
@@ -183,11 +184,9 @@ const KYC = () => { | |
> | ||
<Trans>Pass KYC as Individual</Trans> | ||
</Text> | ||
<Link style={{ textDecoration: 'none' }} to={getKYCLink()}> | ||
<Text sx={{ marginTop: '12px', fontSize: '13px', fontWeight: '600', color: '#6666FF' }}> | ||
<Trans>Start Now</Trans> | ||
</Text> | ||
</Link> | ||
<Text sx={{ marginTop: '12px', fontSize: '13px', fontWeight: '600', color: '#6666FF' }}> | ||
<Trans>Start Now</Trans> | ||
</Text> | ||
</> | ||
</Flex> | ||
|
||
|
Oops, something went wrong.