hot fix: bad UD ratio

This commit is contained in:
poka 2022-09-12 08:52:27 +02:00
parent eb9275fa84
commit 2b0a0428a0
3 changed files with 3 additions and 3 deletions

View File

@ -194,7 +194,7 @@ class SubstrateSdk with ChangeNotifier {
final bool isUdUnit = configBox.get('isUdUnit') ?? false;
final udValue = await getUdValue();
final double balanceRatio = isUdUnit ? round(udValue / 100, 6) : 1;
final double balanceRatio = isUdUnit ? round(udValue / 1000, 6) : 1;
// log.d('udValue: $udValue');

View File

@ -281,7 +281,7 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
amount = repository[4] == 'RECEIVED' ? repository[3] : repository[3] * -1;
if (isUdUnit) {
amount = round(amount / (sub.udValue / 100));
amount = round(amount / (sub.udValue / 1000));
finalAmount = 'ud'.tr(args: ['$amount ']);
} else {
finalAmount = '$amount $currencyName';

View File

@ -409,7 +409,7 @@ void paymentPopup(BuildContext context, String toAddress) {
final bool isUdUnit = configBox.get('isUdUnit') ?? false;
final udValue = sub.udValue;
final double balanceRatio = isUdUnit ? round(udValue / 100, 6) : 1;
final double balanceRatio = isUdUnit ? round(udValue / 1000, 6) : 1;
final toWalletData = myWalletProvider.getWalletDataByAddress(toAddress);