mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-15 09:24:01 +01:00
Generic fixes (#1304)
* fix mobx no element error * fix mobx issue * Remove unused code * Enhance error handling for monero sync failure case * Separate litecoin mnemonic exception from bitcoin * - Enable onramper for polygon - Add Kaspa validation * Set null as the default length of address validation * Modify EVM fee text [skip ci] * Add seed length option to polygon * Add digibyte * Update configure_cake_wallet.sh and fix conflicts * Pin bottom section * Fix Solana missing isTestnet param
This commit is contained in:
@@ -27,11 +27,25 @@ abstract class AdvancedPrivacySettingsViewModelBase with Store {
|
||||
|
||||
final SettingsStore _settingsStore;
|
||||
|
||||
bool get hasSeedPhraseLengthOption =>
|
||||
type == WalletType.bitcoinCash ||
|
||||
type == WalletType.ethereum ||
|
||||
type == WalletType.polygon ||
|
||||
type == WalletType.solana;
|
||||
bool get hasSeedPhraseLengthOption {
|
||||
// convert to switch case so that it give a syntax error when adding a new wallet type
|
||||
// thus we don't forget about it
|
||||
switch (type) {
|
||||
case WalletType.ethereum:
|
||||
case WalletType.bitcoinCash:
|
||||
case WalletType.polygon:
|
||||
case WalletType.solana:
|
||||
return true;
|
||||
case WalletType.monero:
|
||||
case WalletType.none:
|
||||
case WalletType.bitcoin:
|
||||
case WalletType.litecoin:
|
||||
case WalletType.haven:
|
||||
case WalletType.nano:
|
||||
case WalletType.banano:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool get hasSeedTypeOption => type == WalletType.monero;
|
||||
|
||||
|
||||
@@ -15,7 +15,8 @@ class UnspentCoinsListViewModel = UnspentCoinsListViewModelBase with _$UnspentCo
|
||||
abstract class UnspentCoinsListViewModelBase with Store {
|
||||
UnspentCoinsListViewModelBase(
|
||||
{required this.wallet, required Box<UnspentCoinsInfo> unspentCoinsInfo})
|
||||
: _unspentCoinsInfo = unspentCoinsInfo {
|
||||
: _unspentCoinsInfo = unspentCoinsInfo,
|
||||
_items = ObservableList<UnspentCoinsItem>() {
|
||||
_updateUnspentCoinsInfo();
|
||||
_updateUnspents();
|
||||
}
|
||||
@@ -23,7 +24,8 @@ abstract class UnspentCoinsListViewModelBase with Store {
|
||||
WalletBase wallet;
|
||||
final Box<UnspentCoinsInfo> _unspentCoinsInfo;
|
||||
|
||||
final ObservableList<UnspentCoinsItem> _items = ObservableList();
|
||||
@observable
|
||||
ObservableList<UnspentCoinsItem> _items;
|
||||
|
||||
@computed
|
||||
ObservableList<UnspentCoinsItem> get items => _items;
|
||||
|
||||
@@ -20,9 +20,7 @@ abstract class WalletKeysViewModelBase with Store {
|
||||
WalletKeysViewModelBase(this._appStore)
|
||||
: title = _appStore.wallet!.type == WalletType.bitcoin ||
|
||||
_appStore.wallet!.type == WalletType.litecoin ||
|
||||
_appStore.wallet!.type == WalletType.bitcoinCash ||
|
||||
_appStore.wallet!.type == WalletType.ethereum ||
|
||||
_appStore.wallet!.type == WalletType.polygon
|
||||
_appStore.wallet!.type == WalletType.bitcoinCash
|
||||
? S.current.wallet_seed
|
||||
: S.current.wallet_keys,
|
||||
_restoreHeight = _appStore.wallet!.walletInfo.restoreHeight,
|
||||
|
||||
Reference in New Issue
Block a user