mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-06-13 17:01:02 +00:00
Update token symbol from PZKW/PZK to HEZ across all components
Changed all references to the project token from PZKW/PZK to HEZ: - DelegationManager.tsx: Updated token symbol in comments, delegate cards, and user delegations - DelegateProfile.tsx: Updated min/max delegation placeholders and display - ProposalWizard.tsx: Updated budget input placeholder and review display - TreasuryOverview.tsx: Updated treasury balance display - TransactionModal.tsx: Updated send transaction title, description, and amount label - WalletButton.tsx: Updated balance display in button and dropdown All components now consistently use HEZ as the token symbol.
This commit is contained in:
@@ -159,7 +159,7 @@ const DelegateProfile: React.FC = () => {
|
|||||||
<Input
|
<Input
|
||||||
id="minDelegation"
|
id="minDelegation"
|
||||||
type="number"
|
type="number"
|
||||||
placeholder="Min PZK"
|
placeholder="Min HEZ"
|
||||||
value={profileData.minDelegation}
|
value={profileData.minDelegation}
|
||||||
onChange={(e) => setProfileData({...profileData, minDelegation: e.target.value})}
|
onChange={(e) => setProfileData({...profileData, minDelegation: e.target.value})}
|
||||||
/>
|
/>
|
||||||
@@ -169,7 +169,7 @@ const DelegateProfile: React.FC = () => {
|
|||||||
<Input
|
<Input
|
||||||
id="maxDelegation"
|
id="maxDelegation"
|
||||||
type="number"
|
type="number"
|
||||||
placeholder="Max PZK"
|
placeholder="Max HEZ"
|
||||||
value={profileData.maxDelegation}
|
value={profileData.maxDelegation}
|
||||||
onChange={(e) => setProfileData({...profileData, maxDelegation: e.target.value})}
|
onChange={(e) => setProfileData({...profileData, maxDelegation: e.target.value})}
|
||||||
/>
|
/>
|
||||||
@@ -231,7 +231,7 @@ const DelegateProfile: React.FC = () => {
|
|||||||
</Card>
|
</Card>
|
||||||
<Card>
|
<Card>
|
||||||
<CardContent className="p-4">
|
<CardContent className="p-4">
|
||||||
<div className="text-2xl font-bold text-yellow-600">0 PZK</div>
|
<div className="text-2xl font-bold text-yellow-600">0 HEZ</div>
|
||||||
<div className="text-sm text-gray-600">{t('delegation.totalReceived')}</div>
|
<div className="text-sm text-gray-600">{t('delegation.totalReceived')}</div>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
@@ -259,7 +259,7 @@ const DelegateProfile: React.FC = () => {
|
|||||||
<div>
|
<div>
|
||||||
<h4 className="font-semibold mb-2">{t('delegation.delegationLimits')}</h4>
|
<h4 className="font-semibold mb-2">{t('delegation.delegationLimits')}</h4>
|
||||||
<p className="text-gray-700">
|
<p className="text-gray-700">
|
||||||
Min: {profileData.minDelegation} PZK | Max: {profileData.maxDelegation} PZK
|
Min: {profileData.minDelegation} HEZ | Max: {profileData.maxDelegation} HEZ
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ const DelegationManager: React.FC = () => {
|
|||||||
const [delegationAmount, setDelegationAmount] = useState('');
|
const [delegationAmount, setDelegationAmount] = useState('');
|
||||||
const [delegationPeriod, setDelegationPeriod] = useState('3months');
|
const [delegationPeriod, setDelegationPeriod] = useState('3months');
|
||||||
|
|
||||||
// Format token amounts from blockchain units (assuming 12 decimals for PZKW)
|
// Format token amounts from blockchain units (assuming 12 decimals for HEZ)
|
||||||
const formatTokenAmount = (amount: string | number) => {
|
const formatTokenAmount = (amount: string | number) => {
|
||||||
const value = typeof amount === 'string' ? BigInt(amount) : BigInt(amount);
|
const value = typeof amount === 'string' ? BigInt(amount) : BigInt(amount);
|
||||||
return formatNumber(Number(value) / 1e12, 2);
|
return formatNumber(Number(value) / 1e12, 2);
|
||||||
@@ -175,7 +175,7 @@ const DelegationManager: React.FC = () => {
|
|||||||
</span>
|
</span>
|
||||||
<span className="flex items-center gap-1">
|
<span className="flex items-center gap-1">
|
||||||
<Users className="w-3 h-3" />
|
<Users className="w-3 h-3" />
|
||||||
{formatTokenAmount(delegate.totalDelegated)} PZKW delegated
|
{formatTokenAmount(delegate.totalDelegated)} HEZ delegated
|
||||||
</span>
|
</span>
|
||||||
<span className="flex items-center gap-1">
|
<span className="flex items-center gap-1">
|
||||||
<Users className="w-3 h-3" />
|
<Users className="w-3 h-3" />
|
||||||
@@ -209,7 +209,7 @@ const DelegationManager: React.FC = () => {
|
|||||||
<Input
|
<Input
|
||||||
id="amount"
|
id="amount"
|
||||||
type="number"
|
type="number"
|
||||||
placeholder="Enter PZK amount"
|
placeholder="Enter HEZ amount"
|
||||||
value={delegationAmount}
|
value={delegationAmount}
|
||||||
onChange={(e) => setDelegationAmount(e.target.value)}
|
onChange={(e) => setDelegationAmount(e.target.value)}
|
||||||
/>
|
/>
|
||||||
@@ -275,7 +275,7 @@ const DelegationManager: React.FC = () => {
|
|||||||
<h4 className="font-semibold">{delegation.delegate}</h4>
|
<h4 className="font-semibold">{delegation.delegate}</h4>
|
||||||
<p className="text-xs text-gray-500 font-mono mb-2">{delegation.delegateAddress}</p>
|
<p className="text-xs text-gray-500 font-mono mb-2">{delegation.delegateAddress}</p>
|
||||||
<div className="flex items-center gap-3 text-sm text-gray-600 mt-1">
|
<div className="flex items-center gap-3 text-sm text-gray-600 mt-1">
|
||||||
<span>{formatTokenAmount(delegation.amount)} PZKW</span>
|
<span>{formatTokenAmount(delegation.amount)} HEZ</span>
|
||||||
<Badge variant="secondary">Conviction: {delegation.conviction}x</Badge>
|
<Badge variant="secondary">Conviction: {delegation.conviction}x</Badge>
|
||||||
{delegation.category && <Badge variant="secondary">{delegation.category}</Badge>}
|
{delegation.category && <Badge variant="secondary">{delegation.category}</Badge>}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ const ProposalWizard: React.FC<ProposalWizardProps> = ({ onComplete, onCancel })
|
|||||||
type="number"
|
type="number"
|
||||||
value={proposalData.budget}
|
value={proposalData.budget}
|
||||||
onChange={(e) => setProposalData({...proposalData, budget: e.target.value})}
|
onChange={(e) => setProposalData({...proposalData, budget: e.target.value})}
|
||||||
placeholder="Amount in PZK"
|
placeholder="Amount in HEZ"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@@ -308,7 +308,7 @@ const ProposalWizard: React.FC<ProposalWizardProps> = ({ onComplete, onCancel })
|
|||||||
{proposalData.budget && (
|
{proposalData.budget && (
|
||||||
<div>
|
<div>
|
||||||
<span className="font-semibold">{t('proposals.fields.budget')}:</span>
|
<span className="font-semibold">{t('proposals.fields.budget')}:</span>
|
||||||
<p className="text-gray-700">{proposalData.budget} PZK</p>
|
<p className="text-gray-700">{proposalData.budget} HEZ</p>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ export const TreasuryOverview: React.FC = () => {
|
|||||||
Live Blockchain Data
|
Live Blockchain Data
|
||||||
</Badge>
|
</Badge>
|
||||||
<span className="text-sm text-muted-foreground">
|
<span className="text-sm text-muted-foreground">
|
||||||
{proposals.length} active proposals • {metrics.totalBalance.toFixed(2)} PZKW in treasury
|
{proposals.length} active proposals • {metrics.totalBalance.toFixed(2)} HEZ in treasury
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -94,11 +94,11 @@ export const TransactionModal: React.FC<TransactionModalProps> = ({
|
|||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle className="flex items-center gap-2">
|
<DialogTitle className="flex items-center gap-2">
|
||||||
<Send className="h-5 w-5 text-kesk" />
|
<Send className="h-5 w-5 text-kesk" />
|
||||||
{type === 'send' ? 'Send PZK' : type === 'vote' ? 'Cast Vote' : 'Delegate Voting Power'}
|
{type === 'send' ? 'Send HEZ' : type === 'vote' ? 'Cast Vote' : 'Delegate Voting Power'}
|
||||||
</DialogTitle>
|
</DialogTitle>
|
||||||
<DialogDescription>
|
<DialogDescription>
|
||||||
{type === 'send'
|
{type === 'send'
|
||||||
? 'Send PZK tokens to another address'
|
? 'Send HEZ tokens to another address'
|
||||||
: type === 'vote'
|
: type === 'vote'
|
||||||
? 'Submit your vote for the proposal'
|
? 'Submit your vote for the proposal'
|
||||||
: 'Delegate your voting power to another address'}
|
: 'Delegate your voting power to another address'}
|
||||||
@@ -120,7 +120,7 @@ export const TransactionModal: React.FC<TransactionModalProps> = ({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Label htmlFor="amount">Amount (PZK)</Label>
|
<Label htmlFor="amount">Amount (HEZ)</Label>
|
||||||
<Input
|
<Input
|
||||||
id="amount"
|
id="amount"
|
||||||
type="number"
|
type="number"
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export const WalletButton: React.FC = () => {
|
|||||||
<Wallet className="h-4 w-4 text-kesk" />
|
<Wallet className="h-4 w-4 text-kesk" />
|
||||||
<div className="text-left">
|
<div className="text-left">
|
||||||
<div className="text-sm font-medium">{formatAddress(address!)}</div>
|
<div className="text-sm font-medium">{formatAddress(address!)}</div>
|
||||||
<div className="text-xs text-muted-foreground">{formatBalance(balance)} PZK</div>
|
<div className="text-xs text-muted-foreground">{formatBalance(balance)} HEZ</div>
|
||||||
</div>
|
</div>
|
||||||
{!isCorrectNetwork && (
|
{!isCorrectNetwork && (
|
||||||
<Badge variant="destructive" className="ml-2 bg-sor">
|
<Badge variant="destructive" className="ml-2 bg-sor">
|
||||||
@@ -74,7 +74,7 @@ export const WalletButton: React.FC = () => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="px-2 py-1.5">
|
<div className="px-2 py-1.5">
|
||||||
<div className="text-sm text-muted-foreground">Balance</div>
|
<div className="text-sm text-muted-foreground">Balance</div>
|
||||||
<div className="text-sm font-medium">{formatBalance(balance)} PZK</div>
|
<div className="text-sm font-medium">{formatBalance(balance)} HEZ</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="px-2 py-1.5">
|
<div className="px-2 py-1.5">
|
||||||
<div className="text-sm text-muted-foreground">Network</div>
|
<div className="text-sm text-muted-foreground">Network</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user