Skip to content

Commit

Permalink
fix(NotificationsManagementNetwork): currentNetworkId by using `NUX…
Browse files Browse the repository at this point in the history
…T_PUBLIC_CHAIN_ID_BY_DEFAULT`

As the `multichain feature` is not implemented yet,
we are using `environment variables` to identify the current network

See: BEDS-898
  • Loading branch information
marcel-bitfly committed Oct 31, 2024
1 parent 966e5f8 commit e726e81
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ const { t: $t } = useTranslation()
const notificationsManagementStore = useNotificationsManagementStore()
const { chainIdByDefault } = useRuntimeConfig().public
const networks = computed(() => notificationsManagementStore.settings.networks ?? [])
const currentNetworkId = computed(() => notificationsManagementStore.settings.networks[0]?.chain_id ?? 0)
const currentNetworkId = computed(
() => notificationsManagementStore.settings.networks
.find(network => network.chain_id === Number(chainIdByDefault)) ?? 1,
)
const currentNetwork = computed(
() => (networks.value.find(network => network.chain_id === currentNetworkId.value)),
Expand Down

0 comments on commit e726e81

Please sign in to comment.