Skip to content

Commit

Permalink
fix: removed unregistered dapps from onchain-data panel (#651)
Browse files Browse the repository at this point in the history
* fix: removed unregistered dapps from onchain-data panel

* refactor: clean up
  • Loading branch information
impelcrypto committed Jan 5, 2023
1 parent 979516a commit d5e3365
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/dapp-staking/my-staking/OnChainData.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
import { useBreakpoints, useNetworkInfo } from 'src/hooks';
import { defineComponent, computed, watchEffect, ref } from 'vue';
import TokenBalance from 'src/components/common/TokenBalance.vue';
import { DappCombinedInfo } from 'src/v2/models';
import { DappCombinedInfo, SmartContractState } from 'src/v2/models';
import { useStore } from 'src/store';
import { paginate } from 'src/hooks/helper/common';
Expand Down Expand Up @@ -196,6 +196,10 @@ export default defineComponent({
if (!dapps.value) return;
const data = dapps.value
.map((it) => {
if (it.contract.state === SmartContractState.Unregistered) {
return undefined;
}
if (it.dapp && it.stakerInfo) {
const balance = getBalance(it);
return {
Expand Down

0 comments on commit d5e3365

Please sign in to comment.