Skip to content

Commit

Permalink
chore: Merge last hotfixes into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
agualis committed Jul 21, 2023
2 parents b00e68d + e4a9704 commit 03c90b7
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 17 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@balancer/frontend-v2",
"version": "1.114.31",
"version": "1.114.36",
"engines": {
"node": "=16",
"npm": ">=8"
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
1 change: 1 addition & 0 deletions src/lib/config/gnosis-chain/pools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const pools: Pools = {
'0x388cae2f7d3704c937313d990298ba67d70a3709000200000000000000000026', // 50AGVE-50GNO
'0x4bcf6b48906fa0f68bea1fc255869a41241d4851000200000000000000000021', // 50WXDAI-50MPS
'0x5519e2d8a0af0944ea639c6dbad69a174de3ecf800010000000000000000003b', // 25BAL-25GNO-25bb-WETH-wstETH-25wxDAI
'0xbc130c4989e10941142b34f054eb38d69fdce9df000200000000000000000049', // 20XOC-80USDC
],
},
Factories: {
Expand Down
1 change: 1 addition & 0 deletions src/lib/utils/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ function isUserRejected(error): boolean {
/user disapproved requested methods/,
/canceled/,
/user rejected signing/,
/user cancelled/,
];

return isErrorOfType(error, messages);
Expand Down
37 changes: 24 additions & 13 deletions src/pages/_layouts/PoolLayout.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
<script setup lang="ts">
import FocussedLayout from '@/components/layouts/FocussedLayout.vue';
import DefaultLayout from '@/components/layouts/DefaultLayout.vue';
import { providePoolStaking } from '@/providers/local/pool-staking.provider';
import FocussedLayout from '@/components/layouts/FocussedLayout.vue';
import { createProviderComponent } from '@/providers/createProviderComponent';
import { providePool } from '@/providers/local/pool.provider';
import { providePoolStaking } from '@/providers/local/pool-staking.provider';
import { provideUserTokens } from '@/providers/local/user-tokens.provider';
/**
* STATE
*/
const route = useRoute();
const poolId = (route.params.id as string).toLowerCase();
/**
* We need this explicit PoolProvider wrapper component to refresh the provided pool details when the pool route params change.
* Example:
* If the poolId param changes in the url, then <router-view v-slot="{ Component }" :key="$route.path"> will reload its contents
* because the route key ($route.path) changed.
* That means that PoolProvider wrapper component will be rerendered providing the data for the new pool.
*/
const PoolProvider = createProviderComponent(() => {
const route = useRoute();
const poolId = (route.params.id as string).toLowerCase();
providePool(poolId);
providePoolStaking(poolId);
provideUserTokens();
});
/**
* COMPUTED
Expand All @@ -21,21 +37,16 @@ const isJoinOrExitPath = computed(
const layoutComponent = computed(() =>
isJoinOrExitPath.value ? FocussedLayout : DefaultLayout
);
/**
* PROVIDERS
*/
providePool(poolId);
providePoolStaking(poolId);
provideUserTokens();
</script>

<template>
<component :is="layoutComponent">
<router-view v-slot="{ Component }" :key="$route.path">
<transition appear name="appear">
<component :is="Component" />
</transition>
<PoolProvider>
<transition appear name="appear">
<component :is="Component" />
</transition>
</PoolProvider>
</router-view>
</component>
</template>

1 comment on commit 03c90b7

@vercel
Copy link

@vercel vercel bot commented on 03c90b7 Jul 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.