chain network name display fixed
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:pshared/models/payment/chain_network.dart';
|
||||
import 'package:pshared/utils/currency.dart';
|
||||
import 'package:pshared/utils/l10n/chain.dart';
|
||||
|
||||
import 'package:pweb/models/wallet.dart';
|
||||
import 'package:pweb/pages/wallet_top_up/details.dart';
|
||||
@@ -25,7 +27,10 @@ class WalletTopUpContent extends StatelessWidget {
|
||||
final theme = Theme.of(context);
|
||||
|
||||
final address = _resolveAddress(wallet);
|
||||
final network = wallet.network?.trim();
|
||||
final network = wallet.network;
|
||||
final networkLabel = (network == null || network == ChainNetwork.unspecified)
|
||||
? null
|
||||
: network.localizedName(context);
|
||||
final assetLabel = wallet.tokenSymbol ?? currencyCodeToSymbol(wallet.currency);
|
||||
|
||||
return Align(
|
||||
@@ -51,7 +56,7 @@ class WalletTopUpContent extends StatelessWidget {
|
||||
SizedBox(height: dimensions.paddingLarge),
|
||||
WalletTopUpMeta(
|
||||
assetLabel: assetLabel,
|
||||
network: network,
|
||||
network: networkLabel,
|
||||
walletId: wallet.walletUserID,
|
||||
),
|
||||
SizedBox(height: dimensions.paddingXLarge),
|
||||
|
||||
@@ -20,7 +20,7 @@ class WalletTopUpHeader extends StatelessWidget {
|
||||
final symbol = tokenSymbol?.trim();
|
||||
|
||||
final subtitle = [
|
||||
'Crypto Wallet',
|
||||
loc.paymentTypeCryptoWallet,
|
||||
if (symbol != null && symbol.isNotEmpty) symbol,
|
||||
].join(' · ');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user