mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-22 18:54:47 +00:00
nano fixes pt.1
This commit is contained in:
parent
0984dbc3d7
commit
2c9bd6c5da
4 changed files with 3 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
||||||
library cw_ethereum;
|
library cw_nano;
|
||||||
|
|
||||||
/// A Calculator.
|
/// A Calculator.
|
||||||
class Calculator {
|
class Calculator {
|
||||||
|
|
|
@ -3,12 +3,8 @@ import 'package:cw_core/currency.dart';
|
||||||
import 'package:cw_core/monero_amount_format.dart';
|
import 'package:cw_core/monero_amount_format.dart';
|
||||||
import 'package:cw_nano/nano_util.dart';
|
import 'package:cw_nano/nano_util.dart';
|
||||||
|
|
||||||
String rawToFormattedAmount(BigInt amount, Currency currency) {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
BigInt stringAmountToBigInt(String amount) {
|
BigInt stringAmountToBigInt(String amount) {
|
||||||
return BigInt.zero;
|
return BigInt.parse(NanoUtil.getAmountAsRaw(amount, NanoUtil.rawPerNano));
|
||||||
}
|
}
|
||||||
|
|
||||||
class NanoBalance extends Balance {
|
class NanoBalance extends Balance {
|
||||||
|
|
|
@ -133,9 +133,6 @@ abstract class WalletAddressListViewModelBase extends WalletChangeListenerViewMo
|
||||||
_cryptoNumberFormat = NumberFormat(_cryptoNumberPattern),
|
_cryptoNumberFormat = NumberFormat(_cryptoNumberPattern),
|
||||||
hasAccounts =
|
hasAccounts =
|
||||||
appStore.wallet!.type == WalletType.monero || appStore.wallet!.type == WalletType.haven,
|
appStore.wallet!.type == WalletType.monero || appStore.wallet!.type == WalletType.haven,
|
||||||
/* ||
|
|
||||||
appStore.wallet!.type == WalletType.nano ||
|
|
||||||
appStore.wallet!.type == WalletType.banano,*/ // TODO: nano additional accounts disabled for now
|
|
||||||
amount = '',
|
amount = '',
|
||||||
super(appStore: appStore) {
|
super(appStore: appStore) {
|
||||||
_init();
|
_init();
|
||||||
|
|
|
@ -110,7 +110,7 @@ abstract class WalletKeysViewModelBase with Store {
|
||||||
final keys = nano!.getKeys(_appStore.wallet!);
|
final keys = nano!.getKeys(_appStore.wallet!);
|
||||||
|
|
||||||
// we don't necessarily have the seed phrase for nano / banano:
|
// we don't necessarily have the seed phrase for nano / banano:
|
||||||
if (_appStore.wallet!.seed != "") {
|
if (_appStore.wallet!.seed != null) {
|
||||||
items.addAll([
|
items.addAll([
|
||||||
StandartListItem(title: S.current.wallet_seed, value: _appStore.wallet!.seed!),
|
StandartListItem(title: S.current.wallet_seed, value: _appStore.wallet!.seed!),
|
||||||
]);
|
]);
|
||||||
|
|
Loading…
Reference in a new issue