Skip to content

Commit

Permalink
Merge pull request #310 from harmony-one/hot-fix-1country
Browse files Browse the repository at this point in the history
update onNotBalanceMessage method
  • Loading branch information
theofandrich authored Sep 26, 2023
2 parents 9658bad + e14c3ca commit 66bbd87
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/modules/1country/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,8 @@ export class OneCountryBot implements PayableBot {
const accountId = this.payments.getAccountId(ctx as OnMessageContext)
const account = this.payments.getUserAccount(accountId)
const addressBalance = await this.payments.getUserBalance(accountId)
const creditsBalance = await chatService.getBalance(accountId)
const fiatCreditsBalance = await chatService.getFiatBalance(accountId)
const balance = addressBalance
.plus(creditsBalance)
.plus(fiatCreditsBalance)
const { totalCreditsAmount } = await chatService.getUserCredits(accountId)
const balance = addressBalance.plus(totalCreditsAmount)
const balanceOne = this.payments.toONE(balance, false).toFixed(2)
const balanceMessage = appText.notEnoughBalance
.replaceAll('$CREDITS', balanceOne)
Expand Down

0 comments on commit 66bbd87

Please sign in to comment.