Skip to content

Commit

Permalink
Fix bug in unstake fees for sending transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
behrang committed Oct 29, 2023
1 parent 48c443c commit 0d206a3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/Model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -654,8 +654,7 @@ export class Model {
this.htonWallet != null &&
this.tonConnectUI != null &&
this.tonBalance != null &&
this.fees != null &&
this.htonWalletFees != null
this.fees != null
) {
let address: string
let amount: string
Expand All @@ -672,9 +671,9 @@ export class Model {
.toString('base64')
} else {
address = this.htonWallet.address.toString()
const unstakeTokensFee = this.htonWalletFees.unstakeTokensFee
const storageFee = this.htonWalletFees.storageFee
const htonWalletTonBalance = this.htonWalletFees.tonBalance
const unstakeTokensFee = this.htonWalletFees?.unstakeTokensFee ?? 0n
const storageFee = this.htonWalletFees?.storageFee ?? 0n
const htonWalletTonBalance = this.htonWalletFees?.tonBalance ?? 0n
if (htonWalletTonBalance >= storageFee) {
amount = unstakeTokensFee.toString()
} else {
Expand Down

0 comments on commit 0d206a3

Please sign in to comment.