mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-03-12 09:27:01 +00:00
warnings and formatting
This commit is contained in:
parent
0221841ee3
commit
6883f3d093
2 changed files with 17 additions and 17 deletions
|
@ -74,7 +74,7 @@ class MoneroWallet extends CryptonoteWallet with CwBasedInterface {
|
|||
|
||||
@override
|
||||
Address addressFor({required int index, int account = 0}) {
|
||||
String address = (CwBasedInterface.cwWalletBase as MoneroWalletBase)
|
||||
final String address = (CwBasedInterface.cwWalletBase as MoneroWalletBase)
|
||||
.getTransactionAddress(account, index);
|
||||
|
||||
final newReceivingAddress = Address(
|
||||
|
@ -438,7 +438,7 @@ class MoneroWallet extends CryptonoteWallet with CwBasedInterface {
|
|||
// clear blockchain info
|
||||
await mainDB.deleteWalletBlockchainData(walletId);
|
||||
|
||||
var restoreHeight =
|
||||
final restoreHeight =
|
||||
CwBasedInterface.cwWalletBase?.walletInfo.restoreHeight;
|
||||
highestPercentCached = 0;
|
||||
await CwBasedInterface.cwWalletBase?.rescan(height: restoreHeight ?? 0);
|
||||
|
@ -467,7 +467,7 @@ class MoneroWallet extends CryptonoteWallet with CwBasedInterface {
|
|||
.createMoneroWalletService(DB.instance.moneroWalletInfoBox);
|
||||
WalletInfo walletInfo;
|
||||
WalletCredentials credentials;
|
||||
String name = walletId;
|
||||
final String name = walletId;
|
||||
final dirPath =
|
||||
await pathForWalletDir(name: name, type: WalletType.monero);
|
||||
final path = await pathForWallet(name: name, type: WalletType.monero);
|
||||
|
@ -569,12 +569,12 @@ class MoneroWallet extends CryptonoteWallet with CwBasedInterface {
|
|||
isSendAll = true;
|
||||
}
|
||||
|
||||
List<monero_output.Output> outputs = [];
|
||||
final List<monero_output.Output> outputs = [];
|
||||
for (final recipient in txData.recipients!) {
|
||||
final output = monero_output.Output(CwBasedInterface.cwWalletBase!);
|
||||
output.address = recipient.address;
|
||||
output.sendAll = isSendAll;
|
||||
String amountToSend = recipient.amount.decimal.toString();
|
||||
final String amountToSend = recipient.amount.decimal.toString();
|
||||
output.setCryptoAmount(amountToSend);
|
||||
outputs.add(output);
|
||||
}
|
||||
|
@ -594,7 +594,7 @@ class MoneroWallet extends CryptonoteWallet with CwBasedInterface {
|
|||
level: LogLevel.Warning);
|
||||
}
|
||||
|
||||
PendingMoneroTransaction pendingMoneroTransaction =
|
||||
final PendingMoneroTransaction pendingMoneroTransaction =
|
||||
await (awaitPendingTransaction!) as PendingMoneroTransaction;
|
||||
final realFee = Amount.fromDecimal(
|
||||
Decimal.parse(pendingMoneroTransaction.feeFormatted),
|
||||
|
@ -676,7 +676,7 @@ class MoneroWallet extends CryptonoteWallet with CwBasedInterface {
|
|||
?.entries;
|
||||
if (balanceEntries != null) {
|
||||
int bal = 0;
|
||||
for (var element in balanceEntries) {
|
||||
for (final element in balanceEntries) {
|
||||
bal = bal + element.value.fullBalance;
|
||||
}
|
||||
return Amount(
|
||||
|
@ -689,7 +689,7 @@ class MoneroWallet extends CryptonoteWallet with CwBasedInterface {
|
|||
.transactionHistory!
|
||||
.transactions;
|
||||
int transactionBalance = 0;
|
||||
for (var tx in transactions!.entries) {
|
||||
for (final tx in transactions!.entries) {
|
||||
if (tx.value.direction == TransactionDirection.incoming) {
|
||||
transactionBalance += tx.value.amount!;
|
||||
} else {
|
||||
|
|
|
@ -75,7 +75,7 @@ class WowneroWallet extends CryptonoteWallet with CwBasedInterface {
|
|||
|
||||
@override
|
||||
Address addressFor({required int index, int account = 0}) {
|
||||
String address = (CwBasedInterface.cwWalletBase as WowneroWalletBase)
|
||||
final String address = (CwBasedInterface.cwWalletBase as WowneroWalletBase)
|
||||
.getTransactionAddress(account, index);
|
||||
|
||||
final newReceivingAddress = Address(
|
||||
|
@ -257,7 +257,7 @@ class WowneroWallet extends CryptonoteWallet with CwBasedInterface {
|
|||
final List<Tuple2<Transaction, Address?>> txnsData = [];
|
||||
|
||||
if (transactions != null) {
|
||||
for (var tx in transactions.entries) {
|
||||
for (final tx in transactions.entries) {
|
||||
Address? address;
|
||||
TransactionType type;
|
||||
if (tx.value.direction == TransactionDirection.incoming) {
|
||||
|
@ -479,7 +479,7 @@ class WowneroWallet extends CryptonoteWallet with CwBasedInterface {
|
|||
// clear blockchain info
|
||||
await mainDB.deleteWalletBlockchainData(walletId);
|
||||
|
||||
var restoreHeight =
|
||||
final restoreHeight =
|
||||
CwBasedInterface.cwWalletBase?.walletInfo.restoreHeight;
|
||||
highestPercentCached = 0;
|
||||
await CwBasedInterface.cwWalletBase?.rescan(height: restoreHeight ?? 0);
|
||||
|
@ -515,7 +515,7 @@ class WowneroWallet extends CryptonoteWallet with CwBasedInterface {
|
|||
.createWowneroWalletService(DB.instance.moneroWalletInfoBox);
|
||||
WalletInfo walletInfo;
|
||||
WalletCredentials credentials;
|
||||
String name = walletId;
|
||||
final String name = walletId;
|
||||
final dirPath =
|
||||
await pathForWalletDir(name: name, type: WalletType.wownero);
|
||||
final path = await pathForWallet(name: name, type: WalletType.wownero);
|
||||
|
@ -617,13 +617,13 @@ class WowneroWallet extends CryptonoteWallet with CwBasedInterface {
|
|||
isSendAll = true;
|
||||
}
|
||||
|
||||
List<wownero_output.Output> outputs = [];
|
||||
final List<wownero_output.Output> outputs = [];
|
||||
for (final recipient in txData.recipients!) {
|
||||
final output =
|
||||
wownero_output.Output(CwBasedInterface.cwWalletBase!);
|
||||
output.address = recipient.address;
|
||||
output.sendAll = isSendAll;
|
||||
String amountToSend = recipient.amount.decimal.toString();
|
||||
final String amountToSend = recipient.amount.decimal.toString();
|
||||
output.setCryptoAmount(amountToSend);
|
||||
outputs.add(output);
|
||||
}
|
||||
|
@ -643,7 +643,7 @@ class WowneroWallet extends CryptonoteWallet with CwBasedInterface {
|
|||
level: LogLevel.Warning);
|
||||
}
|
||||
|
||||
PendingWowneroTransaction pendingWowneroTransaction =
|
||||
final PendingWowneroTransaction pendingWowneroTransaction =
|
||||
await (awaitPendingTransaction!) as PendingWowneroTransaction;
|
||||
final realFee = Amount.fromDecimal(
|
||||
Decimal.parse(pendingWowneroTransaction.feeFormatted),
|
||||
|
@ -726,7 +726,7 @@ class WowneroWallet extends CryptonoteWallet with CwBasedInterface {
|
|||
?.entries;
|
||||
if (balanceEntries != null) {
|
||||
int bal = 0;
|
||||
for (var element in balanceEntries) {
|
||||
for (final element in balanceEntries) {
|
||||
bal = bal + element.value.fullBalance;
|
||||
}
|
||||
return Amount(
|
||||
|
@ -737,7 +737,7 @@ class WowneroWallet extends CryptonoteWallet with CwBasedInterface {
|
|||
final transactions =
|
||||
CwBasedInterface.cwWalletBase!.transactionHistory!.transactions;
|
||||
int transactionBalance = 0;
|
||||
for (var tx in transactions!.entries) {
|
||||
for (final tx in transactions!.entries) {
|
||||
if (tx.value.direction == TransactionDirection.incoming) {
|
||||
transactionBalance += tx.value.amount!;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue