pass token address as a param in fetch token function

This commit is contained in:
Mikhail Mikheev 2019-04-23 13:54:10 +04:00
parent 39ccb7b288
commit 4b1a0f785d
1 changed files with 7 additions and 3 deletions

View File

@ -4,9 +4,13 @@ import { getRelayUrl } from '~/config/index'
const fetchToken = (tokenAddress: string) => {
const apiUrl = getRelayUrl()
const url = `${apiUrl}/tokens/${tokenAddress}`
const url = `${apiUrl}/tokens/`
return axios.get(url)
return axios.get(url, {
params: {
address: tokenAddress,
},
})
}
export default fetchToken
export default fetchToken