From 55e0c50776210315cd1e2306aaaab8b75f91a397 Mon Sep 17 00:00:00 2001 From: lukaw3d <3758846+lukaw3d@users.noreply.github.com> Date: Mon, 17 Jun 2024 00:22:11 +0000 Subject: [PATCH 1/2] Update API bindings --- src/oasis-nexus/generated/api.ts | 72 ++++++++++++++++++-------------- 1 file changed, 41 insertions(+), 31 deletions(-) diff --git a/src/oasis-nexus/generated/api.ts b/src/oasis-nexus/generated/api.ts index 77cfeed36..965ba14e8 100644 --- a/src/oasis-nexus/generated/api.ts +++ b/src/oasis-nexus/generated/api.ts @@ -1067,7 +1067,7 @@ This spec does not encode the many possible types; instead, see [the Go API](htt This object will conform to one of the `*Event` types two levels down the hierarchy (e.g. `MintEvent` from `accounts > Event > MintEvent`), OR `evm > Event`. For object fields that specify an oasis-style address, Nexus -will add a field specifying the corresponding Ethereum address, if known. Currently, +will add a field specifying the corresponding Ethereum address, if known. Currently, the only such possible fields are `from_eth`, `to_eth`, and `owner_eth`. */ @@ -1082,7 +1082,7 @@ This spec does not encode the many possible types; instead, see [the Go API](htt This object will conform to one of the `*Event` types two levels down the hierarchy (e.g. `MintEvent` from `accounts > Event > MintEvent`), OR `evm > Event`. For object fields that specify an oasis-style address, Nexus -will add a field specifying the corresponding Ethereum address, if known. Currently, +will add a field specifying the corresponding Ethereum address, if known. Currently, the only such possible fields are `from_eth`, `to_eth`, and `owner_eth`. */ body: RuntimeEventBody; @@ -1090,8 +1090,8 @@ the only such possible fields are `from_eth`, `to_eth`, and `owner_eth`. Absent if the event did not originate from an EVM transaction. */ eth_tx_hash?: string; - /** If the event type is `evm.log`, this field describes the human-readable type of -evm event, e.g. `Transfer`. + /** If the event type is `evm.log`, this field describes the human-readable type of +evm event, e.g. `Transfer`. Absent if the event type is not `evm.log`. */ evm_log_name?: string; @@ -1455,18 +1455,18 @@ export type NodeListAllOf = { export type NodeList = List & NodeListAllOf; export interface ValidatorMedia { - /** An email address for the validator. */ - email_address?: string; - /** A logo type. */ - logotype?: string; - /** The human-readable name of this validator. */ + /** An email address associated with the entity. */ + email?: string; + /** Keybase handle. */ + keybase?: string; + /** URL to a logo image for the entity. */ + logoUrl?: string; + /** The human-readable name of this entity. */ name?: string; - /** An Telegram handle. */ - tg_chat?: string; - /** A Twitter handle. */ - twitter_acc?: string; + /** Twitter handle. */ + twitter?: string; /** An URL associated with the entity. */ - website_link?: string; + url?: string; } export interface ValidatorCommissionBound { @@ -1708,9 +1708,9 @@ export interface TxError { This field, like `code` and `module`, can represent an error that originated anywhere in the paratime, i.e. either inside or outside a smart contract. -A common special case worth calling out: When the paratime is -EVM-compatible (e.g. Emerald or Sapphire) and the error originates -inside a smart contract (using `revert` in solidity), the following +A common special case worth calling out: When the paratime is +EVM-compatible (e.g. Emerald or Sapphire) and the error originates +inside a smart contract (using `revert` in solidity), the following will be true: - `module` will be "evm" and `code` will be 8; see [here](https://github.com/oasisprotocol/oasis-sdk/blob/runtime-sdk/v0.8.3/runtime-sdk/modules/evm/src/lib.rs#L128) for other possible errors in the `evm` module. - `message` will contain the best-effort human-readable revert reason. @@ -1719,7 +1719,7 @@ will be true: /** The module of a failed transaction. */ module?: string; /** The error parameters, as decoded using the contract abi. Present only when -- the error originated from within a smart contract (e.g. via `revert` in Solidity), and +- the error originated from within a smart contract (e.g. via `revert` in Solidity), and - the contract is verified or the revert reason is a plain String. If this field is present, `message` will include the name of the error, e.g. 'InsufficentBalance'. Note that users should be cautious when evaluating error data since the @@ -1781,22 +1781,32 @@ export type ConsensusTxMethod = typeof ConsensusTxMethod[keyof typeof ConsensusT // eslint-disable-next-line @typescript-eslint/no-redeclare export const ConsensusTxMethod = { - stakingTransfer: 'staking.Transfer', - stakingAddEscrow: 'staking.AddEscrow', - stakingReclaimEscrow: 'staking.ReclaimEscrow', - stakingAmendCommissionSchedule: 'staking.AmendCommissionSchedule', - stakingAllow: 'staking.Allow', - stakingWithdraw: 'staking.Withdraw', - roothashExecutorCommit: 'roothash.ExecutorCommit', - roothashExecutorProposerTimeout: 'roothash.ExecutorProposerTimeout', - registryRegisterEntity: 'registry.RegisterEntity', - registryRegisterNode: 'registry.RegisterNode', - registryRegisterRuntime: 'registry.RegisterRuntime', - governanceCastVote: 'governance.CastVote', - governanceSubmitProposal: 'governance.SubmitProposal', beaconPVSSCommit: 'beacon.PVSSCommit', beaconPVSSReveal: 'beacon.PVSSReveal', beaconVRFProve: 'beacon.VRFProve', + consensusMeta: 'consensus.Meta', + governanceCastVote: 'governance.CastVote', + governanceSubmitProposal: 'governance.SubmitProposal', + keymanagerPublishEphemeralSecret: 'keymanager.PublishEphemeralSecret', + keymanagerPublishMasterSecret: 'keymanager.PublishMasterSecret', + keymanagerUpdatePolicy: 'keymanager.UpdatePolicy', + registryDeregisterEntity: 'registry.DeregisterEntity', + registryProveFreshness: 'registry.ProveFreshness', + registryRegisterEntity: 'registry.RegisterEntity', + registryRegisterNode: 'registry.RegisterNode', + registryRegisterRuntime: 'registry.RegisterRuntime', + registryUnfreezeNode: 'registry.UnfreezeNode', + roothashEvidence: 'roothash.Evidence', + roothashExecutorCommit: 'roothash.ExecutorCommit', + roothashExecutorProposerTimeout: 'roothash.ExecutorProposerTimeout', + roothashSubmitMsg: 'roothash.SubmitMsg', + stakingAddEscrow: 'staking.AddEscrow', + stakingAllow: 'staking.Allow', + stakingAmendCommissionSchedule: 'staking.AmendCommissionSchedule', + stakingBurn: 'staking.Burn', + stakingReclaimEscrow: 'staking.ReclaimEscrow', + stakingTransfer: 'staking.Transfer', + stakingWithdraw: 'staking.Withdraw', } as const; /** From dd988a8bfff70d67915610d4692a29a9c5ccfabd Mon Sep 17 00:00:00 2001 From: Michal Zielenkiewicz Date: Mon, 17 Jun 2024 08:41:46 +0200 Subject: [PATCH 2/2] Sync validator media with API updates --- .changelog/1446.internal.md | 1 + src/app/components/Validators/index.tsx | 2 +- src/app/pages/ValidatorDetailsPage/ValidatorSnapshot.tsx | 4 ++-- src/app/pages/ValidatorDetailsPage/ValidatorTitleCard.tsx | 2 +- src/app/pages/ValidatorDetailsPage/index.tsx | 4 ++-- 5 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 .changelog/1446.internal.md diff --git a/.changelog/1446.internal.md b/.changelog/1446.internal.md new file mode 100644 index 000000000..882e70821 --- /dev/null +++ b/.changelog/1446.internal.md @@ -0,0 +1 @@ +Update API bindings diff --git a/src/app/components/Validators/index.tsx b/src/app/components/Validators/index.tsx index 26825be41..8f3bf2bd2 100644 --- a/src/app/components/Validators/index.tsx +++ b/src/app/components/Validators/index.tsx @@ -50,7 +50,7 @@ export const Validators: FC = ({ isLoading, limit, pagination, = ({ scope, validator - {getHostname(validator?.media?.website_link)} + {getHostname(validator?.media?.url)} } - link={validator?.media?.website_link} + link={validator?.media?.url} /> diff --git a/src/app/pages/ValidatorDetailsPage/ValidatorTitleCard.tsx b/src/app/pages/ValidatorDetailsPage/ValidatorTitleCard.tsx index 50f1c1aec..0311eeaad 100644 --- a/src/app/pages/ValidatorDetailsPage/ValidatorTitleCard.tsx +++ b/src/app/pages/ValidatorDetailsPage/ValidatorTitleCard.tsx @@ -44,7 +44,7 @@ export const ValidatorTitleCard: FC = ({ isLoading, net {validator?.media?.name} diff --git a/src/app/pages/ValidatorDetailsPage/index.tsx b/src/app/pages/ValidatorDetailsPage/index.tsx index c01e02098..3418129b0 100644 --- a/src/app/pages/ValidatorDetailsPage/index.tsx +++ b/src/app/pages/ValidatorDetailsPage/index.tsx @@ -108,7 +108,7 @@ export const ValidatorDetailsView: FC<{
{validator.media?.name}
@@ -160,7 +160,7 @@ export const ValidatorDetailsView: FC<{
{t('validator.cumulativeVoting')}