Skip to content

Commit

Permalink
bugfix: load initial states
Browse files Browse the repository at this point in the history
  • Loading branch information
juliopavila committed Nov 20, 2023
1 parent 317b972 commit 17dac92
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/plugins/safeSnap/components/Form/ContractInteraction.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ export default {
},
methods: {
decodeTransaction(modelValue) {
if (!modelValue) return;
const to = modelValue.to || '';
const value = modelValue.value || '0';
const abi = modelValue.abi || [];
Expand Down
8 changes: 5 additions & 3 deletions src/plugins/safeSnap/components/Form/TransferFunds.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ export default {
},
computed: {
selectedToken() {
return this.tokens.find(token => token.address === this.tokenAddress);
return (
this.tokens.find(token => token.address === this.tokenAddress) || {}
);
}
},
watch: {
Expand Down Expand Up @@ -107,7 +109,7 @@ export default {
this.$emit('update:modelValue', undefined);
},
setTokens() {
if (!this.config.preview && this.config.tokens) {
if (this.config.tokens) {
this.tokens = [
getNativeAsset(this.config.network),
...this.config.tokens
Expand All @@ -133,7 +135,7 @@ export default {

<template>
<div v-if="isDetails" class="flex flex-col space-y-2 px-3">
<div class="flex space-x-2">
<div v-if="selectedToken && selectedToken.address" class="flex space-x-2">
<span class="text-skin-text">{{ $t('safeSnap.asset') }}</span>
<AvatarToken
:address="
Expand Down

0 comments on commit 17dac92

Please sign in to comment.