mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-16 17:27:37 +00:00
Fix monero transaction history. Remove morph and xmr.to from filters. Fixe generation monero blockchain height by date.
This commit is contained in:
parent
fff0d81294
commit
4c4c30bd5d
6 changed files with 23 additions and 18 deletions
|
@ -85,7 +85,7 @@ final dates = {
|
||||||
"2020-11": 2220000
|
"2020-11": 2220000
|
||||||
};
|
};
|
||||||
|
|
||||||
int getHeigthByDate({DateTime date}) {
|
int getMoneroHeigthByDate({DateTime date}) {
|
||||||
final raw = '${date.year}' + '-' + '${date.month}';
|
final raw = '${date.year}' + '-' + '${date.month}';
|
||||||
final lastHeight = dates.values.last;
|
final lastHeight = dates.values.last;
|
||||||
int startHeight;
|
int startHeight;
|
||||||
|
|
|
@ -144,7 +144,8 @@ class CWMonero extends Monero {
|
||||||
}
|
}
|
||||||
|
|
||||||
TransactionHistoryBase getTransactionHistory(Object wallet) {
|
TransactionHistoryBase getTransactionHistory(Object wallet) {
|
||||||
return MoneroTransactionHistory();
|
final moneroWallet = wallet as MoneroWallet;
|
||||||
|
return moneroWallet.transactionHistory;
|
||||||
}
|
}
|
||||||
|
|
||||||
MoneroWalletDetails getMoneroWalletDetails(Object wallet) {
|
MoneroWalletDetails getMoneroWalletDetails(Object wallet) {
|
||||||
|
@ -152,7 +153,7 @@ class CWMonero extends Monero {
|
||||||
}
|
}
|
||||||
|
|
||||||
int getHeigthByDate({DateTime date}) {
|
int getHeigthByDate({DateTime date}) {
|
||||||
return getHeigthByDate(date: date);
|
return getMoneroHeigthByDate(date: date);
|
||||||
}
|
}
|
||||||
|
|
||||||
TransactionPriority getDefaultTransactionPriority() {
|
TransactionPriority getDefaultTransactionPriority() {
|
||||||
|
|
|
@ -145,14 +145,14 @@ class DashboardPage extends BasePage {
|
||||||
image: exchangeImage,
|
image: exchangeImage,
|
||||||
title: S.of(context).exchange,
|
title: S.of(context).exchange,
|
||||||
route: Routes.exchange),
|
route: Routes.exchange),
|
||||||
if (isMoneroOnly)
|
if (!isMoneroOnly)
|
||||||
ActionButton(
|
ActionButton(
|
||||||
image: buyImage,
|
image: buyImage,
|
||||||
title: S.of(context).buy,
|
title: S.of(context).buy,
|
||||||
onClick: () async =>
|
onClick: () async =>
|
||||||
await _onClickBuyButton(context),
|
await _onClickBuyButton(context),
|
||||||
),
|
),
|
||||||
if (isMoneroOnly)
|
if (!isMoneroOnly)
|
||||||
ActionButton(
|
ActionButton(
|
||||||
image: sellImage,
|
image: sellImage,
|
||||||
title: 'Sell',
|
title: 'Sell',
|
||||||
|
|
|
@ -104,7 +104,22 @@ class WalletRestorePage extends BasePage {
|
||||||
.dateController.text = '';
|
.dateController.text = '';
|
||||||
});
|
});
|
||||||
|
|
||||||
return Column(mainAxisAlignment: MainAxisAlignment.center, children: [
|
return KeyboardActions(
|
||||||
|
config: KeyboardActionsConfig(
|
||||||
|
keyboardActionsPlatform: KeyboardActionsPlatform.IOS,
|
||||||
|
keyboardBarColor: Theme.of(context).accentTextTheme.body2
|
||||||
|
.backgroundColor,
|
||||||
|
nextFocus: false,
|
||||||
|
actions: [
|
||||||
|
KeyboardActionsItem(
|
||||||
|
focusNode: _blockHeightFocusNode,
|
||||||
|
toolbarButtons: [(_) => KeyboardDoneButton()],
|
||||||
|
)
|
||||||
|
]),
|
||||||
|
child: Container(
|
||||||
|
height: 0,
|
||||||
|
color: Theme.of(context).backgroundColor,
|
||||||
|
child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: PageView.builder(
|
child: PageView.builder(
|
||||||
onPageChanged: (page) {
|
onPageChanged: (page) {
|
||||||
|
@ -146,7 +161,7 @@ class WalletRestorePage extends BasePage {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
))
|
))
|
||||||
]);
|
])));
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> _credentials() {
|
Map<String, dynamic> _credentials() {
|
||||||
|
|
|
@ -118,7 +118,6 @@ class BlockchainHeightState extends State<BlockchainHeightWidget> {
|
||||||
|
|
||||||
if (date != null) {
|
if (date != null) {
|
||||||
final height = monero.getHeigthByDate(date: date);
|
final height = monero.getHeigthByDate(date: date);
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
dateController.text = DateFormat('yyyy-MM-dd').format(date);
|
dateController.text = DateFormat('yyyy-MM-dd').format(date);
|
||||||
restoreHeightController.text = '$height';
|
restoreHeightController.text = '$height';
|
||||||
|
|
|
@ -62,21 +62,11 @@ abstract class DashboardViewModelBase with Store {
|
||||||
// onChanged: null),
|
// onChanged: null),
|
||||||
],
|
],
|
||||||
S.current.trades: [
|
S.current.trades: [
|
||||||
FilterItem(
|
|
||||||
value: () => tradeFilterStore.displayXMRTO,
|
|
||||||
caption: 'XMR.TO',
|
|
||||||
onChanged: (value) => tradeFilterStore
|
|
||||||
.toggleDisplayExchange(ExchangeProviderDescription.xmrto)),
|
|
||||||
FilterItem(
|
FilterItem(
|
||||||
value: () => tradeFilterStore.displayChangeNow,
|
value: () => tradeFilterStore.displayChangeNow,
|
||||||
caption: 'Change.NOW',
|
caption: 'Change.NOW',
|
||||||
onChanged: (value) => tradeFilterStore
|
onChanged: (value) => tradeFilterStore
|
||||||
.toggleDisplayExchange(ExchangeProviderDescription.changeNow)),
|
.toggleDisplayExchange(ExchangeProviderDescription.changeNow)),
|
||||||
FilterItem(
|
|
||||||
value: () => tradeFilterStore.displayMorphToken,
|
|
||||||
caption: 'MorphToken',
|
|
||||||
onChanged: (value) => tradeFilterStore
|
|
||||||
.toggleDisplayExchange(ExchangeProviderDescription.morphToken)),
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue