diff --git a/packages/shared/components/inputs/AssetDropdown.svelte b/packages/shared/components/inputs/AssetDropdown.svelte index 0fb77a4d852..dfbac038f25 100644 --- a/packages/shared/components/inputs/AssetDropdown.svelte +++ b/packages/shared/components/inputs/AssetDropdown.svelte @@ -12,7 +12,7 @@ let assetList: IAsset[] = [] $: isReadonly = readonly || $visibleSelectedAccountAssets?.[$activeProfile?.network?.id]?.nativeTokens.length === 0 - $: $visibleSelectedAccountAssets, (assetList = getAssetList()) + $: $visibleSelectedAccountAssets, (assetList = getAssetList()), updateSelectedAsset() function getAssetList(): IAsset[] { const list = [] @@ -39,6 +39,12 @@ function onOutsideClick(): void { isDropdownOpen = false } + + function updateSelectedAsset(): void { + asset = + assetList.find((a) => a.id === asset?.id) ?? + $visibleSelectedAccountAssets?.[$activeProfile?.network?.id]?.baseCoin + } </script> {#if asset}