From 4dcc4fa36da0b12bcfc72d4bb9ced7f76b950ea0 Mon Sep 17 00:00:00 2001 From: dafuga Date: Tue, 1 Oct 2024 16:51:43 -0700 Subject: [PATCH] fix: buying proper bytes amount --- src/routes/[network]/(account)/ram/buy/state.svelte.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/[network]/(account)/ram/buy/state.svelte.ts b/src/routes/[network]/(account)/ram/buy/state.svelte.ts index 632c3e0a..d4d429da 100644 --- a/src/routes/[network]/(account)/ram/buy/state.svelte.ts +++ b/src/routes/[network]/(account)/ram/buy/state.svelte.ts @@ -29,7 +29,7 @@ export class BuyRAMState { ); public bytesToBuy: number = $derived( - this.bytes || !this.bytesValue.value || !this.pricePerKB.value + this.format === 'units' || !this.bytesValue.value || !this.pricePerKB.value ? this.bytes || 0 : Number(((this.bytesValue.value / this.pricePerKB.value) * 1000).toFixed(0)) );