small fixes for single payout and big chunck for multiple payouts
This commit is contained in:
@@ -7,6 +7,7 @@ import 'package:pshared/models/payment/fx/intent.dart';
|
||||
import 'package:pshared/models/payment/fx/side.dart';
|
||||
import 'package:pshared/models/payment/kind.dart';
|
||||
import 'package:pshared/models/payment/methods/card.dart';
|
||||
import 'package:pshared/models/payment/methods/crypto_address.dart';
|
||||
import 'package:pshared/models/payment/methods/data.dart';
|
||||
import 'package:pshared/models/payment/methods/iban.dart';
|
||||
import 'package:pshared/models/payment/methods/managed_wallet.dart';
|
||||
@@ -44,13 +45,17 @@ class QuotationIntentBuilder {
|
||||
// TODO: adapt to possible other sources
|
||||
currency: currencyCodeToString(selectedWallet.currency),
|
||||
);
|
||||
final fxIntent = FxIntent(
|
||||
pair: CurrencyPair(
|
||||
base: currencyCodeToString(selectedWallet.currency),
|
||||
quote: 'RUB', // TODO: exentd target currencies
|
||||
),
|
||||
side: FxSide.sellBaseBuyQuote,
|
||||
);
|
||||
final isCryptoToCrypto = paymentData is CryptoAddressPaymentMethod &&
|
||||
(paymentData.asset?.tokenSymbol ?? '').trim().toUpperCase() == amount.currency;
|
||||
final fxIntent = isCryptoToCrypto
|
||||
? null
|
||||
: FxIntent(
|
||||
pair: CurrencyPair(
|
||||
base: currencyCodeToString(selectedWallet.currency),
|
||||
quote: 'RUB', // TODO: exentd target currencies
|
||||
),
|
||||
side: FxSide.sellBaseBuyQuote,
|
||||
);
|
||||
return PaymentIntent(
|
||||
kind: PaymentKind.payout,
|
||||
amount: amount,
|
||||
|
||||
Reference in New Issue
Block a user