Skip to content

Commit

Permalink
Switching to rawToMnano and mnanoToRaw
Browse files Browse the repository at this point in the history
  • Loading branch information
qwahzi authored Nov 6, 2021
1 parent 98e0b48 commit f28e5f0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -655,8 +655,8 @@ export class AccountDetailsComponent implements OnInit, OnDestroy {
}
if (!this.util.string.isNumeric(this.amountFiat)) return;
const rawAmount = this.util.nano.mnanoToRaw(new BigNumber(this.amountFiat).div(this.price.price.lastPrice));
const nanoVal = this.util.nano.rawToNano(rawAmount).floor();
const nanoAmount = this.getAmountValueFromBase(this.util.nano.nanoToRaw(nanoVal)).floor();
const nanoVal = this.util.nano.rawToMnano(rawAmount).floor();
const nanoAmount = this.getAmountValueFromBase(this.util.nano.mnanoToRaw(nanoVal)).floor();

this.amount = nanoAmount.toNumber();
}
Expand Down Expand Up @@ -738,7 +738,7 @@ export class AccountDetailsComponent implements OnInit, OnDestroy {
getAmountValueFromBase(value) {
switch (this.selectedAmount.value) {
default:
case 'nyano': return this.util.nano.rawToNano(value);
case 'nyano': return this.util.nano.rawToMnano(value);
}
}

Expand Down

0 comments on commit f28e5f0

Please sign in to comment.