diff --git a/apps/governance/src/i18n/translations/dev.json b/apps/governance/src/i18n/translations/dev.json index e2dfc5a79..66cf0a013 100644 --- a/apps/governance/src/i18n/translations/dev.json +++ b/apps/governance/src/i18n/translations/dev.json @@ -718,6 +718,8 @@ "UpdateAssetProposal": "Update asset proposal", "NewFreeformProposal": "New freeform proposal", "NewRawProposal": "New proposal", + "NewTransferProposal": "New transfer proposal", + "CancelTransferProposal": "Cancel transfer proposal", "MARKET_STATE_UPDATE_TYPE_RESUME": "Resume market", "MARKET_STATE_UPDATE_TYPE_SUSPEND": "Suspend market", "MARKET_STATE_UPDATE_TYPE_TERMINATE": "Terminate market", @@ -738,6 +740,8 @@ "UpdateVolumeDiscountProgram": "Update volume discount program", "NewAsset": "New asset", "UpdateAsset": "Update asset", + "NewTransfer": "New transfer", + "CancelTransfer": "Cancel transfer", "AssetID": "Asset ID", "Freeform": "Freeform", "RawProposal": "Let me choose (raw proposal)", @@ -914,5 +918,31 @@ "EndOfProgramTimestamp": "End of program", "EndOfProgramTimestampDescription": "Time after which when the current epoch ends, the programs will end and benefits will be disabled.", "BenefitTierVolumeDiscountFactor": "Volume discount factor", - "BenefitTierVolumeDiscountFactorDescription": "Discount given to those in this benefit tier" + "BenefitTierVolumeDiscountFactorDescription": "Discount given to those in this benefit tier", + "ACCOUNT_TYPE_INSURANCE": "Insurance account", + "ACCOUNT_TYPE_GLOBAL_INSURANCE": "Global insurance account", + "ACCOUNT_TYPE_SETTLEMENT": "Settlement account", + "ACCOUNT_TYPE_MARGIN": "Margin account ", + "ACCOUNT_TYPE_GENERAL": "General account", + "ACCOUNT_TYPE_FEES_INFRASTRUCTURE": "Infrastructure fees account", + "ACCOUNT_TYPE_FEES_LIQUIDITY": "Liquidity fees account", + "ACCOUNT_TYPE_FEES_MAKER": "Maker fees account", + "ACCOUNT_TYPE_BOND": "Bond account", + "ACCOUNT_TYPE_EXTERNAL": "External account", + "ACCOUNT_TYPE_GLOBAL_REWARD": "Global reward account", + "ACCOUNT_TYPE_PENDING_TRANSFERS": "Pending transfers account", + "ACCOUNT_TYPE_REWARD_MAKER_PAID_FEES": "Maker paid fees reward account", + "ACCOUNT_TYPE_REWARD_MAKER_RECEIVED_FEES": "Maker received fees reward account", + "ACCOUNT_TYPE_REWARD_LP_RECEIVED_FEES": "Liquidity provider received fees reward account", + "ACCOUNT_TYPE_REWARD_MARKET_PROPOSERS": "Market proposers reward account", + "ACCOUNT_TYPE_HOLDING": "Holding account", + "ACCOUNT_TYPE_LP_LIQUIDITY_FEES": "Liquidity provider fees account", + "ACCOUNT_TYPE_NETWORK_TREASURY": "Network treasury account", + "ACCOUNT_TYPE_VESTING_REWARDS": "Vesting rewards account", + "ACCOUNT_TYPE_VESTED_REWARDS": "Vested rewards account", + "ACCOUNT_TYPE_REWARD_AVERAGE_POSITION": "Average position reward account", + "ACCOUNT_TYPE_REWARD_RELATIVE_RETURN": "Relative return reward account", + "ACCOUNT_TYPE_REWARD_RETURN_VOLATILITY": "Return volatility reward account", + "ACCOUNT_TYPE_REWARD_VALIDATOR_RANKING": "Validator ranking reward account", + "ACCOUNT_TYPE_PENDING_FEE_REFERRAL_REWARD": "Pending fee referral reward account" } diff --git a/apps/governance/src/routes/proposals/components/proposal-detail-header/proposal-header.tsx b/apps/governance/src/routes/proposals/components/proposal-detail-header/proposal-header.tsx index 6ed92e8ce..1524edeac 100644 --- a/apps/governance/src/routes/proposals/components/proposal-detail-header/proposal-header.tsx +++ b/apps/governance/src/routes/proposals/components/proposal-detail-header/proposal-header.tsx @@ -263,7 +263,10 @@ const NewTransferSummary = ({ proposalId }: { proposalId?: string | null }) => { return ( {GovernanceTransferKindMapping[details.kind.__typename]}{' '} - {t('transfer from')} {truncateMiddle(details.source)}{' '} + {t('transfer from')}{' '} + + {truncateMiddle(details.source) || t(details.sourceType)} + {' '} {t('to')} {truncateMiddle(details.destination)} ); diff --git a/apps/governance/src/routes/proposals/hooks/use-proposal-network-params.ts b/apps/governance/src/routes/proposals/hooks/use-proposal-network-params.ts index ba559cdb5..424f3a96a 100644 --- a/apps/governance/src/routes/proposals/hooks/use-proposal-network-params.ts +++ b/apps/governance/src/routes/proposals/hooks/use-proposal-network-params.ts @@ -30,6 +30,8 @@ export const useProposalNetworkParams = ({ NetworkParams.governance_proposal_freeform_requiredParticipation, NetworkParams.governance_proposal_VolumeDiscountProgram_requiredMajority, NetworkParams.governance_proposal_VolumeDiscountProgram_requiredParticipation, + NetworkParams.governance_proposal_transfer_requiredParticipation, + NetworkParams.governance_proposal_transfer_requiredMajority, ]); const fallback = { @@ -111,6 +113,14 @@ export const useProposalNetworkParams = ({ params.governance_proposal_VolumeDiscountProgram_requiredParticipation ), }; + case 'NewTransfer': + case 'CancelTransfer': + return { + requiredMajority: params.governance_proposal_transfer_requiredMajority, + requiredParticipation: new BigNumber( + params.governance_proposal_transfer_requiredParticipation + ), + }; default: return fallback; } diff --git a/libs/network-parameters/src/use-network-params.ts b/libs/network-parameters/src/use-network-params.ts index 34ab03ba3..2024c2944 100644 --- a/libs/network-parameters/src/use-network-params.ts +++ b/libs/network-parameters/src/use-network-params.ts @@ -128,6 +128,26 @@ export const NetworkParams = { 'governance_proposal_VolumeDiscountProgram_requiredMajority', governance_proposal_VolumeDiscountProgram_requiredParticipation: 'governance_proposal_VolumeDiscountProgram_requiredParticipation', + governance_proposal_transfer_maxAmount: + 'governance_proposal_transfer_maxAmount', + governance_proposal_transfer_maxClose: + 'governance_proposal_transfer_maxClose', + governance_proposal_transfer_maxEnact: + 'governance_proposal_transfer_maxEnact', + governance_proposal_transfer_maxFraction: + 'governance_proposal_transfer_maxFraction', + governance_proposal_transfer_minClose: + 'governance_proposal_transfer_minClose', + governance_proposal_transfer_minEnact: + 'governance_proposal_transfer_minEnact', + governance_proposal_transfer_minProposerBalance: + 'governance_proposal_transfer_minProposerBalance', + governance_proposal_transfer_minVoterBalance: + 'governance_proposal_transfer_minVoterBalance', + governance_proposal_transfer_requiredMajority: + 'governance_proposal_transfer_requiredMajority', + governance_proposal_transfer_requiredParticipation: + 'governance_proposal_transfer_requiredParticipation', validators_delegation_minAmount: 'validators_delegation_minAmount', spam_protection_minimumWithdrawalQuantumMultiple: 'spam_protection_minimumWithdrawalQuantumMultiple',