mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-02-03 03:36:39 +00:00
CAKE-103 | added hasRefundAddress parameter to exchange card; applied refund address to deposit card on the exchange page
This commit is contained in:
parent
b506f9c953
commit
468ad82b37
3 changed files with 17 additions and 14 deletions
|
@ -173,6 +173,7 @@ class ExchangePage extends BasePage {
|
||||||
initialIsAddressEditable:
|
initialIsAddressEditable:
|
||||||
exchangeViewModel.isDepositAddressEnabled,
|
exchangeViewModel.isDepositAddressEnabled,
|
||||||
isAmountEstimated: false,
|
isAmountEstimated: false,
|
||||||
|
hasRefundAddress: true,
|
||||||
currencies: CryptoCurrency.all,
|
currencies: CryptoCurrency.all,
|
||||||
onCurrencySelected: (currency) =>
|
onCurrencySelected: (currency) =>
|
||||||
exchangeViewModel.changeDepositCurrency(
|
exchangeViewModel.changeDepositCurrency(
|
||||||
|
|
|
@ -18,6 +18,7 @@ class ExchangeCard extends StatefulWidget {
|
||||||
this.initialIsAmountEditable,
|
this.initialIsAmountEditable,
|
||||||
this.initialIsAddressEditable,
|
this.initialIsAddressEditable,
|
||||||
this.isAmountEstimated,
|
this.isAmountEstimated,
|
||||||
|
this.hasRefundAddress = false,
|
||||||
this.currencies,
|
this.currencies,
|
||||||
this.onCurrencySelected,
|
this.onCurrencySelected,
|
||||||
this.imageArrow,
|
this.imageArrow,
|
||||||
|
@ -38,6 +39,7 @@ class ExchangeCard extends StatefulWidget {
|
||||||
final bool initialIsAmountEditable;
|
final bool initialIsAmountEditable;
|
||||||
final bool initialIsAddressEditable;
|
final bool initialIsAddressEditable;
|
||||||
final bool isAmountEstimated;
|
final bool isAmountEstimated;
|
||||||
|
final bool hasRefundAddress;
|
||||||
final Image imageArrow;
|
final Image imageArrow;
|
||||||
final Color currencyButtonColor;
|
final Color currencyButtonColor;
|
||||||
final Color addressButtonsColor;
|
final Color addressButtonsColor;
|
||||||
|
@ -228,18 +230,18 @@ class ExchangeCardState extends State<ExchangeCard> {
|
||||||
: Offstage(),
|
: Offstage(),
|
||||||
]),
|
]),
|
||||||
),
|
),
|
||||||
_isAddressEditable
|
!_isAddressEditable && widget.hasRefundAddress
|
||||||
? Offstage()
|
? Padding(
|
||||||
: Padding(
|
padding: EdgeInsets.only(top: 20),
|
||||||
padding: EdgeInsets.only(top: 20),
|
child: Text(
|
||||||
child: Text(
|
S.of(context).refund_address,
|
||||||
S.of(context).refund_address,
|
style: TextStyle(
|
||||||
style: TextStyle(
|
fontSize: 14,
|
||||||
fontSize: 14,
|
fontWeight: FontWeight.w500,
|
||||||
fontWeight: FontWeight.w500,
|
color:
|
||||||
color:
|
Theme.of(context).textTheme.subhead.decorationColor),
|
||||||
Theme.of(context).textTheme.subhead.decorationColor),
|
))
|
||||||
)),
|
: Offstage(),
|
||||||
_isAddressEditable
|
_isAddressEditable
|
||||||
? Padding(
|
? Padding(
|
||||||
padding: EdgeInsets.only(top: 20),
|
padding: EdgeInsets.only(top: 20),
|
||||||
|
|
|
@ -14,8 +14,8 @@ Future<T> showPopUp<T>({
|
||||||
context: context,
|
context: context,
|
||||||
builder: builder,
|
builder: builder,
|
||||||
barrierDismissible: barrierDismissible,
|
barrierDismissible: barrierDismissible,
|
||||||
//barrierColor: barrierColor,
|
barrierColor: barrierColor,
|
||||||
//useSafeArea: useSafeArea,
|
useSafeArea: useSafeArea,
|
||||||
useRootNavigator: useRootNavigator,
|
useRootNavigator: useRootNavigator,
|
||||||
routeSettings: routeSettings,
|
routeSettings: routeSettings,
|
||||||
child: child);
|
child: child);
|
||||||
|
|
Loading…
Reference in a new issue