Skip to content

Commit

Permalink
fix: Only set single asset exit default to wrapped if swaps possible …
Browse files Browse the repository at this point in the history
…(dm) (#3805)

* fix: Exact out handler (#3793)

* fix: Don't use swap exit if 1st level pool token

* fix: buildExitExactTokensOut needs to have the bpt removed from tokenslist

* 1.115.1

* Feat: Avalanche Support (#3487)

* Feat: Avalanche Support

* Add Initial contract addresses and settings for Avalanche

* Add subgraphs and token addresses

* Use a different public RPC. Add multicall address

* Fix websocket URL, wallet enum and allowlist pools I created

* Add trust wallet network for gauges and icons

* Add avalanche network icon

* Use new BAL token

* Hide Avalanche in UI

* whitelist initial boosted pools

* Add pool factories. Remove pool with old BAL token from allowlist

* Load ComposableStable and FX pool types

* Add gyro to included pool types

* Fix pools protocol features after refactor

---------

Co-authored-by: ZeKraken <[email protected]>
Co-authored-by: Alberto Gualis <[email protected]>

* 1.115.2

* fix: Catch metadata error setting (#3794)

* 1.115.3

* Update SDK

* 1.115.4

* fix: Selected token in add liquidity form (#3788)

* 1.115.5

* update weekly gauges and whitelist for migration (#3796)

* 1.115.6

* Update `pools.ts` (#3786)

Co-authored-by: Gareth Fuller <[email protected]>

* 1.115.7

* fix: Wait for approvals in lock actions (#3802)

* 1.115.8

* fix: Only set single asset exit default to wrapped if swaps possible

---------

Co-authored-by: Alberto Gualis <[email protected]>
Co-authored-by: Automated Version Bump <[email protected]>
Co-authored-by: Tim Robinson <[email protected]>
Co-authored-by: ZeKraken <[email protected]>
Co-authored-by: Tim Robinson <[email protected]>
Co-authored-by: Max Korolev <[email protected]>
  • Loading branch information
7 people authored and joehquak committed Jul 30, 2023
1 parent 0e12f6d commit b3cbe93
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 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.112.3",
"version": "1.115.8",
"engines": {
"node": "=16",
"npm": ">=8"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const emit = defineEmits<{
/**
* STATE
*/
const isLoadingApprovals = ref(true);
const lockActionStates = reactive<LockActionState[]>(
props.lockType.map(() => ({
init: false,
Expand Down Expand Up @@ -213,6 +214,7 @@ onBeforeMount(async () => {
actionType: ApprovalAction.Locking,
});
actions.value.unshift(...approvalActions);
isLoadingApprovals.value = false;
});
</script>

Expand All @@ -221,6 +223,7 @@ onBeforeMount(async () => {
<BalActionSteps
v-if="!lockActionStatesConfirmed"
:actions="actions"
:isLoading="isLoadingApprovals"
primaryActionType="extendLock"
/>
<template v-else>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const {
hasAmountsOut,
validAmounts,
hasBpt,
shouldUseSwapExit,
} = useExitPool();
const { isWrappedNativeAssetPool } = usePoolHelpers(pool);
Expand Down Expand Up @@ -97,7 +98,7 @@ onBeforeMount(() => {
if (!hasBpt.value)
router.push({ name: 'pool', params: { networkSlug, id: props.pool.id } });
singleAmountOut.address = isPreMintedBptType(pool.value.poolType)
singleAmountOut.address = shouldUseSwapExit.value
? wrappedNativeAsset.value.address
: pool.value.tokensList[0];
});
Expand Down
1 change: 1 addition & 0 deletions src/providers/local/exit-pool.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,7 @@ export const exitPoolProvider = (
isTxPayloadReady,
relayerSignature,
relayerApprovalTx,
shouldUseSwapExit,

// methods
setIsSingleAssetExit,
Expand Down

0 comments on commit b3cbe93

Please sign in to comment.