Skip to content

Commit

Permalink
fix: update app menu when network is added
Browse files Browse the repository at this point in the history
  • Loading branch information
olgakup committed Jan 9, 2025
1 parent 539ee17 commit b074cb3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 6 additions & 1 deletion packages/extension/src/ui/action/views/add-network/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
@update:pin-network="setPinnedNetwork"
@update:test-network-toggle="emit('update:testNetworkToggle')"
/>
<add-custom-network v-else :close="closePopup" :back="toNetworkList" />
<add-custom-network
v-else
:close="closePopup"
:back="toNetworkList"
@update:pin-network="setPinnedNetwork"
/>
</div>
</div>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ const isValid = computed<boolean>(() => {
return true;
});
const emit = defineEmits<{
(e: 'update:pinNetwork', network: string, isPinned: boolean): void;
}>();
const props = defineProps({
close: {
type: Function as PropType<() => void>,
Expand Down Expand Up @@ -259,7 +263,7 @@ const sendAction = async () => {
await customNetworksState.addCustomNetwork(customNetworkOptions);
await networksState.setNetworkStatus(customNetworkOptions.name, true);
emit('update:pinNetwork', customNetworkOptions.name, true);
nameValue.value = '';
symbolValue.value = '';
chainIDValue.value = '';
Expand Down

0 comments on commit b074cb3

Please sign in to comment.