Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into feat/sepolia
Browse files Browse the repository at this point in the history
  • Loading branch information
timjrobinson committed Jul 25, 2023
2 parents 93167e9 + 5176c7b commit 92a9c6b
Show file tree
Hide file tree
Showing 62 changed files with 1,080 additions and 295 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
minor-wording: ''
major-wording: ''
env:
GITHUB_TOKEN: ${{ secrets.TIM_PAT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BALOPCO_BUMPTAG_PAT }}
- name: Create tag
uses: Klemensas/action-autotag@stable
with:
Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@balancer/frontend-v2",
"version": "1.114.14",
"version": "1.115.3",
"engines": {
"node": "=16",
"npm": ">=8"
Expand Down Expand Up @@ -42,7 +42,7 @@
"devDependencies": {
"@aave/protocol-js": "^4.3.0",
"@balancer-labs/assets": "github:balancer-labs/assets#master",
"@balancer-labs/sdk": "^1.1.3-beta.13",
"@balancer-labs/sdk": "^1.1.3-beta.14",
"@balancer-labs/typechain": "^1.0.0",
"@balancer-labs/v2-deployments": "^3.2.0",
"@cowprotocol/contracts": "^1.3.1",
Expand Down
Binary file modified public/images/gradients/gradient-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions src/assets/data/contracts/avalanche.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"AaveLinearPoolFactory": "0x6caf662b573F577DE01165d2d38D1910bba41F8A",
"Authorizer": "0xA331D84eC860Bf466b4CdCcFb4aC09a1B43F3aE6",
"AuthorizerAdaptor": "0xdAE7e32ADc5d490a43cCba1f0c736033F2b4eFca",
"AuthorizerAdaptorEntrypoint": "0x4E7bBd911cf1EFa442BC1b2e9Ea01ffE785412EC",
"AuthorizerWithAdaptorValidation": "0x8df317a729fcaA260306d7de28888932cb579b88",
"BalancerHelpers": "0x8E9aa87E45e92bad84D5F8DD1bff34Fb92637dE9",
"BalancerQueries": "0xC128468b7Ce63eA702C1f104D55A2566b13D3ABD",
"BalancerRelayer": "0x03F1ab8b19bcE21EB06C364aEc9e40322572a1e9",
"BatchRelayerLibrary": "0x45fFd460cC6642B8D8Fb12373DFd77Ceb0f4932B",
"ChildChainGauge": "0x4b7b369989e613ff2C65768B7Cf930cC927F901E",
"ChildChainGaugeFactory": "0x161f4014C27773840ccb4EC1957113e6DD028846",
"ChildChainGaugeRewardHelper": "0x2E96068b3D5B5BAE3D7515da4A1D2E52d08A2647",
"ChildChainGaugeTokenAdder": "0xf302f9F50958c5593770FDf4d4812309fF77414f",
"ChildChainLiquidityGaugeFactory": "0xb08E16cFc07C684dAA2f93C70323BAdb2A6CBFd2",
"ChildChainStreamer": "0xD7FAD3bd59D6477cbe1BE7f646F7f1BA25b230f8",
"CircuitBreakerLib": "0x9129E834e15eA19b6069e8f08a8EcFc13686B8dC",
"ComposableStablePoolFactory": "0x3B1eb8EB7b43882b385aB30533D9A2BeF9052a98",
"DistributionScheduler": "0xC128a9954e6c874eA3d62ce62B468bA073093F25",
"ERC4626LinearPoolFactory": "0x4507d91Cd2C0D51D9B4F30Bf0B93AFC938A70BA5",
"ExternalWeightedMath": "0xDF9B5B00Ef9bca66e9902Bd813dB14e4343Be025",
"L2BalancerPseudoMinter": "0xEa924b45a3fcDAAdf4E5cFB1665823B8F8F2039B",
"L2LayerZeroBridgeForwarder": "0x4638ab64022927C9bD5947607459D13f57f1551C",
"ManagedPoolAddRemoveTokenLib": "0xAcf05BE5134d64d150d153818F8C67EE36996650",
"ManagedPoolAmmLib": "0xA69E0Ccf150a29369D8Bbc0B3f510849dB7E8EEE",
"ManagedPoolFactory": "0x03F3Fb107e74F2EAC9358862E91ad3c692712054",
"MockAaveLendingPool": "0x57EA28A99394978D060E483477C0Fd9fb9aFa96c",
"MockAaveLinearPool": "0xA826a114B0c7dB4d1FF4a4BE845a78998c64564C",
"MockComposableStablePool": "0xEa4643102dFC03d5e382e7827Bf767f6587E9965",
"MockERC4626LinearPool": "0xEd3E2F496cbCd8e212192fb8D1499842f04A0D19",
"MockERC4626Token": "0x2EbE41E1aa44D61c206A94474932dADC7D3FD9E3",
"MockManagedPool": "0x3Fb81f6FB0dd94c6fC7e138887f1CA4CDB5E2999",
"MockStaticAToken": "0xD8B6b96c88ad626EB6209c4876e3B14f45f8803A",
"MockWeightedPool": "0xb2b5B452d53401391155EA48C4451f6E9b0dD058",
"NoProtocolFeeLiquidityBootstrappingPoolFactory": "0x0F3e0c4218b7b0108a3643cFe9D3ec0d4F57c54e",
"NullVotingEscrow": "0x6B1Da720Be2D11d95177ccFc40A917c2688f396c",
"PoolRecoveryHelper": "0x3b8cA519122CdD8efb272b0D3085453404B25bD0",
"ProtocolFeePercentagesProvider": "0x239e55F427D44C3cc793f49bFB507ebe76638a2b",
"ProtocolFeesCollector": "0xce88686553686DA562CE7Cea497CE749DA109f9F",
"ProtocolFeesWithdrawer": "0x8F42aDBbA1B16EaAE3BB5754915E0D06059aDd75",
"RecoveryModeHelper": "0x300Ab2038EAc391f26D9F895dc61F8F66a548833",
"RewardsOnlyGauge": "0x41B953164995c11C81DA73D212ED8Af25741b7Ac",
"Vault": "0xBA12222222228d8Ba445958a75a0704d566BF2C8",
"VotingEscrowDelegationProxy": "0x0c6052254551EAe3ECac77B01DFcf1025418828f",
"WeightedPoolFactory": "0x230a59F4d9ADc147480f03B0D3fFfeCd56c3289a"
}
4 changes: 4 additions & 0 deletions src/assets/images/icons/networks/avalanche.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/icons/protocols/gyro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export function useChipClasses(props) {
const sizeClasses = () => {
switch (props.size) {
case 'sm':
return 'p-1 text-xs';
return 'px-1 py-1.5 text-xs';
case 'lg':
return 'p-2 text-base';
default:
Expand Down
36 changes: 0 additions & 36 deletions src/components/chips/BoostedChip.vue

This file was deleted.

61 changes: 61 additions & 0 deletions src/components/chips/PoolFeatureChip.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<script lang="ts" setup>
import { Protocol, protocolIconPaths } from '@/composables/useProtocols';
import { PoolFeature } from '@/types/pools';
import { useI18n } from 'vue-i18n';
type Props = {
feature: PoolFeature;
protocols: Protocol[];
};
const props = defineProps<Props>();
const iconURIs = props.protocols.map(protocol => protocolIconPaths[protocol]);
const hasIcons = props.protocols.length > 0;
const width = 20 + (iconURIs.length - 1) * 16;
const { t } = useI18n();
function getFeatureClasses() {
switch (props.feature) {
case PoolFeature.Boosted:
return 'bg-gradient-to-tr from-yellow-500 to-pink-500 text-white';
case PoolFeature.CLP:
return 'bg-gradient-to-tr from-pink-300 to-yellow-200 text-black';
default:
return '';
}
}
function getFeatureLabel(): string {
switch (props.feature) {
case PoolFeature.Boosted:
return t('boosted');
case PoolFeature.CLP:
return 'CLP';
default:
return '';
}
}
</script>

<template>
<div
data-testid="feature-chip"
:class="[
'flex relative items-center py-1 pr-1.5 pl-2 mr-1 max-h-10 rounded',
getFeatureClasses(),
]"
>
<BalAssetSet
v-if="hasIcons"
:logoURIs="iconURIs"
:width="width"
:size="16"
:ringSize="1"
/>
<span class="text-xs font-semibold">{{ getFeatureLabel() }}</span>
</div>
</template>
2 changes: 1 addition & 1 deletion src/components/contextual/pages/claim/LegacyClaims.vue
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ async function claimAvailableRewards() {
});
txListener(tx, {
onTxConfirmed: () => {
onTxConfirmed: async () => {
isClaiming.value = false;
userClaimsQuery.refetch();
},
Expand Down
6 changes: 5 additions & 1 deletion src/components/contextual/pages/pool/PoolContractDetails.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup lang="ts">
import useNumbers from '@/composables/useNumbers';
import { POOLS } from '@/constants/pools';
import { poolMetadata } from '@/lib/config/metadata';
import { shortenLabel } from '@/lib/utils';
Expand All @@ -24,6 +25,7 @@ const props = defineProps<Props>();
*/
const { t } = useI18n();
const { explorerLinks: explorer } = useWeb3();
const { fNum } = useNumbers();
function formSwapFeesHint(owner: string): string {
if (owner === POOLS.ZeroAddress) {
Expand Down Expand Up @@ -77,7 +79,9 @@ const data = computed(() => {
: null,
{
title: t('swapFees'),
value: `${Number(swapFee) * 100}% (${formSwapFeesHint(owner || '')})`,
value: `${fNum(swapFee, { style: 'percent' })} (${formSwapFeesHint(
owner || ''
)})`,
},
{
title: t('poolManager'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { bnum } from '@/lib/utils';
import { Pool } from '@/services/pool/types';
import useWeb3 from '@/services/web3/useWeb3';
import UnlockPreviewModal from '@/components/forms/lock_actions/UnlockForm/components/UnlockPreviewModal/UnlockPreviewModal.vue';
import useNetwork from '@/composables/useNetwork';
type Props = {
pool: Pool;
Expand All @@ -25,6 +26,7 @@ const { balanceFor } = useTokens();
const { totalLockedValue, lock, isLoadingLockInfo, lockPool, lockPoolToken } =
useLock();
const { isWalletReady } = useWeb3();
const { networkSlug } = useNetwork();
/**
* COMPUTED
Expand Down Expand Up @@ -146,7 +148,17 @@ const fiatTotalExpiredLpTokens = computed(() =>
<BalStack horizontal spacing="sm" class="mt-2">
<BalLink
v-if="Number(bptBalance) > 0"
href="/#/get-vebal?returnRoute=vebal"
tag="router-link"
:to="{
name: 'get-vebal',
query: {
returnRoute: $route.name,
returnParams: JSON.stringify({
id: pool.id,
networkSlug,
}),
},
}"
>
<BalBtn
:disabled="Number(bptBalance) === 0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async function handleTransaction(
});
txListener(tx, {
onTxConfirmed: () => {
onTxConfirmed: async () => {
setSyncTxHashes(network, tx.hash);
},
onTxFailed: () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,15 @@ function tokenOptions(address: string): string[] {
: [];
}
/**
* When changing tokens, clear the amount value
*/
function onTokenChange() {
if (isSingleAssetJoin.value && amountsIn.value.length > 0) {
amountsIn.value[0].value = '';
}
}
/**
* CALLBACKS
*/
Expand Down Expand Up @@ -193,6 +202,7 @@ watch(
class="mb-4"
:fixedToken="!isSingleAssetJoin"
:excludedTokens="excludedTokens"
@update:address="onTokenChange"
/>

<MissingPoolTokensAlert
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { useJoinPool } from '@/providers/local/join-pool.provider';
import useNumbers, { FNumFormats } from '@/composables/useNumbers';
import { usePoolStaking } from '@/providers/local/pool-staking.provider';
import useWeb3 from '@/services/web3/useWeb3';
import useNetwork from '@/composables/useNetwork';
/**
* TYPES
Expand Down Expand Up @@ -53,6 +54,7 @@ const {
resetTxState,
approvalActions: joinPoolApprovalActions,
} = useJoinPool();
const { networkSlug } = useNetwork();
const approvalActions = ref(joinPoolApprovalActions.value);
Expand Down Expand Up @@ -143,7 +145,16 @@ onUnmounted(() => {
<BalBtn
v-if="lockablePoolId === pool.id"
tag="router-link"
:to="{ name: 'get-vebal' }"
:to="{
name: 'get-vebal',
query: {
returnRoute: $route.name,
returnParams: JSON.stringify({
id: pool.id,
networkSlug,
}),
},
}"
color="gradient"
block
class="flex mt-2"
Expand Down
Loading

0 comments on commit 92a9c6b

Please sign in to comment.