feat(explorer): change party to pubkey (#2868)

This commit is contained in:
Edd 2023-02-07 18:00:26 +00:00 committed by GitHub
parent 103e503a47
commit 31d9b023e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 11 deletions

View File

@ -6,7 +6,7 @@ NX_VEGA_DOCS_URL=https://docs.vega.xyz/testnet
NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8
NX_ETHERSCAN_URL=https://sepolia.etherscan.io NX_ETHERSCAN_URL=https://sepolia.etherscan.io
NX_VEGA_NETWORKS={\"MAINNET"\:\"https://explorer.vega.xyz"\,\"TESTNET\":\"https://explorer.fairground.wtf\"} NX_VEGA_NETWORKS={\"MAINNET"\:\"https://explorer.vega.xyz"\,\"TESTNET\":\"https://explorer.fairground.wtf\"}
NX_TENDERMINT_URL=https://tm.n01.sandbox.vega.xyz NX_TENDERMINT_URL=https://tm.sandbox.vega.xyz
NX_TENDERMINT_WEBSOCKET_URL=wss://tm.n01.sandbox.vega.xyz/websocket NX_TENDERMINT_WEBSOCKET_URL=wss://tm.sandbox.vega.xyz/websocket
NX_ETHERSCAN_URL=https://sepolia.etherscan.io NX_ETHERSCAN_URL=https://sepolia.etherscan.io
NX_VEGA_GOVERNANCE_URL=https://sandbox.token.vega.xyz NX_VEGA_GOVERNANCE_URL=https://sandbox.token.vega.xyz

View File

@ -66,7 +66,9 @@ export const Search = () => {
className="text-white" className="text-white"
hasError={Boolean(error?.message)} hasError={Boolean(error?.message)}
type="text" type="text"
placeholder={t('Enter block number, party id or transaction hash')} placeholder={t(
'Enter block number, public key or transaction hash'
)}
/> />
{error?.message && ( {error?.message && (
<div className="bg-white border border-t-0 border-accent absolute top-[100%] flex-1 w-full pb-2 px-2 rounded-b text-black"> <div className="bg-white border border-t-0 border-accent absolute top-[100%] flex-1 w-full pb-2 px-2 rounded-b text-black">

View File

@ -10,7 +10,7 @@ import { useDocumentTitle } from '../../../hooks/use-document-title';
export const JumpToParty = () => { export const JumpToParty = () => {
const navigate = useNavigate(); const navigate = useNavigate();
useDocumentTitle(['Parties']); useDocumentTitle(['Public keys']);
const handleSubmit = (e: React.SyntheticEvent) => { const handleSubmit = (e: React.SyntheticEvent) => {
e.preventDefault(); e.preventDefault();
@ -27,8 +27,8 @@ export const JumpToParty = () => {
}; };
return ( return (
<JumpTo <JumpTo
label={t('Go to party')} label={t('Go to public key')}
placeholder={t('Party id')} placeholder={t('Public key')}
inputId="party-input" inputId="party-input"
inputType="text" inputType="text"
inputName="partyId" inputName="partyId"
@ -40,7 +40,7 @@ export const JumpToParty = () => {
const Parties = () => { const Parties = () => {
return ( return (
<section> <section>
<RouteTitle data-testid="parties-header">{t('Parties')}</RouteTitle> <RouteTitle data-testid="parties-header">{t('Public keys')}</RouteTitle>
<JumpToParty /> <JumpToParty />
</section> </section>
); );

View File

@ -14,7 +14,7 @@ type PartyIdErrorProps = {
const PartyIdError = ({ id, error }: PartyIdErrorProps) => { const PartyIdError = ({ id, error }: PartyIdErrorProps) => {
const end = isValidPartyId(id) const end = isValidPartyId(id)
? t('No accounts or transactions found for: ') ? t('No accounts or transactions found for: ')
: 'Invalid party id: '; : 'Invalid public key: ';
return ( return (
<section> <section>
<p> <p>

View File

@ -16,7 +16,7 @@ import { PartyAccounts } from './components/party-accounts';
const Party = () => { const Party = () => {
const { party } = useParams<{ party: string }>(); const { party } = useParams<{ party: string }>();
useDocumentTitle(['Parties', party || '-']); useDocumentTitle(['Public keys', party || '-']);
const partyId = toNonHex(party ? party : ''); const partyId = toNonHex(party ? party : '');
const { isMobile } = useScreenDimensions(); const { isMobile } = useScreenDimensions();
const visibleChars = useMemo(() => (isMobile ? 10 : 14), [isMobile]); const visibleChars = useMemo(() => (isMobile ? 10 : 14), [isMobile]);
@ -44,7 +44,7 @@ const Party = () => {
/> />
) : ( ) : (
<Panel> <Panel>
<p>No party found for key {party}</p> <p>No data found for public key {party}</p>
</Panel> </Panel>
); );
@ -71,7 +71,7 @@ const Party = () => {
className="font-alpha uppercase font-xl mb-4 text-zinc-800 dark:text-zinc-200" className="font-alpha uppercase font-xl mb-4 text-zinc-800 dark:text-zinc-200"
data-testid="parties-header" data-testid="parties-header"
> >
{t('Party')} {t('Public key')}
</h1> </h1>
{partyRes.data ? ( {partyRes.data ? (
<> <>