mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-01 09:57:46 +00:00
133fa2987a
* Remove error message if buy action is disabled * Fix wallet list selected wallet issue * Check if the widget is still mounted before showing popup * minor code readability enhancement [skip ci] * Code enhancement [skip ci] * Revert removing ask each time localization * Add Moonpay to sell flow Code Enhancements * remove error popup when sell option is disabled
33 lines
853 B
Dart
33 lines
853 B
Dart
import 'package:cake_wallet/buy/buy_amount.dart';
|
|
import 'package:cake_wallet/buy/order.dart';
|
|
import 'package:cw_core/wallet_base.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
abstract class BuyProvider {
|
|
BuyProvider({
|
|
required this.wallet,
|
|
required this.isTestEnvironment,
|
|
});
|
|
|
|
final WalletBase wallet;
|
|
final bool isTestEnvironment;
|
|
|
|
String get title;
|
|
|
|
String get providerDescription;
|
|
|
|
String get lightIcon;
|
|
|
|
String get darkIcon;
|
|
|
|
@override
|
|
String toString() => title;
|
|
|
|
Future<void> launchProvider(BuildContext context, bool? isBuyAction);
|
|
|
|
Future<String> requestUrl(String amount, String sourceCurrency) => throw UnimplementedError();
|
|
|
|
Future<Order> findOrderById(String id) => throw UnimplementedError();
|
|
|
|
Future<BuyAmount> calculateAmount(String amount, String sourceCurrency) => throw UnimplementedError();
|
|
}
|