Skip to content

Commit

Permalink
Merge commit '1bd64f9e18b7a1d1badef1ab4869699e27aa6160' into core-nod…
Browse files Browse the repository at this point in the history
…e/fix-make-validator-info
  • Loading branch information
gokhan-simsek-iota committed Dec 19, 2024
2 parents 3b71a08 + 1bd64f9 commit 2e5e436
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 34 deletions.
2 changes: 1 addition & 1 deletion apps/explorer/src/components/home-metrics/OnTheNetwork.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export function OnTheNetwork(): JSX.Element {
size={LabelTextSize.Large}
label="Reference Gas Price"
text={gasPriceFormatted ?? '-'}
supportingLabel={gasPriceFormatted !== null ? 'IOTA' : undefined}
supportingLabel={gasPriceFormatted !== null ? 'nano' : undefined}
tooltipPosition={TooltipPosition.Top}
tooltipText="The reference gas price in the current epoch."
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@ export function SettingsDialog({

return (
<Dialog open={isOpen} onOpenChange={() => handleClose()}>
<>
{view === SettingsDialogView.SelectSetting && (
<SettingsListView handleClose={handleClose} setView={setView} />
)}
{view === SettingsDialogView.NetworkSettings && (
<NetworkSelectorView handleClose={handleClose} onBack={onBack} />
)}
</>
{view === SettingsDialogView.SelectSetting && (
<SettingsListView handleClose={handleClose} setView={setView} />
)}
{view === SettingsDialogView.NetworkSettings && (
<NetworkSelectorView handleClose={handleClose} onBack={onBack} />
)}
</Dialog>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export function NetworkSelectorView({
}: NetworkSelectorViewProps): JSX.Element {
const clientContext = useIotaClientContext();
const activeNetwork = clientContext.network;
// Dashboard doesn't support RPCs yet
const networks = clientContext.networks as Record<string, NetworkConfiguration>;

async function handleNetworkChange(network: NetworkConfiguration) {
if (activeNetwork === network.id) {
Expand All @@ -27,25 +29,21 @@ export function NetworkSelectorView({
clientContext.selectNetwork(network.id);
toast.success(`Switched to ${network.name}`);
}

return (
<DialogLayout>
<Header title="Network" onClose={handleClose} onBack={onBack} titleCentered />
<DialogLayoutBody>
<div className="flex w-full flex-col gap-md">
{Object.keys(clientContext.networks).map((network) => {
const networkConfig = clientContext.networks[
network
] as NetworkConfiguration;
return (
<div className="px-md" key={networkConfig.id}>
<RadioButton
label={networkConfig.name}
isChecked={activeNetwork === networkConfig.id}
onChange={() => handleNetworkChange(networkConfig)}
/>
</div>
);
})}
{Object.values(networks).map((network) => (
<div className="px-md" key={network.id}>
<RadioButton
label={network.name}
isChecked={activeNetwork === network.id}
onChange={() => handleNetworkChange(network)}
/>
</div>
))}
</div>
</DialogLayoutBody>
</DialogLayout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,16 @@ interface SettingsListViewProps {
export function SettingsListView({ handleClose, setView }: SettingsListViewProps): JSX.Element {
const { network } = useIotaClientContext();
const { name: networkName } = getNetwork(network);
function onSelectSettingClick(view: SettingsDialogView): void {
setView(view);
}

const MENU_ITEMS = [
{
title: 'Network',
subtitle: networkName,
icon: <Globe />,
onClick: () => onSelectSettingClick(SettingsDialogView.NetworkSettings),
onClick: () => setView(SettingsDialogView.NetworkSettings),
},
];

return (
<DialogLayout>
<Header title="Settings" onClose={handleClose} onBack={handleClose} titleCentered />
Expand Down
1 change: 0 additions & 1 deletion crates/iota-json-rpc-types/src/iota_object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ pub struct IotaObjectData {
/// The Display metadata for frontend UI rendering, default to be None
/// unless IotaObjectDataOptions.showContent is set to true This can also
/// be None if the struct type does not have Display defined
/// See more details in <https://forums.iota.io/t/nft-object-display-proposal/4872>
#[serde(skip_serializing_if = "Option::is_none")]
pub display: Option<DisplayFieldsResponse>,
/// Move object content or package content, default to be None unless
Expand Down
4 changes: 3 additions & 1 deletion crates/iota-move-build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,9 @@ pub fn decorate_warnings(warning_diags: Diagnostics, files: Option<&MappedFiles>
report_warnings(f, warning_diags);
}
if any_linter_warnings {
eprintln!("Please report feedback on the linter warnings at https://forums.iota.io\n");
eprintln!(
"Please report feedback on the linter warnings at https://github.com/iotaledger/iota/issues\n"
);
}
if filtered_diags_num > 0 {
eprintln!(
Expand Down
2 changes: 1 addition & 1 deletion crates/iota-open-rpc/spec/openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9700,7 +9700,7 @@
]
},
"display": {
"description": "The Display metadata for frontend UI rendering, default to be None unless IotaObjectDataOptions.showContent is set to true This can also be None if the struct type does not have Display defined See more details in <https://forums.iota.io/t/nft-object-display-proposal/4872>",
"description": "The Display metadata for frontend UI rendering, default to be None unless IotaObjectDataOptions.showContent is set to true This can also be None if the struct type does not have Display defined",
"anyOf": [
{
"$ref": "#/components/schemas/DisplayFieldsResponse"
Expand Down
2 changes: 0 additions & 2 deletions docs/site/src/components/FeedbackForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const FeedbackForm = () => {

return (
<div className="feedback-container">
<div className="divider"></div>
<div className={clsx("h3", "feedback-header")}>Feedback Form</div>
<form onSubmit={handleSubmit}>
<div className="form-group">
Expand Down Expand Up @@ -54,7 +53,6 @@ const FeedbackForm = () => {
Submit Feedback
</button>
</form>
<div className="divider"></div>
</div>
);
};
Expand Down
12 changes: 11 additions & 1 deletion docs/site/src/components/FeedbackForm/styles.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
.feedback-container {
/* margin: 20px; */
background-color: #0000001a;
padding-top: 0.25rem;
padding-left: 2rem;
padding-right: 2rem;
padding-bottom: 1.25rem;
margin-top: 1rem;
border-radius: 0.5rem;
}

[data-theme="dark"] .feedback-container {
background-color: #1e1e1e;
}

.feedback-header {
Expand Down
2 changes: 1 addition & 1 deletion sdk/typescript/src/client/types/generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ export interface IotaObjectData {
/**
* The Display metadata for frontend UI rendering, default to be None unless
* IotaObjectDataOptions.showContent is set to true This can also be None if the struct type does not
* have Display defined See more details in <https://forums.iota.io/t/nft-object-display-proposal/4872>
* have Display defined
*/
display?: DisplayFieldsResponse | null;
objectId: string;
Expand Down

0 comments on commit 2e5e436

Please sign in to comment.