From ef6d2a481f56f6bc8e0d32c14d2ec5bd2597d10b Mon Sep 17 00:00:00 2001 From: ditatompel Date: Wed, 8 May 2024 20:01:11 +0700 Subject: [PATCH] Load netFees from pageLoad --- .../src/routes/(front)/remote-nodes/+page.js | 27 ++++++++++-- .../routes/(front)/remote-nodes/+page.svelte | 43 +++---------------- 2 files changed, 30 insertions(+), 40 deletions(-) diff --git a/frontend/src/routes/(front)/remote-nodes/+page.js b/frontend/src/routes/(front)/remote-nodes/+page.js index d4d2137..16ec82c 100644 --- a/frontend/src/routes/(front)/remote-nodes/+page.js +++ b/frontend/src/routes/(front)/remote-nodes/+page.js @@ -1,11 +1,32 @@ /** @type {import('./$types').PageLoad} */ export async function load({ data }) { - /* prettier-ignore */ return { + // prettier-ignore meta: { title: 'Public Monero Remote Nodes List', - description: 'Monero is private, decentralized cryptocurrency that keeps your finances confidential and secure.', + description: + 'Monero is private, decentralized cryptocurrency that keeps your finances confidential and secure.', keywords: 'monero remote nodes,public monero nodes,monero public nodes,monero wallet' - } + }, + /** + * Array containing network fees. + * For now, I use static data to reduce the amount of API calls. + * See the values from `/api/v1/fees` + * @type {{ nettype: string, estimate_fee: number }[]} + */ + netFees: [ + { + nettype: 'mainnet', + estimate_fee: 20000 + }, + { + nettype: 'stagenet', + estimate_fee: 58000 + }, + { + nettype: 'testnet', + estimate_fee: 20000 + } + ] }; } diff --git a/frontend/src/routes/(front)/remote-nodes/+page.svelte b/frontend/src/routes/(front)/remote-nodes/+page.svelte index 6f94c36..6aa1db6 100644 --- a/frontend/src/routes/(front)/remote-nodes/+page.svelte +++ b/frontend/src/routes/(front)/remote-nodes/+page.svelte @@ -34,29 +34,8 @@ const handler = new DataHandler([], { rowsPerPage: 10, totalRows: 0 }); let rows = handler.getRows(); - /** - * Array containing network fees. - * For now, I use static data to reduce the amount of API calls. - * See the values from `/api/v1/fees` - * @type {{ nettype: string, estimate_fee: number }[]} - */ - const netFees = [ - { - nettype: 'mainnet', - estimate_fee: 20000 - }, - { - nettype: 'stagenet', - estimate_fee: 58000 - }, - { - nettype: 'testnet', - estimate_fee: 20000 - } - ]; - /** @type {Object.} */ - let majorityFee = netFees.reduce( + let majorityFee = data.netFees.reduce( /** * @param {Object.} o * @param {{ nettype: string, estimate_fee: number }} key @@ -81,10 +60,9 @@

{data.meta.title}

+

- Monero remote node is a device on the internet running the Monero software with - full copy of the Monero blockchain that doesn't run on the same local machine where the Monero - wallet is located. + Monero remote node is a device on the internet running the Monero software with full copy of the Monero blockchain that doesn't run on the same local machine where the Monero wallet is located.

@@ -92,19 +70,11 @@
+
-

- Remote node can be used by people who, for their own reasons (usually because of hardware - requirements, disk space, or technical abilities), cannot/don't want to run their own node and - prefer to relay on one publicly available on the Monero network. -

-

- Using an open node will allow to make a transaction instantaneously, without the need to - download the blockchain and sync to the Monero network first, but at the cost of the control - over your privacy. the Monero community suggests to always run your own node to - obtain the maximum possible privacy and to help decentralize the network. -

+

Remote node can be used by people who, for their own reasons (usually because of hardware requirements, disk space, or technical abilities), cannot/don't want to run their own node and prefer to relay on one publicly available on the Monero network.

+

Using an open node will allow to make a transaction instantaneously, without the need to download the blockchain and sync to the Monero network first, but at the cost of the control over your privacy. the Monero community suggests to always run your own node to obtain the maximum possible privacy and to help decentralize the network.

@@ -135,7 +105,6 @@ Country Status Est. Fee - Uptime Check