Skip to content

Commit 201ebc2

Browse files
committed
Auto stash before cherry pick of "xmr sync listeners"
1 parent facc1a3 commit 201ebc2

1 file changed

Lines changed: 15 additions & 10 deletions

File tree

cw_monero/lib/api/wallet_manager.dart

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import 'dart:ffi';
2-
import 'package:ffi/ffi.dart';
3-
import 'package:flutter/foundation.dart';
2+
43
import 'package:cw_monero/api/convert_utf8_to_string.dart';
5-
import 'package:cw_monero/api/signatures.dart';
6-
import 'package:cw_monero/api/types.dart';
7-
import 'package:cw_monero/api/monero_api.dart';
8-
import 'package:cw_monero/api/wallet.dart';
9-
import 'package:cw_monero/api/exceptions/wallet_opening_exception.dart';
104
import 'package:cw_monero/api/exceptions/wallet_creation_exception.dart';
5+
import 'package:cw_monero/api/exceptions/wallet_opening_exception.dart';
116
import 'package:cw_monero/api/exceptions/wallet_restore_from_keys_exception.dart';
127
import 'package:cw_monero/api/exceptions/wallet_restore_from_seed_exception.dart';
8+
import 'package:cw_monero/api/monero_api.dart';
9+
import 'package:cw_monero/api/signatures.dart';
10+
import 'package:cw_monero/api/types.dart';
11+
import 'package:ffi/ffi.dart';
1312
import 'package:ffi/ffi.dart' as pkgffi;
13+
import 'package:flutter/foundation.dart';
1414

1515
final createWalletNative = moneroApi
1616
.lookup<NativeFunction<create_wallet>>('create_wallet')
@@ -39,7 +39,10 @@ final errorStringNative = moneroApi
3939
.asFunction<ErrorString>();
4040

4141
void createWalletSync(
42-
{required String path, required String password, required String language, int nettype = 0}) {
42+
{required String path,
43+
required String password,
44+
required String language,
45+
int nettype = 0}) {
4346
final pathPointer = path.toNativeUtf8();
4447
final passwordPointer = password.toNativeUtf8();
4548
final languagePointer = language.toNativeUtf8();
@@ -142,7 +145,8 @@ void restoreWalletFromKeysSync(
142145
}
143146
}
144147

145-
void loadWallet({required String path, required String password, int nettype = 0}) {
148+
void loadWallet(
149+
{required String path, required String password, int nettype = 0}) {
146150
final pathPointer = path.toNativeUtf8();
147151
final passwordPointer = password.toNativeUtf8();
148152
final loaded = loadWalletNative(pathPointer, passwordPointer, nettype) != 0;
@@ -197,7 +201,8 @@ Future<void> _openWallet(Map<String, String> args) async =>
197201

198202
bool _isWalletExist(String? path) => isWalletExistSync(path: path!);
199203

200-
void openWallet({required String path, required String password, int nettype = 0}) async =>
204+
void openWallet(
205+
{required String path, required String password, int nettype = 0}) =>
201206
loadWallet(path: path, password: password, nettype: nettype);
202207

203208
Future<void> openWalletAsync(Map<String, String> args) async =>

0 commit comments

Comments
 (0)