Skip to content

Commit

Permalink
fix: if a single token is supported, automatically select it
Browse files Browse the repository at this point in the history
It covers cases such as bitcoin so that the user
doesn't have to perform an extra action to select
the only supported token
  • Loading branch information
kelsos committed Nov 28, 2024
1 parent d47b74c commit c1bf514
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/checkout/pay/CryptoAssetSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ const hint = computed(() => {
return `${t('home.plans.tiers.step_3.labels.token_contract')} ${address}`;
});
watch(tokenItems, (tokens) => {
if (tokens.length === 1) {
set(modelValue, tokens[0].id);
}
});
</script>

<template>
Expand Down

0 comments on commit c1bf514

Please sign in to comment.