From 5076bda1c2026f0948d680ee8e2db4ef86031494 Mon Sep 17 00:00:00 2001 From: DalinHuang Date: Sun, 20 Oct 2024 20:39:10 -0400 Subject: [PATCH 1/2] better mock data --- components/three-scene-client.tsx | 8 ++- data/sampleConfirmationData.ts | 106 +++++++++++++++--------------- hooks/use-nano-websocket.tsx | 2 +- 3 files changed, 61 insertions(+), 55 deletions(-) diff --git a/components/three-scene-client.tsx b/components/three-scene-client.tsx index b5aa03e..a028926 100644 --- a/components/three-scene-client.tsx +++ b/components/three-scene-client.tsx @@ -2,7 +2,12 @@ import React, { useRef, useState, useEffect, useCallback } from 'react'; import { Canvas } from '@react-three/fiber'; -import { OrbitControls, Stars, PerspectiveCamera } from '@react-three/drei'; +import { + OrbitControls, + Stars, + PerspectiveCamera, + Stats +} from '@react-three/drei'; import * as THREE from 'three'; import { IRepData } from '@/types/index'; import ThreeMesh from '@/components/three-mesh'; @@ -207,6 +212,7 @@ const ThreeSceneClient: React.FC = ({ }} className="w-full h-full cursor-move pointer-events-auto" > + { }, [wsUrl]); const simulateConfirmations = useCallback(() => { - const SimulationInterval = 500; // ms + const SimulationInterval = 2500; // ms if (isLocalDevelopment) { const confirmationSubscription = new Subject(); let index = 0; From 590d51d9e7ca2934ff80bcfae1b7e49dda315d61 Mon Sep 17 00:00:00 2001 From: DalinHuang Date: Mon, 21 Oct 2024 00:14:58 -0400 Subject: [PATCH 2/2] update mock data --- data/sampleConfirmationData.ts | 2 +- hooks/use-nano-websocket.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/sampleConfirmationData.ts b/data/sampleConfirmationData.ts index 8268c76..7d53afd 100644 --- a/data/sampleConfirmationData.ts +++ b/data/sampleConfirmationData.ts @@ -1237,7 +1237,7 @@ export const SampleConfirmationData2 = [ message: { account: 'nano_3nntmoi1gwobpkwg7odxrqk7mso1dk7fjp1d3cfbfzgu5c3yxj6iq77p9n4o', - amount: '13335000000000000000000000000000000', + amount: '1333000000000000000000000000000000', hash: 'D036225358C17FB49CACA1740197E0B872E81DE2F29E00A685A5CA1828060474', confirmation_type: 'active_quorum', block: { diff --git a/hooks/use-nano-websocket.tsx b/hooks/use-nano-websocket.tsx index d1de5ed..9ce2361 100644 --- a/hooks/use-nano-websocket.tsx +++ b/hooks/use-nano-websocket.tsx @@ -50,7 +50,7 @@ const useNanoWebsocket = () => { }, [wsUrl]); const simulateConfirmations = useCallback(() => { - const SimulationInterval = 2500; // ms + const SimulationInterval = 500; // ms if (isLocalDevelopment) { const confirmationSubscription = new Subject(); let index = 0;