diff --git a/src/composables/useDisabledJoinPool.spec.ts b/src/composables/useDisabledJoinPool.spec.ts index 432e672ada..9dcbc16f08 100644 --- a/src/composables/useDisabledJoinPool.spec.ts +++ b/src/composables/useDisabledJoinPool.spec.ts @@ -45,7 +45,10 @@ it('disables joins for pools created after timestamp (2023-03-29) with non vette ); }); -it('disables joins for weigthed pools created after timestamp (2023-03-29) that are not in the weighted allow list', async () => { +it('disables joins for weighted pools created after timestamp (2023-03-29) that are not in the weighted allow list', async () => { + const { networkId } = useNetwork(); + networkId.value = 1; + const pool = BoostedPoolMock; pool.createTime = dateToUnixTimestamp('2023-03-30'); //Created after 29 March pool.poolType = PoolType.Weighted; @@ -60,6 +63,22 @@ it('disables joins for weigthed pools created after timestamp (2023-03-29) that ).toBeTrue(); }); +it('allows joins for weighted pools on test networks created after timestamp (2023-03-29) that are not in the weighted allow list', async () => { + const { networkId } = useNetwork(); + networkId.value = 5; + + const pool = BoostedPoolMock; + pool.createTime = dateToUnixTimestamp('2023-03-30'); //Created after 29 March + pool.poolType = PoolType.Weighted; + const { disableJoinsReason } = await mountVettedTokensInPool(pool); + + pool.tokens[0].address = randomAddress(); + + expect( + disableJoinsReason.value.nonAllowedWeightedPoolAfterTimestamp + ).toBeFalse(); +}); + it('does not disables joins for pools created before 29 march', async () => { const pool = BoostedPoolMock; pool.createTime = dateToUnixTimestamp('2023-03-28'); //Created before 29 March diff --git a/src/composables/useNetwork.ts b/src/composables/useNetwork.ts index 2882fc5430..d1e3e18b73 100644 --- a/src/composables/useNetwork.ts +++ b/src/composables/useNetwork.ts @@ -40,8 +40,12 @@ export const isArbitrum = computed(() => networkId.value === Network.ARBITRUM); export const isGnosis = computed(() => networkId.value === Network.GNOSIS); export const isGoerli = computed(() => networkId.value === Network.GOERLI); -export const hasBridge = computed(() => !!networkConfig.bridgeUrl); -export const isTestnet = computed(() => !!networkConfig.testNetwork); +export const hasBridge = computed( + () => !!config[networkId.value].bridgeUrl +); +export const isTestnet = computed( + () => !!config[networkId.value].testNetwork +); export const isEIP1559SupportedNetwork = computed( () => configService.network.supportsEIP1559