mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-03 12:24:19 +01:00
Cw 657 new buy sell flow (#1553)
* init commit * onramper * moonPay * dfx provider * meld * dfx payment methods * fiat buy credentials * moonpay payment method * payment loading state * dfx sell quote * onramper launch trade * meld launch trade * country picker * update option tile * buy/sell action * meld refactor * update pr_test_build.yml * ui fixes * revert country picker commit * update the ui * recommended providers * payment method [skip ci] * provider option tile * remove buy action * minor fixes * update the best rate when the amount is changed * fixes for currency title * fix icons * code refactoring * null issue * code review fixes * Update pr_test_build_linux.yml * Update meld_buy_provider.dart * Update meld_buy_provider.dart * add show wallets action * remove default sell / buy provider setting * localisation * providerTypes * icons * remove duplicate file [skip ci] * minor changes [skip ci] * fixes from review * disable dfx for non eur/chf currencies fix providers to be fetched with the selected currency * fix breaking from loop if one element failed * fix minor naming issue from merging conflicts * add fiat check for moonpay * fix address validation * merge conflict * fix destination and source currency * minor fix * minor fix * update the flow * fix bch address format * fix wallet addresses * fix initial fetching amount. * Update address_validator.dart * review comments * revert switch case to return null * minor fix --------- Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
This commit is contained in:
@@ -268,9 +268,7 @@ class BackupService {
|
||||
final currentFiatCurrency = data[PreferencesKey.currentFiatCurrencyKey] as String?;
|
||||
final shouldSaveRecipientAddress = data[PreferencesKey.shouldSaveRecipientAddressKey] as bool?;
|
||||
final isAppSecure = data[PreferencesKey.isAppSecureKey] as bool?;
|
||||
final disableBuy = data[PreferencesKey.disableBuyKey] as bool?;
|
||||
final disableSell = data[PreferencesKey.disableSellKey] as bool?;
|
||||
final defaultBuyProvider = data[PreferencesKey.defaultBuyProvider] as int?;
|
||||
final disableTradeOption = data[PreferencesKey.disableTradeOption] as bool?;
|
||||
final currentTransactionPriorityKeyLegacy =
|
||||
data[PreferencesKey.currentTransactionPriorityKeyLegacy] as int?;
|
||||
final currentBitcoinElectrumSererId =
|
||||
@@ -323,14 +321,8 @@ class BackupService {
|
||||
if (isAppSecure != null)
|
||||
await _sharedPreferences.setBool(PreferencesKey.isAppSecureKey, isAppSecure);
|
||||
|
||||
if (disableBuy != null)
|
||||
await _sharedPreferences.setBool(PreferencesKey.disableBuyKey, disableBuy);
|
||||
|
||||
if (disableSell != null)
|
||||
await _sharedPreferences.setBool(PreferencesKey.disableSellKey, disableSell);
|
||||
|
||||
if (defaultBuyProvider != null)
|
||||
await _sharedPreferences.setInt(PreferencesKey.defaultBuyProvider, defaultBuyProvider);
|
||||
if (disableTradeOption != null)
|
||||
await _sharedPreferences.setBool(PreferencesKey.disableTradeOption, disableTradeOption);
|
||||
|
||||
if (currentTransactionPriorityKeyLegacy != null)
|
||||
await _sharedPreferences.setInt(
|
||||
@@ -516,10 +508,7 @@ class BackupService {
|
||||
_sharedPreferences.getString(PreferencesKey.currentFiatCurrencyKey),
|
||||
PreferencesKey.shouldSaveRecipientAddressKey:
|
||||
_sharedPreferences.getBool(PreferencesKey.shouldSaveRecipientAddressKey),
|
||||
PreferencesKey.disableBuyKey: _sharedPreferences.getBool(PreferencesKey.disableBuyKey),
|
||||
PreferencesKey.disableSellKey: _sharedPreferences.getBool(PreferencesKey.disableSellKey),
|
||||
PreferencesKey.defaultBuyProvider:
|
||||
_sharedPreferences.getInt(PreferencesKey.defaultBuyProvider),
|
||||
PreferencesKey.disableTradeOption: _sharedPreferences.getBool(PreferencesKey.disableTradeOption),
|
||||
PreferencesKey.currentPinLength: _sharedPreferences.getInt(PreferencesKey.currentPinLength),
|
||||
PreferencesKey.currentTransactionPriorityKeyLegacy:
|
||||
_sharedPreferences.getInt(PreferencesKey.currentTransactionPriorityKeyLegacy),
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
abstract class SelectableItem {
|
||||
SelectableItem({required this.title});
|
||||
final String title;
|
||||
}
|
||||
|
||||
class OptionTitle extends SelectableItem {
|
||||
OptionTitle({required String title}) : super(title: title);
|
||||
|
||||
}
|
||||
|
||||
abstract class SelectableOption extends SelectableItem {
|
||||
SelectableOption({required String title}) : super(title: title);
|
||||
|
||||
String get lightIconPath;
|
||||
|
||||
String get darkIconPath;
|
||||
|
||||
String? get description => null;
|
||||
|
||||
String? get topLeftSubTitle => null;
|
||||
|
||||
String? get topLeftSubTitleIconPath => null;
|
||||
|
||||
String? get topRightSubTitle => null;
|
||||
|
||||
String? get topRightSubTitleLightIconPath => null;
|
||||
|
||||
String? get topRightSubTitleDarkIconPath => null;
|
||||
|
||||
String? get bottomLeftSubTitle => null;
|
||||
|
||||
String? get bottomLeftSubTitleIconPath => null;
|
||||
|
||||
String? get bottomRightSubTitle => null;
|
||||
|
||||
String? get bottomRightSubTitleLightIconPath => null;
|
||||
|
||||
String? get bottomRightSubTitleDarkIconPath => null;
|
||||
|
||||
List<String> get badges => [];
|
||||
|
||||
bool get isOptionSelected => false;
|
||||
|
||||
set isOptionSelected(bool isSelected) => false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user