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

feat: add consensus prefix to config
This commit is contained in:
ping authored and GitHub committed 2024-02-04 12:21:47 +08:00
commit 3aec1c5a6e
3 files changed
+6 -13

No files matched your search

+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