File tree Expand file tree Collapse file tree
packages/playground/src/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -122,6 +122,7 @@ import {
122122import { useGrid , useProfileManager } from " ../stores" ;
123123import { loadBalance , updateGrid } from " ../utils/grid" ;
124124import { normalizeBalance } from " ../utils/helpers" ;
125+ import { normalizePrice } from " ../utils/pricing_calculator" ;
125126
126127const props = defineProps ({
127128 disableAlerts: {
@@ -399,8 +400,10 @@ async function loadCost(profile: { mnemonic: string }) {
399400 certified: props .selectedNode ?.certificationType === " Certified" ,
400401 });
401402 await getIPv1Price (grid ! );
402- usd .value = props .dedicated ? dedicatedPrice : sharedPrice ;
403- tft .value = parseFloat ((usd .value / (await grid ! .calculator .tftPrice ())).toFixed (2 ));
403+ const basePrice = props .dedicated ? dedicatedPrice : sharedPrice ;
404+ usd .value = normalizePrice (basePrice );
405+ const tftPrice = await grid ! .calculator .tftPrice ();
406+ tft .value = normalizePrice (usd .value / tftPrice );
404407 costLoading .value = false ;
405408}
406409 </script >
You can’t perform that action at this time.
0 commit comments