bugs fixed

ssr
Artemis 2022-02-06 17:11:57 +03:30
parent aa2a68d65c
commit cd854ebd59
2 changed files with 4 additions and 3 deletions

View File

@ -37,7 +37,7 @@ export class InvestmentTableComponent implements OnInit {
public Deinvest(item: IInvest): void {
if (item.locked) {
let date = moment(item.created_at)
let found = this.Funds.find(i => i.id == item.id)!
let found = this.Funds.find(i => i.id.toString() == item.fund_id)!
date.add(found.lock_time, 'days')
date.locale('fa')
return this.CoreService.Toast(`متاسفانه امکان ازاد سازی وجه گذاشته شده تا ${date.format('MM/DD hh:mm')} وجود ندارد`)

View File

@ -85,8 +85,9 @@ export class InvestmentComponent implements OnInit {
try {
if (this.Amount < 0) return this._CoreService.Toast('چیت نزن لطفا !')
if (this.Amount == 0) return this._CoreService.Toast('مقدار سرمایه گذاری نباید صفر باشد.')
if (this.Amount > this._CoreService.Wallets[0].balance) return this._CoreService.Toast('مقدار سرمایه گذاری در کیف پول شما نیست.')
if (this.Items[this.Selected].kyc && this._CoreService.Profile?.status != 'active')
if (this.Amount > this._CoreService.Wallets[0].balance)
return this._CoreService.Toast('مقدار سرمایه گذاری در کیف پول شما نیست.')
if (this.Item?.kyc && this._CoreService.Profile?.status != 'active')
return this._CoreService.Toast('این صندوق نیازمند تایید حساب کاربری می باشد.')
this.Loading = true
let res = await this._ApiService.Fund.Invest({