mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-22 02:34:59 +00:00
fixes from comments
This commit is contained in:
parent
e42cc3febe
commit
355d990df0
4 changed files with 5 additions and 9 deletions
|
@ -30,7 +30,6 @@ List<Transaction> getAllTransactions() {
|
|||
return List.generate(size, (index) => Transaction(txInfo: monero.TransactionHistory_transaction(txhistory!, index: index)));
|
||||
}
|
||||
|
||||
// TODO(mrcyjanek): ...
|
||||
Transaction getTransaction(String txId) {
|
||||
return Transaction(txInfo: monero.TransactionHistory_transactionById(txhistory!, txid: txId));
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ String getSeed() {
|
|||
return legacy;
|
||||
}
|
||||
|
||||
String getAddress({int accountIndex = 0, int addressIndex = 1}) =>
|
||||
String getAddress({int accountIndex = 0, int addressIndex = 0}) =>
|
||||
monero.Wallet_address(wptr!,
|
||||
accountIndex: accountIndex, addressIndex: addressIndex);
|
||||
|
||||
|
@ -103,9 +103,6 @@ void startRefreshSync() {
|
|||
monero.Wallet_startRefresh(wptr!);
|
||||
}
|
||||
|
||||
Future<bool> connectToNode() async {
|
||||
return true;
|
||||
}
|
||||
|
||||
void setRefreshFromBlockHeight({required int height}) =>
|
||||
monero.Wallet_setRefreshFromBlockHeight(wptr!,
|
||||
|
@ -118,7 +115,7 @@ final storeMutex = Mutex();
|
|||
void storeSync() async {
|
||||
await storeMutex.acquire();
|
||||
final addr = wptr!.address;
|
||||
Isolate.run(() {
|
||||
await Isolate.run(() {
|
||||
monero.Wallet_store(Pointer.fromAddress(addr));
|
||||
});
|
||||
storeMutex.release();
|
||||
|
|
|
@ -268,7 +268,7 @@ void _restoreFromSpendKey(Map<String, dynamic> args) {
|
|||
Future<void> _openWallet(Map<String, String> args) async => loadWallet(
|
||||
path: args['path'] as String, password: args['password'] as String);
|
||||
|
||||
Future<bool> _isWalletExist(String path) async => isWalletExistSync(path: path);
|
||||
bool _isWalletExist(String path) => isWalletExistSync(path: path);
|
||||
|
||||
void openWallet(
|
||||
{required String path,
|
||||
|
@ -343,4 +343,4 @@ Future<void> restoreFromSpendKey(
|
|||
'restoreHeight': restoreHeight
|
||||
});
|
||||
|
||||
Future<bool> isWalletExist({required String path}) => _isWalletExist(path);
|
||||
bool isWalletExist({required String path}) => _isWalletExist(path);
|
||||
|
|
|
@ -452,7 +452,7 @@ abstract class MoneroWalletBase
|
|||
monero.CoinsInfo_unlocked(coin),
|
||||
);
|
||||
if (unspent.hash.isNotEmpty) {
|
||||
unspent.isChange = transaction_history.getTransaction(unspent.hash) == 1;
|
||||
unspent.isChange = transaction_history.getTransaction(unspent.hash).isSpend == true;
|
||||
}
|
||||
unspentCoins.add(unspent);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue