Compare commits

...

3 Commits

Author SHA1 Message Date
Jordan Frankfurt
8ace518311 stop destructuring merkle drop response object (#1338)
stop destructuring merkle drop response object

Co-authored-by: Jordan Frankfurt <layup-entropy@protonmail.com>
2021-03-18 11:57:13 -04:00
Jordan Frankfurt
67c776c995 fix(merkle drop): make claim a post request 2021-03-18 01:46:11 -04:00
Rand Seay
719754c46c fix(info link): Update view pair analytics link
fixes #1299
2021-03-16 13:55:38 -05:00
2 changed files with 11 additions and 13 deletions

View File

@@ -105,7 +105,7 @@ export function AdvancedSwapDetails({ trade }: AdvancedSwapDetailsProps) {
{!showRoute && ( {!showRoute && (
<AutoColumn style={{ padding: '12px 16px 0 16px' }}> <AutoColumn style={{ padding: '12px 16px 0 16px' }}>
<InfoLink <InfoLink
href={'https://uniswap.info/pair/' + trade.route.pairs[0].liquidityToken.address} href={'https://info.uniswap.org/pair/' + trade.route.pairs[0].liquidityToken.address}
target="_blank" target="_blank"
> >
View pair analytics View pair analytics

View File

@@ -29,18 +29,16 @@ function fetchClaim(account: string, chainId: ChainId): Promise<UserClaimData |
return (CLAIM_PROMISES[key] = return (CLAIM_PROMISES[key] =
CLAIM_PROMISES[key] ?? CLAIM_PROMISES[key] ??
fetch(`https://gentle-frost-9e74.uniswap.workers.dev/${chainId}/${formatted}`) fetch('https://merkle-drop-1.uniswap.workers.dev/', {
.then(res => { body: JSON.stringify({ chainId, address: formatted }),
if (res.status === 200) { headers: {
return res.json() 'Content-Type': 'application/json',
} else { 'Referrer-Policy': 'no-referrer'
console.debug(`No claim for account ${formatted} on chain ID ${chainId}`) },
return null method: 'POST'
} })
}) .then(res => (res.ok ? res.json() : console.log(`No claim for account ${formatted} on chain ID ${chainId}`)))
.catch(error => { .catch(error => console.error('Failed to get claim data', error)))
console.error('Failed to get claim data', error)
}))
} }
// parse distributorContract blob and detect if user has claim data // parse distributorContract blob and detect if user has claim data