mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-18 05:51:34 +02:00
* feat: Pay Anything EVM enahancements * ifx: Add baseEth to address validator switch case * fix: Error detecting other wallet types * feat: Preserve QR amount and other data through evm chain selection flow * Update container color to surfaceContainer * feat: Add support for Bitcoin Lightning Network detection - Identify Base QR codes when scanned - Display all available currencies for network - Enhance detector to recognize lightning addresses * fix: Update token selection for currently selected wallet * fix: Improve token matching logic for EVM networks * feat: Update selected currency when wallet is switched * ui: Add chain badge to the swap confirmation bottomsheet * fix: Asks to switch wallets even if the current wallet type is the same as the QR. Fix merge conflicts too * fix: Handle matching logic internally and general cleanups * fix: Terminate flow if address is not a valid parsed address --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com> Co-authored-by: tuxsudo <tuxsudo@tux.pizza>
62 lines
2.0 KiB
Dart
62 lines
2.0 KiB
Dart
import 'package:cw_core/wallet_type.dart';
|
|
|
|
String getQrImage(WalletType type) {
|
|
switch (type) {
|
|
case WalletType.ethereum:
|
|
return 'assets/images/eth_chain_qr.svg';
|
|
case WalletType.solana:
|
|
return 'assets/images/sol_chain_qr.svg';
|
|
case WalletType.polygon:
|
|
return 'assets/images/pol_chain_qr.svg';
|
|
case WalletType.tron:
|
|
return 'assets/images/trx_chain_qr.svg';
|
|
case WalletType.zano:
|
|
return 'assets/images/zano_chain_qr.svg';
|
|
case WalletType.monero:
|
|
return 'assets/images/xmr_chain_qr.svg';
|
|
case WalletType.wownero:
|
|
return 'assets/images/wow_chain_qr.svg';
|
|
case WalletType.bitcoin:
|
|
return 'assets/images/btc_chain_qr.svg';
|
|
case WalletType.litecoin:
|
|
return 'assets/images/ltc_chain_qr.svg';
|
|
case WalletType.bitcoinCash:
|
|
return 'assets/images/bch_chain_qr.svg';
|
|
case WalletType.nano:
|
|
return 'assets/images/xno_chain_qr.svg';
|
|
case WalletType.decred:
|
|
return 'assets/images/dcr_chain_qr.svg';
|
|
case WalletType.dogecoin:
|
|
return 'assets/images/doge_chain_qr.svg';
|
|
case WalletType.base:
|
|
return 'assets/images/base_chain_QR.svg';
|
|
case WalletType.arbitrum:
|
|
return 'assets/images/arbitrum_chain_QR.svg';
|
|
case WalletType.banano:
|
|
case WalletType.haven:
|
|
case WalletType.none:
|
|
return 'assets/images/qr-cake.png';
|
|
}
|
|
}
|
|
|
|
String getChainMonoImage(WalletType type) {
|
|
switch (type) {
|
|
case WalletType.ethereum:
|
|
return 'assets/images/eth_chain_mono.svg';
|
|
case WalletType.solana:
|
|
return 'assets/images/sol_chain_mono.svg';
|
|
case WalletType.polygon:
|
|
return 'assets/images/pol_chain_mono.svg';
|
|
case WalletType.tron:
|
|
return 'assets/images/trx_chain_mono.svg';
|
|
case WalletType.zano:
|
|
return 'assets/images/zano_chain_mono.svg';
|
|
case WalletType.base:
|
|
return 'assets/images/base_chain_mono.svg';
|
|
case WalletType.arbitrum:
|
|
return 'assets/images/arbitrum_chain_mono.svg';
|
|
default:
|
|
return 'assets/images/eth_chain_mono.svg';
|
|
}
|
|
}
|