mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-02 12:14:09 +01:00
CAKE-310. CAKE-309. Bugs fixes. Changed way for save wallet after adding of new account/subaddress. Added App transport security rule for iOS. Changed version to 4.1.5.
This commit is contained in:
@@ -5,6 +5,7 @@ import 'package:cw_monero/types.dart';
|
||||
import 'package:cw_monero/monero_api.dart';
|
||||
import 'package:cw_monero/structs/account_row.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:cw_monero/wallet.dart';
|
||||
|
||||
final accountSizeNative = moneroApi
|
||||
.lookup<NativeFunction<account_size>>('account_size')
|
||||
@@ -70,8 +71,13 @@ void _setLabelForAccount(Map<String, dynamic> args) {
|
||||
setLabelForAccountSync(label: label, accountIndex: accountIndex);
|
||||
}
|
||||
|
||||
Future<void> addAccount({String label}) async => compute(_addAccount, label);
|
||||
Future<void> addAccount({String label}) async {
|
||||
await compute(_addAccount, label);
|
||||
await store();
|
||||
}
|
||||
|
||||
Future<void> setLabelForAccount({int accountIndex, String label}) async =>
|
||||
compute(
|
||||
_setLabelForAccount, {'accountIndex': accountIndex, 'label': label});
|
||||
Future<void> setLabelForAccount({int accountIndex, String label}) async {
|
||||
await compute(
|
||||
_setLabelForAccount, {'accountIndex': accountIndex, 'label': label});
|
||||
await store();
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import 'package:cw_monero/signatures.dart';
|
||||
import 'package:cw_monero/types.dart';
|
||||
import 'package:cw_monero/monero_api.dart';
|
||||
import 'package:cw_monero/structs/subaddress_row.dart';
|
||||
import 'package:cw_monero/wallet.dart';
|
||||
|
||||
final subaddressSizeNative = moneroApi
|
||||
.lookup<NativeFunction<subaddrress_size>>('subaddrress_size')
|
||||
@@ -79,14 +80,18 @@ void _setLabelForSubaddress(Map<String, dynamic> args) {
|
||||
accountIndex: accountIndex, addressIndex: addressIndex, label: label);
|
||||
}
|
||||
|
||||
Future addSubaddress({int accountIndex, String label}) async =>
|
||||
compute<Map<String, Object>, void>(
|
||||
Future addSubaddress({int accountIndex, String label}) async {
|
||||
await compute<Map<String, Object>, void>(
|
||||
_addSubaddress, {'accountIndex': accountIndex, 'label': label});
|
||||
await store();
|
||||
}
|
||||
|
||||
Future setLabelForSubaddress(
|
||||
{int accountIndex, int addressIndex, String label}) =>
|
||||
compute<Map<String, Object>, void>(_setLabelForSubaddress, {
|
||||
'accountIndex': accountIndex,
|
||||
'addressIndex': addressIndex,
|
||||
'label': label
|
||||
});
|
||||
{int accountIndex, int addressIndex, String label}) async {
|
||||
await compute<Map<String, Object>, void>(_setLabelForSubaddress, {
|
||||
'accountIndex': accountIndex,
|
||||
'addressIndex': addressIndex,
|
||||
'label': label
|
||||
});
|
||||
await store();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user