diff --git a/src/components/AddressOverview.vue b/src/components/AddressOverview.vue
index c3fe7490..bf1b191d 100644
--- a/src/components/AddressOverview.vue
+++ b/src/components/AddressOverview.vue
@@ -1,7 +1,6 @@
@@ -46,11 +44,6 @@ const systemToken = useChainStore().currentChain.settings.getSystemToken();
width="18"
>
{{ getBalanceDisplay(props.balance.tokenQty, systemToken.symbol) }}
-
diff --git a/src/lib/contract/ContractManager.js b/src/lib/contract/ContractManager.js
index d13508a0..79f70c8b 100644
--- a/src/lib/contract/ContractManager.js
+++ b/src/lib/contract/ContractManager.js
@@ -66,6 +66,8 @@ class AddressCacheManager {
this.contractInfoByNetwork[network][addressLower] = info;
this.saveToLocalStorage();
}
+
+ this.removeNullAddress(address);
}
exists(address) {
@@ -80,7 +82,7 @@ class AddressCacheManager {
return this.contractInfoByNetwork[network] && this.contractInfoByNetwork[network][addressLower];
}
- removeAddress(address) {
+ removeNullAddress(address) {
const addressLower = typeof address === 'string' ? address.toLowerCase() : '';
const network = this.getCurrentNetwork();
if (this.addressesByNetwork[network]) {
@@ -299,10 +301,11 @@ export default class ContractManager {
return;
}
let contract = this.factory.buildContract(contractData);
+
if(
- typeof this.getNetworkContract(index) === 'undefined'
- || contract.abi?.length > 0 && !this.getNetworkContract(index).abi
- || contract.abi?.length > 0 && contract.abi.length > this.getNetworkContract(index).abi?.length
+ !this.getNetworkContract(index) && contract?.name
+ || contract.abi?.length > 0 && !this.getNetworkContract(index)?.abi
+ || contract.abi?.length > 0 && contract.abi.length > (this.getNetworkContract(index)?.abi?.length || 0)
){
this.setNetworkContract(index, contract);
}
@@ -384,10 +387,8 @@ export default class ContractManager {
} else if (this.nullContractsManager.existsContract(addressLower)) {
result = this.nullContractsManager.getContractInfo(addressLower);
} else {
- result = await this.getContract(addressLower);
- if (result) {
- result = this.nullContractsManager.getContractInfo(addressLower);
- }
+ // We are going to always assume that if the address is a contract, it is already in the cache
+ // Because the indexer API should always return all involved contracts in a query response
}
return result;
}