mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
* fix android CI * feat: Add Robinhood Chain, all major flows done. minor issue now is our providers don't support it yet as its still pretty early, two weeks from launch * feat: Add Robinhood Chain, all major flows done. minor issue now is our providers don't support it yet as its still pretty early, two weeks from launch * Cleanup * auto-reformat * fix ui issue and contact listing for tokens * fix: missing icons and crash for fee priority in settings * chore: cleanup * fixes from feedbacks * fix: review issues and sync to latest dev feat: switch history api to etherscan, add history toggle to privacy settings, exclude robETH from exchange pickers, skip tokens discovery for chains that moralis hasn't indexed, add tests * fix: address Robinhood review comments * fix: show Solana token icons in history * fix: address review comments and default Robinhood to PublicNode * fix: revert filter and refuse unmapped networks in provider --------- Co-authored-by: Robert Malikowski <malikowskirobert@gmail.com>
78 lines
1.8 KiB
Dart
78 lines
1.8 KiB
Dart
import 'package:cw_core/wallet_type.dart';
|
|
|
|
bool isBIP39Wallet(WalletType walletType) {
|
|
switch (walletType) {
|
|
case WalletType.ethereum:
|
|
case WalletType.polygon:
|
|
case WalletType.base:
|
|
case WalletType.arbitrum:
|
|
case WalletType.bsc:
|
|
case WalletType.robinhood:
|
|
case WalletType.solana:
|
|
case WalletType.tron:
|
|
case WalletType.bitcoin:
|
|
case WalletType.litecoin:
|
|
case WalletType.bitcoinCash:
|
|
case WalletType.nano:
|
|
case WalletType.banano:
|
|
case WalletType.monero:
|
|
case WalletType.dogecoin:
|
|
case WalletType.zcash:
|
|
case WalletType.zano:
|
|
case WalletType.decred:
|
|
return true;
|
|
case WalletType.wownero:
|
|
case WalletType.haven:
|
|
case WalletType.none:
|
|
return false;
|
|
}
|
|
}
|
|
|
|
bool isElectrumWallet(WalletType walletType) {
|
|
switch (walletType) {
|
|
case WalletType.bitcoin:
|
|
case WalletType.litecoin:
|
|
case WalletType.bitcoinCash:
|
|
case WalletType.dogecoin:
|
|
return true;
|
|
default:
|
|
return false;
|
|
}
|
|
}
|
|
|
|
bool hasTokens(WalletType walletType) {
|
|
switch (walletType) {
|
|
case WalletType.ethereum:
|
|
case WalletType.polygon:
|
|
case WalletType.solana:
|
|
case WalletType.tron:
|
|
case WalletType.zano:
|
|
case WalletType.base:
|
|
case WalletType.arbitrum:
|
|
case WalletType.bsc:
|
|
case WalletType.robinhood:
|
|
return true;
|
|
default:
|
|
return false;
|
|
}
|
|
}
|
|
|
|
String tokenStandardFor(WalletType walletType) {
|
|
switch (walletType) {
|
|
case WalletType.ethereum:
|
|
case WalletType.polygon:
|
|
case WalletType.arbitrum:
|
|
case WalletType.base:
|
|
case WalletType.robinhood:
|
|
return 'ERC-20';
|
|
case WalletType.bsc:
|
|
return 'BEP-20';
|
|
case WalletType.solana:
|
|
return 'SPL';
|
|
case WalletType.tron:
|
|
return 'TRC-20';
|
|
default:
|
|
return walletTypeToString(walletType);
|
|
}
|
|
}
|