Skip to content

Commit

Permalink
Updates to simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
maayarosama committed Oct 17, 2023
1 parent 34fcc78 commit 6ec5eac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion packages/playground/src/components/pie_chart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const options = ref({
},
});
const data = computed(() => {
console.log("props.chartdata", props.chartdata);
return {
labels: ["NU", "CU", "SU"],
datasets: [
Expand Down
9 changes: 5 additions & 4 deletions packages/playground/src/components/simulator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
/>
</input-validator>

<v-text-field disabled label="Return On Investment" type="number" v-model.number="ROI" />
<v-text-field disabled label="Return On Investment" v-model.number="ROI" />
<v-text-field disabled label="Net Profit" type="number" v-model.number="netProfit" />
<v-text-field disabled label="Gross Profit" type="number" v-model.number="grossProfit" />
<v-text-field disabled label="Total Costs" type="number" v-model.number="totalCosts" />
Expand Down Expand Up @@ -348,6 +348,7 @@ const totalCosts = computed(() => {
const netProfit = computed(() => grossProfit.value - totalCosts.value);
watch([activeProfile.value, isProfit, isAdvanced, certified], () => {
console.log("ROI", ROI.value);
if (certified.value == "Certified Node") {
activeProfile.value.certified = Certification.CERTIFIED;
} else {
Expand All @@ -371,8 +372,8 @@ const updateLineChart = () => {
: 0;
if (activeProfile.value) {
const X = (price - 0.15) / 19;
xs.value = [...Array.from({ length: 20 }).map((_, i) => 0.15 + X * i)];
const X = (price - 0.01) / 19;
xs.value = [...Array.from({ length: 10 }).map((_, i) => 0.01 + X * i)];
}
};
function updatePieChart() {
Expand All @@ -390,7 +391,7 @@ export function createFarmingProfile(options: Partial<FarmingProfileOptions> = {
hdd: options.hdd || 0,
ssd: options.ssd || 0,
price: options.price || 0.09,
priceAfter5Years: options.priceAfter5Years || 2,
priceAfter5Years: options.priceAfter5Years || 1,
maximumTokenPrice: options.maximumTokenPrice || 2,
powerUtilization: options.powerUtilization || 40,
powerCost: options.powerCost || 0.15,
Expand Down

0 comments on commit 6ec5eac

Please sign in to comment.