Fix for formatting amount for any_pay_payment totalAmount.
M committed
Aug 2, 2022 at 15:11 UTC
4c80e92ecc8f49f8efb0dcc570526537b025e552
1 file changed
+5
-5
lib/anypay/any_pay_payment.dart
+5
-5
@@ -1,8 +1,8 @@
1
import 'package:cake_wallet/anypay/any_pay_chain.dart';
2
-import 'package:cw_bitcoin/bitcoin_amount_format.dart';
3
-import 'package:cw_core/monero_amount_format.dart';
2
import 'package:flutter/foundation.dart';
3
import 'package:cake_wallet/anypay/any_pay_payment_instruction.dart';
4
+import 'package:cake_wallet/bitcoin/bitcoin.dart';
5
+import 'package:cake_wallet/monero/monero.dart';
6
7
class AnyPayPayment {
8
AnyPayPayment({
@@ -45,11 +45,11 @@ class AnyPayPayment {
45
.fold<int>(0, (int outAcc, out) => outAcc + out.amount));
46
switch (chain) {
47
case AnyPayChain.xmr:
48
- return moneroAmountToString(amount: total);
48
+ return monero.formatterMoneroAmountToString(amount: total);
49
case AnyPayChain.btc:
50
- return bitcoinAmountToString(amount: total);
50
+ return bitcoin.formatterBitcoinAmountToString(amount: total);
51
case AnyPayChain.ltc:
52
- return bitcoinAmountToString(amount: total);
52
+ return bitcoin.formatterBitcoinAmountToString(amount: total);
53
default:
54
return null;
55
}