mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-09 12:29:31 +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 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 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 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);
|
||||
|
@ -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 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 satoshis = CryptoCurrency(title: 'sats', fullName: 'Satoshis', raw: 91, name: 'sats', iconPath: 'assets/images/lightning_logo.png', decimals: 0);
|
||||
|
||||
|
||||
|
||||
static final Map<int, CryptoCurrency> _rawCurrencyMap =
|
||||
[...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<TorPage>(() => TorPage(getIt.get<AppStore>()));
|
||||
|
||||
|
||||
getIt.registerFactory<LightningViewModel>(() => LightningViewModel());
|
||||
getIt.registerFactoryParam<LightningInvoicePageViewModel, List<dynamic>, void>((args, _) {
|
||||
final pageOption = args.first as ReceivePageOption;
|
||||
return LightningInvoicePageViewModel(
|
||||
getIt.get<SettingsStore>(),
|
||||
getIt.get<AppStore>().wallet!,
|
||||
getIt.get<SharedPreferences>(),
|
||||
LightningViewModel(),
|
||||
getIt.get<LightningViewModel>(),
|
||||
pageOption,
|
||||
);
|
||||
});
|
||||
|
@ -1221,7 +1223,7 @@ Future<void> setup({
|
|||
final pageOption = args.last as ReceivePageOption;
|
||||
return LightningReceiveOnchainPage(
|
||||
addressListViewModel: getIt.get<WalletAddressListViewModel>(),
|
||||
lightningViewModel: LightningViewModel(),
|
||||
lightningViewModel: getIt.get<LightningViewModel>(),
|
||||
receiveOptionViewModel: getIt.get<ReceiveOptionViewModel>(param1: pageOption));
|
||||
});
|
||||
|
||||
|
@ -1229,7 +1231,7 @@ Future<void> setup({
|
|||
final pageOption = args.last as ReceivePageOption;
|
||||
return LightningInvoicePage(
|
||||
lightningInvoicePageViewModel: getIt.get<LightningInvoicePageViewModel>(param1: args),
|
||||
lightningViewModel: LightningViewModel(),
|
||||
lightningViewModel: getIt.get<LightningViewModel>(),
|
||||
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';
|
||||
|
||||
class AnonpayCurrencyInputField extends StatelessWidget {
|
||||
const AnonpayCurrencyInputField(
|
||||
{super.key,
|
||||
this.onTapPicker,
|
||||
required this.selectedCurrency,
|
||||
required this.focusNode,
|
||||
required this.controller,
|
||||
required this.minAmount,
|
||||
required this.maxAmount});
|
||||
const AnonpayCurrencyInputField({
|
||||
super.key,
|
||||
this.onTapPicker,
|
||||
required this.selectedCurrency,
|
||||
required this.focusNode,
|
||||
required this.controller,
|
||||
required this.minAmount,
|
||||
required this.maxAmount,
|
||||
});
|
||||
final Function()? onTapPicker;
|
||||
final Currency selectedCurrency;
|
||||
final FocusNode focusNode;
|
||||
|
|
|
@ -46,7 +46,7 @@ class LightningInvoiceForm extends StatelessWidget {
|
|||
focusNode: depositAmountFocus,
|
||||
maxAmount: '',
|
||||
minAmount: (lightningInvoicePageViewModel.minimum != null) ? satsToLightningString(lightningInvoicePageViewModel.minimum!.round()) : '...',
|
||||
selectedCurrency: CryptoCurrency.satoshis,
|
||||
selectedCurrency: CryptoCurrency.btcln,
|
||||
);
|
||||
}),
|
||||
SizedBox(
|
||||
|
|
Loading…
Reference in a new issue