Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitayutanov committed Dec 28, 2023
1 parent d955625 commit 972da17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/config/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
13 changes: 3 additions & 10 deletions src/library/Hooks/useUnitPrice/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 972da17

Please sign in to comment.