diff --git a/projects/portal/src/app/views/yieldaggregator/vaults/vault/vault.component.ts b/projects/portal/src/app/views/yieldaggregator/vaults/vault/vault.component.ts index 9a1a382a8..6f32cb4d7 100644 --- a/projects/portal/src/app/views/yieldaggregator/vaults/vault/vault.component.ts +++ b/projects/portal/src/app/views/yieldaggregator/vaults/vault/vault.component.ts @@ -188,13 +188,21 @@ export class VaultComponent implements OnInit, OnChanges { return this.vault?.strategies?.find((strategy) => strategy.id === id); } + // todo: fix use denom exponent setMintAmount(rate: number) { - this.mintAmount = Math.floor((this.symbolBalancesMap?.[this.symbol || ''] || 0) * rate); + this.mintAmount = + Math.floor((this.symbolBalancesMap?.[this.symbol || ''] || 0) * rate * Math.pow(10, 6)) / + Math.pow(10, 6); this.onDepositAmountChange(); } setBurnAmount(rate: number) { - this.burnAmount = (this.symbolBalancesMap?.['YA-VAULT-' + this.vault?.vault?.id] || 0) * rate; + this.burnAmount = + Math.floor( + (this.symbolBalancesMap?.['YA-VAULT-' + this.vault?.vault?.id] || 0) * + rate * + Math.pow(10, 6), + ) / Math.pow(10, 6); this.onWithdrawAmountChange(); } }