mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
CAKE-103 | added hasRefundAddress parameter to exchange card; applied refund address to deposit card on the exchange page
This commit is contained in:
@@ -173,6 +173,7 @@ class ExchangePage extends BasePage {
|
||||
initialIsAddressEditable:
|
||||
exchangeViewModel.isDepositAddressEnabled,
|
||||
isAmountEstimated: false,
|
||||
hasRefundAddress: true,
|
||||
currencies: CryptoCurrency.all,
|
||||
onCurrencySelected: (currency) =>
|
||||
exchangeViewModel.changeDepositCurrency(
|
||||
|
||||
@@ -18,6 +18,7 @@ class ExchangeCard extends StatefulWidget {
|
||||
this.initialIsAmountEditable,
|
||||
this.initialIsAddressEditable,
|
||||
this.isAmountEstimated,
|
||||
this.hasRefundAddress = false,
|
||||
this.currencies,
|
||||
this.onCurrencySelected,
|
||||
this.imageArrow,
|
||||
@@ -38,6 +39,7 @@ class ExchangeCard extends StatefulWidget {
|
||||
final bool initialIsAmountEditable;
|
||||
final bool initialIsAddressEditable;
|
||||
final bool isAmountEstimated;
|
||||
final bool hasRefundAddress;
|
||||
final Image imageArrow;
|
||||
final Color currencyButtonColor;
|
||||
final Color addressButtonsColor;
|
||||
@@ -228,18 +230,18 @@ class ExchangeCardState extends State<ExchangeCard> {
|
||||
: Offstage(),
|
||||
]),
|
||||
),
|
||||
_isAddressEditable
|
||||
? Offstage()
|
||||
: Padding(
|
||||
padding: EdgeInsets.only(top: 20),
|
||||
child: Text(
|
||||
S.of(context).refund_address,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color:
|
||||
Theme.of(context).textTheme.subhead.decorationColor),
|
||||
)),
|
||||
!_isAddressEditable && widget.hasRefundAddress
|
||||
? Padding(
|
||||
padding: EdgeInsets.only(top: 20),
|
||||
child: Text(
|
||||
S.of(context).refund_address,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color:
|
||||
Theme.of(context).textTheme.subhead.decorationColor),
|
||||
))
|
||||
: Offstage(),
|
||||
_isAddressEditable
|
||||
? Padding(
|
||||
padding: EdgeInsets.only(top: 20),
|
||||
|
||||
@@ -14,8 +14,8 @@ Future<T> showPopUp<T>({
|
||||
context: context,
|
||||
builder: builder,
|
||||
barrierDismissible: barrierDismissible,
|
||||
//barrierColor: barrierColor,
|
||||
//useSafeArea: useSafeArea,
|
||||
barrierColor: barrierColor,
|
||||
useSafeArea: useSafeArea,
|
||||
useRootNavigator: useRootNavigator,
|
||||
routeSettings: routeSettings,
|
||||
child: child);
|
||||
|
||||
Reference in New Issue
Block a user