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:
Omar Hatem
2024-02-23 19:09:24 +02:00
committed by GitHub
parent a3a35f05e1
commit cbc0c3afd6
20 changed files with 84 additions and 70 deletions
@@ -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;
+1 -3
View File
@@ -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,