mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-03-22 15:19:02 +00:00
review fixes
This commit is contained in:
parent
86768c5fe9
commit
0f96e381e6
4 changed files with 16 additions and 16 deletions
|
@ -187,7 +187,7 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen
|
||||||
static const scrt = CryptoCurrency(title: 'SCRT', fullName: 'Secret Network', raw: 59, name: 'scrt', iconPath: 'assets/images/scrt_icon.png', decimals: 6);
|
static const scrt = CryptoCurrency(title: 'SCRT', fullName: 'Secret Network', raw: 59, name: 'scrt', iconPath: 'assets/images/scrt_icon.png', decimals: 6);
|
||||||
static const uni = CryptoCurrency(title: 'UNI', tag: 'ETH', fullName: 'Uniswap', raw: 60, name: 'uni', iconPath: 'assets/images/uni_icon.png', decimals: 18);
|
static const uni = CryptoCurrency(title: 'UNI', tag: 'ETH', fullName: 'Uniswap', raw: 60, name: 'uni', iconPath: 'assets/images/uni_icon.png', decimals: 18);
|
||||||
static const stx = CryptoCurrency(title: 'STX', fullName: 'Stacks', raw: 61, name: 'stx', iconPath: 'assets/images/stx_icon.png', decimals: 8);
|
static const stx = CryptoCurrency(title: 'STX', fullName: 'Stacks', raw: 61, name: 'stx', iconPath: 'assets/images/stx_icon.png', decimals: 8);
|
||||||
static const btcln = CryptoCurrency(title: 'sats', tag: 'LN', fullName: 'Bitcoin Lightning Network', raw: 62, name: 'btcln', iconPath: 'assets/images/lightning_logo.png', decimals: 8);
|
static const btcln = CryptoCurrency(title: 'sats', tag: 'LN', fullName: 'Bitcoin Lightning Network', raw: 62, name: 'sats', iconPath: 'assets/images/lightning_logo.png', decimals: 8);
|
||||||
static const shib = CryptoCurrency(title: 'SHIB', tag: 'ETH', fullName: 'Shiba Inu', raw: 63, name: 'shib', iconPath: 'assets/images/shib_icon.png', decimals: 18);
|
static const shib = CryptoCurrency(title: 'SHIB', tag: 'ETH', fullName: 'Shiba Inu', raw: 63, name: 'shib', iconPath: 'assets/images/shib_icon.png', decimals: 18);
|
||||||
static const aave = CryptoCurrency(title: 'AAVE', tag: 'ETH', fullName: 'Aave', raw: 64, name: 'aave', iconPath: 'assets/images/aave_icon.png', decimals: 18);
|
static const aave = CryptoCurrency(title: 'AAVE', tag: 'ETH', fullName: 'Aave', raw: 64, name: 'aave', iconPath: 'assets/images/aave_icon.png', decimals: 18);
|
||||||
static const arb = CryptoCurrency(title: 'ARB', fullName: 'Arbitrum', raw: 65, name: 'arb', iconPath: 'assets/images/arb_icon.png', decimals: 18);
|
static const arb = CryptoCurrency(title: 'ARB', fullName: 'Arbitrum', raw: 65, name: 'arb', iconPath: 'assets/images/arb_icon.png', decimals: 18);
|
||||||
|
@ -217,9 +217,6 @@ class CryptoCurrency extends EnumerableItem<int> with Serializable<int> implemen
|
||||||
static const kaspa = CryptoCurrency(title: 'KAS', fullName: 'Kaspa', raw: 89, name: 'kas', iconPath: 'assets/images/kaspa_icon.png', decimals: 8);
|
static const kaspa = CryptoCurrency(title: 'KAS', fullName: 'Kaspa', raw: 89, name: 'kas', iconPath: 'assets/images/kaspa_icon.png', decimals: 8);
|
||||||
static const digibyte = CryptoCurrency(title: 'DGB', fullName: 'DigiByte', raw: 90, name: 'dgb', iconPath: 'assets/images/digibyte.png', decimals: 8);
|
static const digibyte = CryptoCurrency(title: 'DGB', fullName: 'DigiByte', raw: 90, name: 'dgb', iconPath: 'assets/images/digibyte.png', decimals: 8);
|
||||||
static const usdtSol = CryptoCurrency(title: 'USDT', tag: 'SOL', fullName: 'USDT Tether', raw: 90, name: 'usdtsol', iconPath: 'assets/images/usdt_icon.png', decimals: 6);
|
static const usdtSol = CryptoCurrency(title: 'USDT', tag: 'SOL', fullName: 'USDT Tether', raw: 90, name: 'usdtsol', iconPath: 'assets/images/usdt_icon.png', decimals: 6);
|
||||||
static const satoshis = CryptoCurrency(title: 'sats', fullName: 'Satoshis', raw: 91, name: 'sats', iconPath: 'assets/images/lightning_logo.png', decimals: 0);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static final Map<int, CryptoCurrency> _rawCurrencyMap =
|
static final Map<int, CryptoCurrency> _rawCurrencyMap =
|
||||||
[...all, ...havenCurrencies].fold<Map<int, CryptoCurrency>>(<int, CryptoCurrency>{}, (acc, item) {
|
[...all, ...havenCurrencies].fold<Map<int, CryptoCurrency>>(<int, CryptoCurrency>{}, (acc, item) {
|
||||||
|
|
|
@ -1205,13 +1205,15 @@ Future<void> setup({
|
||||||
getIt.registerFactory(() => NFTViewModel(appStore, getIt.get<BottomSheetService>()));
|
getIt.registerFactory(() => NFTViewModel(appStore, getIt.get<BottomSheetService>()));
|
||||||
getIt.registerFactory<TorPage>(() => TorPage(getIt.get<AppStore>()));
|
getIt.registerFactory<TorPage>(() => TorPage(getIt.get<AppStore>()));
|
||||||
|
|
||||||
|
|
||||||
|
getIt.registerFactory<LightningViewModel>(() => LightningViewModel());
|
||||||
getIt.registerFactoryParam<LightningInvoicePageViewModel, List<dynamic>, void>((args, _) {
|
getIt.registerFactoryParam<LightningInvoicePageViewModel, List<dynamic>, void>((args, _) {
|
||||||
final pageOption = args.first as ReceivePageOption;
|
final pageOption = args.first as ReceivePageOption;
|
||||||
return LightningInvoicePageViewModel(
|
return LightningInvoicePageViewModel(
|
||||||
getIt.get<SettingsStore>(),
|
getIt.get<SettingsStore>(),
|
||||||
getIt.get<AppStore>().wallet!,
|
getIt.get<AppStore>().wallet!,
|
||||||
getIt.get<SharedPreferences>(),
|
getIt.get<SharedPreferences>(),
|
||||||
LightningViewModel(),
|
getIt.get<LightningViewModel>(),
|
||||||
pageOption,
|
pageOption,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -1221,7 +1223,7 @@ Future<void> setup({
|
||||||
final pageOption = args.last as ReceivePageOption;
|
final pageOption = args.last as ReceivePageOption;
|
||||||
return LightningReceiveOnchainPage(
|
return LightningReceiveOnchainPage(
|
||||||
addressListViewModel: getIt.get<WalletAddressListViewModel>(),
|
addressListViewModel: getIt.get<WalletAddressListViewModel>(),
|
||||||
lightningViewModel: LightningViewModel(),
|
lightningViewModel: getIt.get<LightningViewModel>(),
|
||||||
receiveOptionViewModel: getIt.get<ReceiveOptionViewModel>(param1: pageOption));
|
receiveOptionViewModel: getIt.get<ReceiveOptionViewModel>(param1: pageOption));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1229,7 +1231,7 @@ Future<void> setup({
|
||||||
final pageOption = args.last as ReceivePageOption;
|
final pageOption = args.last as ReceivePageOption;
|
||||||
return LightningInvoicePage(
|
return LightningInvoicePage(
|
||||||
lightningInvoicePageViewModel: getIt.get<LightningInvoicePageViewModel>(param1: args),
|
lightningInvoicePageViewModel: getIt.get<LightningInvoicePageViewModel>(param1: args),
|
||||||
lightningViewModel: LightningViewModel(),
|
lightningViewModel: getIt.get<LightningViewModel>(),
|
||||||
receiveOptionViewModel: getIt.get<ReceiveOptionViewModel>(param1: pageOption));
|
receiveOptionViewModel: getIt.get<ReceiveOptionViewModel>(param1: pageOption));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -7,14 +7,15 @@ import 'package:flutter/services.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
|
import 'package:cake_wallet/themes/extensions/send_page_theme.dart';
|
||||||
|
|
||||||
class AnonpayCurrencyInputField extends StatelessWidget {
|
class AnonpayCurrencyInputField extends StatelessWidget {
|
||||||
const AnonpayCurrencyInputField(
|
const AnonpayCurrencyInputField({
|
||||||
{super.key,
|
super.key,
|
||||||
this.onTapPicker,
|
this.onTapPicker,
|
||||||
required this.selectedCurrency,
|
required this.selectedCurrency,
|
||||||
required this.focusNode,
|
required this.focusNode,
|
||||||
required this.controller,
|
required this.controller,
|
||||||
required this.minAmount,
|
required this.minAmount,
|
||||||
required this.maxAmount});
|
required this.maxAmount,
|
||||||
|
});
|
||||||
final Function()? onTapPicker;
|
final Function()? onTapPicker;
|
||||||
final Currency selectedCurrency;
|
final Currency selectedCurrency;
|
||||||
final FocusNode focusNode;
|
final FocusNode focusNode;
|
||||||
|
|
|
@ -46,7 +46,7 @@ class LightningInvoiceForm extends StatelessWidget {
|
||||||
focusNode: depositAmountFocus,
|
focusNode: depositAmountFocus,
|
||||||
maxAmount: '',
|
maxAmount: '',
|
||||||
minAmount: (lightningInvoicePageViewModel.minimum != null) ? satsToLightningString(lightningInvoicePageViewModel.minimum!.round()) : '...',
|
minAmount: (lightningInvoicePageViewModel.minimum != null) ? satsToLightningString(lightningInvoicePageViewModel.minimum!.round()) : '...',
|
||||||
selectedCurrency: CryptoCurrency.satoshis,
|
selectedCurrency: CryptoCurrency.btcln,
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
|
Loading…
Reference in a new issue