mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-05-06 08:42:14 +00:00
Fix for formatting amount for any_pay_payment totalAmount.
This commit is contained in:
parent
a0bec37fc8
commit
4c80e92ecc
1 changed files with 5 additions and 5 deletions
|
@ -1,8 +1,8 @@
|
||||||
import 'package:cake_wallet/anypay/any_pay_chain.dart';
|
import 'package:cake_wallet/anypay/any_pay_chain.dart';
|
||||||
import 'package:cw_bitcoin/bitcoin_amount_format.dart';
|
|
||||||
import 'package:cw_core/monero_amount_format.dart';
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:cake_wallet/anypay/any_pay_payment_instruction.dart';
|
import 'package:cake_wallet/anypay/any_pay_payment_instruction.dart';
|
||||||
|
import 'package:cake_wallet/bitcoin/bitcoin.dart';
|
||||||
|
import 'package:cake_wallet/monero/monero.dart';
|
||||||
|
|
||||||
class AnyPayPayment {
|
class AnyPayPayment {
|
||||||
AnyPayPayment({
|
AnyPayPayment({
|
||||||
|
@ -45,11 +45,11 @@ class AnyPayPayment {
|
||||||
.fold<int>(0, (int outAcc, out) => outAcc + out.amount));
|
.fold<int>(0, (int outAcc, out) => outAcc + out.amount));
|
||||||
switch (chain) {
|
switch (chain) {
|
||||||
case AnyPayChain.xmr:
|
case AnyPayChain.xmr:
|
||||||
return moneroAmountToString(amount: total);
|
return monero.formatterMoneroAmountToString(amount: total);
|
||||||
case AnyPayChain.btc:
|
case AnyPayChain.btc:
|
||||||
return bitcoinAmountToString(amount: total);
|
return bitcoin.formatterBitcoinAmountToString(amount: total);
|
||||||
case AnyPayChain.ltc:
|
case AnyPayChain.ltc:
|
||||||
return bitcoinAmountToString(amount: total);
|
return bitcoin.formatterBitcoinAmountToString(amount: total);
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue