forked from axiom-team/gecko
hot fix: bad UD ratio
This commit is contained in:
parent
eb9275fa84
commit
2b0a0428a0
|
@ -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');
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue