Fix monero transaction history. Remove morph and xmr.to from filters. Fixe generation monero blockchain height by date.
M committed
Dec 31, 2021 at 15:05 UTC
4c4c30bd5d5202c0cb09c5a78bd663c13f2448df
6 files changed
+23
-18
cw_monero/lib/get_height_by_date.dart
+1
-1
@@ -85,7 +85,7 @@ final dates = {
85
"2020-11": 2220000
86
};
87
88
-int getHeigthByDate({DateTime date}) {
88
+int getMoneroHeigthByDate({DateTime date}) {
89
final raw = '${date.year}' + '-' + '${date.month}';
90
final lastHeight = dates.values.last;
91
int startHeight;
lib/monero/cw_monero.dart
+3
-2
@@ -144,7 +144,8 @@ class CWMonero extends Monero {
144
}
145
146
TransactionHistoryBase getTransactionHistory(Object wallet) {
147
- return MoneroTransactionHistory();
147
+ final moneroWallet = wallet as MoneroWallet;
148
+ return moneroWallet.transactionHistory;
149
}
150
151
MoneroWalletDetails getMoneroWalletDetails(Object wallet) {
@@ -152,7 +153,7 @@ class CWMonero extends Monero {
153
}
154
155
int getHeigthByDate({DateTime date}) {
155
- return getHeigthByDate(date: date);
156
+ return getMoneroHeigthByDate(date: date);
157
}
158
159
TransactionPriority getDefaultTransactionPriority() {
lib/src/screens/dashboard/dashboard_page.dart
+2
-2
@@ -145,14 +145,14 @@ class DashboardPage extends BasePage {
145
image: exchangeImage,
146
title: S.of(context).exchange,
147
route: Routes.exchange),
148
- if (isMoneroOnly)
148
+ if (!isMoneroOnly)
149
ActionButton(
150
image: buyImage,
151
title: S.of(context).buy,
152
onClick: () async =>
153
await _onClickBuyButton(context),
154
),
155
- if (isMoneroOnly)
155
+ if (!isMoneroOnly)
156
ActionButton(
157
image: sellImage,
158
title: 'Sell',
lib/src/screens/restore/wallet_restore_page.dart
+17
-2
@@ -104,7 +104,22 @@ class WalletRestorePage extends BasePage {
104
.dateController.text = '';
105
});
106
107
- return Column(mainAxisAlignment: MainAxisAlignment.center, children: [
107
+ return KeyboardActions(
108
+ config: KeyboardActionsConfig(
109
+ keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
110
+ keyboardBarColor: Theme.of(context).accentTextTheme.body2
111
+ .backgroundColor,
112
+ nextFocus: false,
113
+ actions: [
114
+ KeyboardActionsItem(
115
+ focusNode: _blockHeightFocusNode,
116
+ toolbarButtons: [(_) => KeyboardDoneButton()],
117
+ )
118
+ ]),
119
+ child: Container(
120
+ height: 0,
121
+ color: Theme.of(context).backgroundColor,
122
+ child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [
123
Expanded(
124
child: PageView.builder(
125
onPageChanged: (page) {
@@ -146,7 +161,7 @@ class WalletRestorePage extends BasePage {
161
);
162
},
163
))
149
- ]);
164
+ ])));
165
}
166
167
Map<String, dynamic> _credentials() {
lib/src/widgets/blockchain_height_widget.dart
-1
@@ -118,7 +118,6 @@ class BlockchainHeightState extends State<BlockchainHeightWidget> {
118
119
if (date != null) {
120
final height = monero.getHeigthByDate(date: date);
121
-
121
setState(() {
122
dateController.text = DateFormat('yyyy-MM-dd').format(date);
123
restoreHeightController.text = '$height';
lib/view_model/dashboard/dashboard_view_model.dart
-10
@@ -62,21 +62,11 @@ abstract class DashboardViewModelBase with Store {
62
// onChanged: null),
63
],
64
S.current.trades: [
65
- FilterItem(
66
- value: () => tradeFilterStore.displayXMRTO,
67
- caption: 'XMR.TO',
68
- onChanged: (value) => tradeFilterStore
69
- .toggleDisplayExchange(ExchangeProviderDescription.xmrto)),
65
FilterItem(
66
value: () => tradeFilterStore.displayChangeNow,
67
caption: 'Change.NOW',
68
onChanged: (value) => tradeFilterStore
69
.toggleDisplayExchange(ExchangeProviderDescription.changeNow)),
75
- FilterItem(
76
- value: () => tradeFilterStore.displayMorphToken,
77
- caption: 'MorphToken',
78
- onChanged: (value) => tradeFilterStore
79
- .toggleDisplayExchange(ExchangeProviderDescription.morphToken)),
70
]
71
};
72