CWA-220 | blocked possibility to edit address of current wallet in the exchange page; changed displaying subaddress when label is empty

This commit is contained in:
Oleksandr Sobol 2020-06-05 16:07:57 +03:00
parent 289d8dca42
commit 0978792bd5
2 changed files with 11 additions and 14 deletions

View file

@ -304,9 +304,6 @@ class ReceivePageState extends State<ReceivePage> {
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<ReceivePage> {
? '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<ReceivePage> {
),
child: Text(
label,
maxLines: isShortAddressShow ? 1 : 10,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,

View file

@ -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();
}