Merged ios migrations

This commit is contained in:
M 2020-06-03 13:04:21 +03:00
parent 8344ecb563
commit 484dd0ac41

View file

@ -47,7 +47,7 @@ class MoneroWalletsManager extends WalletsManager {
String name, String password, String seed, int restoreHeight) async { String name, String password, String seed, int restoreHeight) async {
try { try {
const isRecovery = true; const isRecovery = true;
final path = await pathForWallet(name: name); final path = await pathForWallet(name: name, type: WalletType.monero);
await monero_wallet_manager.restoreFromSeed( await monero_wallet_manager.restoreFromSeed(
path: path, path: path,
@ -80,7 +80,7 @@ class MoneroWalletsManager extends WalletsManager {
String spendKey) async { String spendKey) async {
try { try {
const isRecovery = true; const isRecovery = true;
final path = await pathForWallet(name: name); final path = await pathForWallet(name: name, type: WalletType.monero);
await monero_wallet_manager.restoreFromKeys( await monero_wallet_manager.restoreFromKeys(
path: path, path: path,
@ -108,7 +108,7 @@ class MoneroWalletsManager extends WalletsManager {
@override @override
Future<Wallet> openWallet(String name, String password) async { Future<Wallet> openWallet(String name, String password) async {
try { try {
final path = await pathForWallet(name: name); final path = await pathForWallet(name: name, type: WalletType.monero);
monero_wallet_manager.openWallet(path: path, password: password); monero_wallet_manager.openWallet(path: path, password: password);
final wallet = await MoneroWallet.load(walletInfoSource, name, type); final wallet = await MoneroWallet.load(walletInfoSource, name, type);
await wallet.updateInfo(); await wallet.updateInfo();
@ -123,7 +123,7 @@ class MoneroWalletsManager extends WalletsManager {
@override @override
Future<bool> isWalletExit(String name) async { Future<bool> isWalletExit(String name) async {
try { try {
final path = await pathForWallet(name: name); final path = await pathForWallet(name: name, type: WalletType.monero);
return monero_wallet_manager.isWalletExist(path: path); return monero_wallet_manager.isWalletExist(path: path);
} catch (e) { } catch (e) {
print('MoneroWalletsManager Error: $e'); print('MoneroWalletsManager Error: $e');