diff --git a/src/components/cards/SwapCard/SwapCard.vue b/src/components/cards/SwapCard/SwapCard.vue index c17854994..1047b1da4 100644 --- a/src/components/cards/SwapCard/SwapCard.vue +++ b/src/components/cards/SwapCard/SwapCard.vue @@ -233,7 +233,6 @@ export default defineComponent({ tokenOutAddress, tokenOutAmount ); - console.log(swapping); const { errorMessage } = useValidation( tokenInAddress, tokenInAmount, diff --git a/src/components/contextual/pages/pool/PoolStatCards.vue b/src/components/contextual/pages/pool/PoolStatCards.vue index 29c52206e..50910ff1b 100644 --- a/src/components/contextual/pages/pool/PoolStatCards.vue +++ b/src/components/contextual/pages/pool/PoolStatCards.vue @@ -70,7 +70,6 @@ const aprLabel = computed((): string => { ) { const newApr = { ...poolAPRs }; if (newApr && newApr.min && newApr.max) { - console.log('newApr', newApr); newApr.min = newApr.swapFees || 0; newApr.max = newApr.swapFees || 0; return totalAprLabel(newApr as AprBreakdown, props.pool?.boost); diff --git a/src/components/contextual/pages/pool/add-liquidity/Page.vue b/src/components/contextual/pages/pool/add-liquidity/Page.vue index d53a5ae28..d5bae30e8 100644 --- a/src/components/contextual/pages/pool/add-liquidity/Page.vue +++ b/src/components/contextual/pages/pool/add-liquidity/Page.vue @@ -20,7 +20,6 @@ const props = defineProps(); const pool = toRef(props, 'pool'); -console.log(pool); /** * PROVIDERS */ diff --git a/src/components/contextual/pages/pool/staking/StakingIncentivesCard.vue b/src/components/contextual/pages/pool/staking/StakingIncentivesCard.vue index 2483665e8..79f2a62e6 100644 --- a/src/components/contextual/pages/pool/staking/StakingIncentivesCard.vue +++ b/src/components/contextual/pages/pool/staking/StakingIncentivesCard.vue @@ -76,8 +76,6 @@ const stakedPctOfShares = computed(() => { .toString(); }); -console.log('stakedPctOfShares', stakedPctOfShares.value); - const isStakeDisabled = computed(() => { return ( !!deprecatedDetails(props.pool.id) || diff --git a/src/components/forms/pool_actions/AddLiquidityForm/AddLiquidityForm.vue b/src/components/forms/pool_actions/AddLiquidityForm/AddLiquidityForm.vue index 92d2f154c..c7da8d0be 100644 --- a/src/components/forms/pool_actions/AddLiquidityForm/AddLiquidityForm.vue +++ b/src/components/forms/pool_actions/AddLiquidityForm/AddLiquidityForm.vue @@ -95,8 +95,6 @@ const joinTokensWithBalance = computed(() => }) ); -console.log('joinTokensWithBalance', joinTokensWithBalance.value); - const joinTokensWithoutBalance = computed(() => poolJoinTokens.value.filter( address => !includesAddress(tokensWithBalance.value, address) diff --git a/src/components/modals/SelectTokenModal/SelectTokenModal.vue b/src/components/modals/SelectTokenModal/SelectTokenModal.vue index 7c52d60cd..4fb1a7efa 100644 --- a/src/components/modals/SelectTokenModal/SelectTokenModal.vue +++ b/src/components/modals/SelectTokenModal/SelectTokenModal.vue @@ -95,7 +95,6 @@ const excludedTokens = computed(() => [ ]); const focussedTokenAddress = computed((): string => { - console.log(state.results, state.focussedToken); const key = Object.keys(tokens.value)[state.focussedToken]; return tokens.value[key].address; }); diff --git a/src/components/navs/AppNav/AppNavSettings.vue b/src/components/navs/AppNav/AppNavSettings.vue index bf23bf294..b96f668b4 100644 --- a/src/components/navs/AppNav/AppNavSettings.vue +++ b/src/components/navs/AppNav/AppNavSettings.vue @@ -96,7 +96,13 @@ function copyAddress() {
- + +
(); -console.log('isVeBalSupported', isVeBalSupported); const navLinks = [ { label: t('pool'), path: `/${networkSlug}`, goal: Goals.ClickNavPools }, { label: t('swap'), path: `/${networkSlug}/swap`, goal: Goals.ClickNavSwap }, diff --git a/src/components/tooltips/APRTooltip/APRTooltip.vue b/src/components/tooltips/APRTooltip/APRTooltip.vue index 35f646484..4b13a6241 100644 --- a/src/components/tooltips/APRTooltip/APRTooltip.vue +++ b/src/components/tooltips/APRTooltip/APRTooltip.vue @@ -67,7 +67,6 @@ const totalLabel = computed((): string => { ) { const newApr = { ...apr.value }; if (newApr && newApr.min && newApr.max) { - console.log('newApr', newApr); newApr.min = newApr.swapFees || 0; newApr.max = newApr.swapFees || 0; return totalAprLabel(newApr as AprBreakdown, props.pool.boost); diff --git a/src/composables/queries/useTokenPricesQuery.ts b/src/composables/queries/useTokenPricesQuery.ts index 7e706013e..46698911c 100644 --- a/src/composables/queries/useTokenPricesQuery.ts +++ b/src/composables/queries/useTokenPricesQuery.ts @@ -46,13 +46,11 @@ export default function useTokenPricesQuery( const api = getApi(); const queryFn = async () => { - console.log('API: ', api); if (api) { // const { prices } = await api.GetCurrentTokenPrices(); let pricesMap = {}; // priceArrayToMap(prices); pricesMap = injectCustomTokens({}, pricesToInject.value); - console.log('pricesMap: ', pricesMap); // console.log('Fetching', Object.values(prices).length, 'prices'); return pricesMap; diff --git a/src/composables/queries/useVotingPoolsQuery.ts b/src/composables/queries/useVotingPoolsQuery.ts index 673c8dcf4..7d00a5f24 100644 --- a/src/composables/queries/useVotingPoolsQuery.ts +++ b/src/composables/queries/useVotingPoolsQuery.ts @@ -55,7 +55,6 @@ export default function useVotingPoolsQuery( const queryFn = async (): Promise => { try { let apiVotingPools: ApiVotingPools; - console.log(isMeter.value); if (isTestnet.value) { apiVotingPools = testnetVotingPools('GOERLI'); } else if (isMainnet.value) { @@ -64,12 +63,9 @@ export default function useVotingPoolsQuery( apiVotingPools = meterVotingPools('meter'); } else { const api = getApi(); - console.log(api); const { veBalGetVotingList } = await api.VeBalGetVotingList(); - console.log(veBalGetVotingList); apiVotingPools = veBalGetVotingList; } - console.log(apiVotingPools); const batchSize = 5; const gaugeControllerDecorator = new GaugeControllerDecorator(); diff --git a/src/composables/swap/useSwapping.ts b/src/composables/swap/useSwapping.ts index 41e384113..c27d3bc47 100644 --- a/src/composables/swap/useSwapping.ts +++ b/src/composables/swap/useSwapping.ts @@ -103,7 +103,6 @@ export default function useSwapping( ); const swapRoute = computed(() => { - console.log(wrapType.value); if (wrapType.value !== WrapType.NonWrap) { return 'wrapUnwrap'; } else if (isNativeAssetSwap.value) { diff --git a/src/pages/index.vue b/src/pages/index.vue index de15bc4f2..3fede9134 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -175,7 +175,6 @@ onBeforeMount(async () => { : undefined; symmPrice.value = injectedPriceFor(symm); - console.log(symmPrice.value); rewardPrice.value = reward ? injectedPriceFor(reward) : 0; } const tvl = await fetchTVL(); diff --git a/src/pages/pool/_id.vue b/src/pages/pool/_id.vue index 28599bf87..32627dbd4 100644 --- a/src/pages/pool/_id.vue +++ b/src/pages/pool/_id.vue @@ -55,7 +55,6 @@ const { prices, priceQueryLoading } = useTokens(); const { isWalletReady } = useWeb3(); const _isVeBalPool = isVeBalPool(poolId); const { pool, isLoadingPool } = usePool(); -console.log('pool', pool); const { isStableLikePool, isLiquidityBootstrappingPool, diff --git a/src/plugins/router/nav-guards.ts b/src/plugins/router/nav-guards.ts index f57b9829b..21b69986f 100644 --- a/src/plugins/router/nav-guards.ts +++ b/src/plugins/router/nav-guards.ts @@ -81,7 +81,6 @@ function applyNetworkSubdomainRedirect(router: Router): Router { */ function applyNetworkPathRedirects(router: Router): Router { router.beforeEach((to, from, next) => { - console.log(to); if (redirecting.value) { next(); } else { diff --git a/src/providers/local/exit-pool.provider.ts b/src/providers/local/exit-pool.provider.ts index 1fdddbefd..1aaf86d9a 100644 --- a/src/providers/local/exit-pool.provider.ts +++ b/src/providers/local/exit-pool.provider.ts @@ -372,7 +372,6 @@ export const exitPoolProvider = ( exitPoolService.setExitHandler(exitHandlerType.value); - console.log('exitHandler:', exitHandlerType.value); try { await nextTick(); const output = await exitPoolService.queryExit({ @@ -423,7 +422,6 @@ export const exitPoolProvider = ( exitPoolService.setExitHandler(singleAssetMaxedExitHandler); - console.log('exitHandler:', exitHandlerType.value); try { await nextTick(); const output = await exitPoolService.queryExit({ @@ -458,7 +456,6 @@ export const exitPoolProvider = ( txError.value = ''; exitPoolService.setExitHandler(exitHandlerType.value); - console.log('exitHandler:', exitHandlerType.value); return exitPoolService.exit({ exitType: exitType.value, bptIn: _bptIn.value, diff --git a/src/providers/local/join-pool.provider.ts b/src/providers/local/join-pool.provider.ts index 1ce34e078..3f9deddcc 100644 --- a/src/providers/local/join-pool.provider.ts +++ b/src/providers/local/join-pool.provider.ts @@ -308,7 +308,6 @@ export const joinPoolProvider = ( joinPoolService.setJoinHandler(joinHandlerType.value); await setApprovalActions(); - console.log('joinHandler:', joinHandlerType.value); if (!validateAmountsIn()) return null; const output = await joinPoolService.queryJoin({ amountsIn: amountsInWithValue.value, @@ -319,7 +318,6 @@ export const joinPoolProvider = ( approvalActions: approvalActions.value, transactionDeadline: transactionDeadline.value, }); - console.log('to: ', output); bptOut.value = output.bptOut; priceImpact.value = output.priceImpact; @@ -340,7 +338,6 @@ export const joinPoolProvider = ( joinPoolService.setJoinHandler(joinHandlerType.value); await setApprovalActions(); - console.log('joinHandler:', joinHandlerType.value); const joinRes = await joinPoolService.join({ amountsIn: amountsInWithValue.value, tokensIn: tokensIn.value, diff --git a/src/providers/local/pool-staking.provider.ts b/src/providers/local/pool-staking.provider.ts index 778fadf6b..f963cb990 100644 --- a/src/providers/local/pool-staking.provider.ts +++ b/src/providers/local/pool-staking.provider.ts @@ -85,8 +85,6 @@ export const poolStakingProvider = (_poolId?: string) => { return poolGauges.value?.liquidityGauges?.[0]?.totalSupply || '0'; }); - console.log('gaugeTotalSupply', gaugeTotalSupply.value); - // User's staked shares for pool (onchain data). const stakedShares = computed((): string => { if (!poolId.value) return '0'; diff --git a/src/providers/tokens.provider.ts b/src/providers/tokens.provider.ts index fc8253a2f..6beedabeb 100644 --- a/src/providers/tokens.provider.ts +++ b/src/providers/tokens.provider.ts @@ -430,7 +430,6 @@ export const tokensProvider = ( */ function injectedPriceFor(address: string): number { try { - console.log(state.injectedPrices); const price = state.injectedPrices[address]; // const price = selectByAddressFast(prices.value, getAddress(address)); if (!price) { return 0; @@ -518,7 +517,6 @@ export const tokensProvider = ( * Returns true if the token is the native asset or wrapped native asset */ function isWethOrEth(tokenAddress: string): boolean { - console.log(wrappedNativeAsset.value); if (!nativeAsset || !nativeAsset.address || !wrappedNativeAsset.value) return false; return ( diff --git a/src/services/balancer/gauges/gauge-controller.decorator.ts b/src/services/balancer/gauges/gauge-controller.decorator.ts index 70cfc395b..bcb78b52d 100644 --- a/src/services/balancer/gauges/gauge-controller.decorator.ts +++ b/src/services/balancer/gauges/gauge-controller.decorator.ts @@ -114,7 +114,6 @@ export class GaugeControllerDecorator { * @summary Fetch total points allocated towards each gauge for this period */ private callGaugeWeightThisPeriod(votingGauges: ApiVotingGauge[]) { - console.log(votingGauges); let thisWeekTimestamp = toUnixTimestamp( Math.floor(Date.now() / oneWeekInMs) * oneWeekInMs ); @@ -134,7 +133,6 @@ export class GaugeControllerDecorator { // ); // }); // } - console.log(thisWeekTimestamp); return votingGauges.forEach(gauge => { this.multicaller.call( `gauges.${gauge.address}.gaugeWeightThisPeriod`, diff --git a/src/services/balancer/gauges/gauges.decorator.ts b/src/services/balancer/gauges/gauges.decorator.ts index b0fe623d5..20a6a7d94 100644 --- a/src/services/balancer/gauges/gauges.decorator.ts +++ b/src/services/balancer/gauges/gauges.decorator.ts @@ -141,7 +141,6 @@ export class GaugesDecorator { return; gaugesDataMap[gauge.id].rewardTokens.forEach(rewardToken => { - console.log('called'); if (rewardToken === AddressZero) return; const params = shouldUseRewardHelper diff --git a/src/services/balancer/subgraph/subgraph-fallback.service.ts b/src/services/balancer/subgraph/subgraph-fallback.service.ts index fae2355d7..01e6fbb84 100644 --- a/src/services/balancer/subgraph/subgraph-fallback.service.ts +++ b/src/services/balancer/subgraph/subgraph-fallback.service.ts @@ -23,7 +23,6 @@ export class SubgraphFallbackService { } try { const response = await axios.post(this.url.value, payload); - console.log(response); const errorMessage = response?.data.errors?.message; if (errorMessage) { throw new Error(errorMessage); diff --git a/src/services/web3/tekika-avatars.ts b/src/services/web3/tekika-avatars.ts new file mode 100644 index 000000000..ca04f380f --- /dev/null +++ b/src/services/web3/tekika-avatars.ts @@ -0,0 +1,24 @@ +import { ethers } from 'ethers'; + +const nftABI = [ + 'function tokenURI(uint256 _tokenId) public view returns (string memory)', + 'function tokenOfOwnerByIndex(address _owner, uint256 _index) public view returns (uint256)', +]; + +const nftAddress = '0x5c00D81F7E00188751258a0DA0dd8198681D1fFA'; + +export const resolveTekikaAvatar = async ( + provider: ethers.providers.JsonRpcProvider, + address: string +) => { + const contract = new ethers.Contract(nftAddress, nftABI, provider); + + let avatar = ''; + try { + const tokenId = await contract.tokenOfOwnerByIndex(address, 0); + avatar = `https://tekika-nfts.s3.amazonaws.com/tokens/${tokenId}/${tokenId}.webp`; + } catch (error) { + console.log('No Tekika found :('); + } + return avatar; +}; diff --git a/src/services/web3/wallet.service.ts b/src/services/web3/wallet.service.ts index b0d4ee949..1e2505e43 100644 --- a/src/services/web3/wallet.service.ts +++ b/src/services/web3/wallet.service.ts @@ -9,6 +9,7 @@ import { import { TransactionBuilder } from './transactions/transaction.builder'; import { WalletProvider } from '@/dependencies/wallets/Web3Provider'; import { Network } from '@/lib/config/types'; +import { resolveTekikaAvatar } from './tekika-avatars'; interface Web3Profile { ens: string | null; @@ -54,11 +55,20 @@ export default class WalletService { } } + async getTekikaAvatar(address: string): Promise { + try { + return await resolveTekikaAvatar(this.ensProvider, address); + } catch (error) { + return null; + } + } + async getProfile(address: string): Promise { + console.log('getProfile', address); try { return { - ens: await this.getEnsName(address), - avatar: await this.getEnsAvatar(address), + ens: null, + avatar: await this.getTekikaAvatar(address), }; } catch (error) { console.error('Failed to fetch ENS data', error);