diff --git a/src/config/networks.ts b/src/config/networks.ts index e0ff395a79..e130f0687d 100644 --- a/src/config/networks.ts +++ b/src/config/networks.ts @@ -18,7 +18,7 @@ export const NetworkList: Networks = { defaultRpcEndpoint: 'Parity', rpcEndpoints: { // TODO: remove after runtime upgrade - Parity: 'ws://localhost:9944', + Parity: 'wss://testnet.vara.network', }, }, namespace: 'fe1b4c55fd4d668101126434206571a7', diff --git a/src/library/Hooks/useUnitPrice/index.tsx b/src/library/Hooks/useUnitPrice/index.tsx index 7b07f24242..124837fbe1 100644 --- a/src/library/Hooks/useUnitPrice/index.tsx +++ b/src/library/Hooks/useUnitPrice/index.tsx @@ -19,19 +19,12 @@ export const useUnitPrice = () => { const texts = await Promise.all(responses.map((res) => res.json())); const newPrice = texts[0][NetworkList[network].api.id]; - if ( - newPrice.usd !== undefined && - newPrice.usd_24h_change !== undefined - ) { - const price: string = (Math.ceil(newPrice.usd * 100) / 100).toFixed( - 2 - ); + if (newPrice.usd !== undefined && newPrice.usd_24h_change !== undefined) { + const price: string = (Math.ceil(newPrice.usd * 100) / 100).toFixed(2); return { lastPrice: price, - change: (Math.round(newPrice.usd_24h_change * 100) / 100).toFixed( - 2 - ), + change: (Math.round(newPrice.usd_24h_change * 100) / 100).toFixed(2), }; } return null;