Merge pull request #528 from freak12techno/add-consensus-prefix-to-config

feat: add consensus prefix to config
This commit is contained in:
ping
2024-02-04 12:21:47 +08:00
committed by GitHub
3 changed files with 6 additions and 13 deletions
+1 -3
View File
@@ -13,7 +13,6 @@ import {
consensusPubkeyToHexAddress,
operatorAddressToAccount,
pubKeyToValcons,
valoperToPrefix,
} from '@/libs';
import { PageRequest, type Coin, type Delegation, type PaginatedDelegations, type PaginatedTxs, type Validator } from '@/types';
import PaginationBar from '@/components/PaginationBar.vue';
@@ -127,13 +126,12 @@ onMounted(() => {
identity.value = res.validator?.description?.identity || '';
if (identity.value && !avatars.value[identity.value]) loadAvatar(identity.value);
const prefix = valoperToPrefix(v.value.operator_address) || '<Invalid>';
addresses.value.hex = consensusPubkeyToHexAddress(
v.value.consensus_pubkey
);
addresses.value.valCons = pubKeyToValcons(
v.value.consensus_pubkey,
prefix
blockchain.current.bech32ConsensusPrefix,
);
});
blockchain.rpc