diff --git a/lib/src/screens/receive/receive_page.dart b/lib/src/screens/receive/receive_page.dart index 58260bdbd..2b50e6dd9 100644 --- a/lib/src/screens/receive/receive_page.dart +++ b/lib/src/screens/receive/receive_page.dart @@ -304,9 +304,6 @@ class ReceivePageState extends State { final isCurrent = walletStore.subaddress.address == subaddress.address; - String shortAddress = subaddress.address; - shortAddress = shortAddress.replaceRange(8, shortAddress.length - 8, '...'); - final content = Observer( builder: (_) { final isShortAddressShow = subaddressListStore.isShortAddressShow[index]; @@ -315,7 +312,7 @@ class ReceivePageState extends State { ? 'Primary subaddress' : subaddress.label.isNotEmpty ? subaddress.label - : isShortAddressShow ? shortAddress : subaddress.address; + : subaddress.address; return InkWell( onTap: () => walletStore.setSubaddress(subaddress), @@ -335,6 +332,8 @@ class ReceivePageState extends State { ), child: Text( label, + maxLines: isShortAddressShow ? 1 : 10, + overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: 18, fontWeight: FontWeight.bold, diff --git a/lib/src/stores/exchange/exchange_store.dart b/lib/src/stores/exchange/exchange_store.dart index fe7a32f16..9ac6ef05c 100644 --- a/lib/src/stores/exchange/exchange_store.dart +++ b/lib/src/stores/exchange/exchange_store.dart @@ -33,10 +33,8 @@ abstract class ExchangeStoreBase with Store { provider = initialProvider; depositCurrency = initialDepositCurrency; receiveCurrency = initialReceiveCurrency; - /*isDepositAddressEnabled = !(depositCurrency == walletStore.type); - isReceiveAddressEnabled = !(receiveCurrency == walletStore.type);*/ - isDepositAddressEnabled = true; - isReceiveAddressEnabled = true; + isDepositAddressEnabled = !(depositCurrency == walletStore.type); + isReceiveAddressEnabled = !(receiveCurrency == walletStore.type); depositAmount = ''; receiveAmount = ''; depositAddress = ''; @@ -109,16 +107,16 @@ abstract class ExchangeStoreBase with Store { void changeDepositCurrency({CryptoCurrency currency}) { depositCurrency = currency; _onPairChange(); - /*isDepositAddressEnabled = !(depositCurrency == walletStore.type); - isReceiveAddressEnabled = !(receiveCurrency == walletStore.type);*/ + isDepositAddressEnabled = !(depositCurrency == walletStore.type); + isReceiveAddressEnabled = !(receiveCurrency == walletStore.type); } @action void changeReceiveCurrency({CryptoCurrency currency}) { receiveCurrency = currency; _onPairChange(); - /*isDepositAddressEnabled = !(depositCurrency == walletStore.type); - isReceiveAddressEnabled = !(receiveCurrency == walletStore.type);*/ + isDepositAddressEnabled = !(depositCurrency == walletStore.type); + isReceiveAddressEnabled = !(receiveCurrency == walletStore.type); } @action @@ -242,8 +240,8 @@ abstract class ExchangeStoreBase with Store { receiveCurrency = CryptoCurrency.btc; depositAddress = depositCurrency == walletStore.type ? walletStore.address : ''; receiveAddress = receiveCurrency == walletStore.type ? walletStore.address : ''; - /*isDepositAddressEnabled = !(depositCurrency == walletStore.type); - isReceiveAddressEnabled = !(receiveCurrency == walletStore.type);*/ + isDepositAddressEnabled = !(depositCurrency == walletStore.type); + isReceiveAddressEnabled = !(receiveCurrency == walletStore.type); _onPairChange(); }