Skip to content

Commit

Permalink
fix: swap identicon
Browse files Browse the repository at this point in the history
  • Loading branch information
kvhnuke committed Sep 28, 2023
1 parent ae67a47 commit 2ce957b
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="send-address-input" :class="{ focus: isFocus }">
<div class="send-address-input__avatar">
<img v-if="isValidAddress" :src="identicon(value)" alt="" />
<img v-if="isValidAddress" :src="identicon(rawAddress)" alt="" />
</div>
<div class="send-address-input__address">
<p>
Expand Down Expand Up @@ -63,6 +63,15 @@ const emit = defineEmits<{
(e: "update:inputAddress", address: string): void;
(e: "toggle:showContacts", show: boolean): void;
}>();
const rawAddress = computed(() => {
let displayAddress: string;
try {
displayAddress = props.displayAddress(props.value);
} catch {
displayAddress = props.value;
}
return displayAddress;
});
const address = computed({
get: () => {
let displayAddress: string;
Expand Down

1 comment on commit 2ce957b

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.