Skip to content

Commit e7fef10

Browse files
authored
Merge pull request #19 from cake-tech/CW-912-cleanup1-mobx
Migrate over to mobx
2 parents de9b265 + 3f5db90 commit e7fef10

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+662
-670
lines changed

.env

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
MONERO_C_TAG=v0.18.3.4-RC12
1+
MONERO_C_TAG=v0.18.4.0-RC1
22
COIN=monero

android/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ key.properties
1212
**/*.keystore
1313
**/*.jks
1414
**/*.pwd
15+
app/.cxx

build.yaml

-16
This file was deleted.

docs/README.md

-67
This file was deleted.

lib/coins/monero/creation/common.dart

-4
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,6 @@ class MoneroWalletCreation extends WalletCreation {
161161
}
162162
}
163163

164-
print(await walletAddress.value);
165-
print(await secretSpendKey.value);
166-
print(await secretViewKey.value);
167-
168164
return RestoreFromKeysMoneroWalletCreationMethod(
169165
L,
170166
walletPath: coin.getPathForWallet(walletName),

lib/coins/monero/wallet.dart

+7-4
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ class MoneroWallet implements CoinWallet {
8484
Coin.L.partial_key_images: someImages,
8585
Coin.L.all_key_images: allImages,
8686
},
87-
).push(context);
87+
currentWallet: this,
88+
).pushReplacement(context);
8889
}
8990

9091
@override
9192
Future<void> handleUR(final BuildContext context, final URQRData ur) async {
92-
print("handling: ${ur.tag}");
9393
switch (ur.tag) {
9494
case "xmr-keyimage" || "xmr-txsigned":
9595
throw Exception("Unable to handle ${ur.tag}. This is a offline wallet");
@@ -145,10 +145,13 @@ class MoneroWallet implements CoinWallet {
145145
final error = monero.UnsignedTransaction_errorString(txptr);
146146
throw CoinException(error);
147147
}
148-
await AnimatedURPage(urqrList: {"signedTx": signedTx}).push(context);
148+
await AnimatedURPage(
149+
urqrList: {"signedTx": signedTx},
150+
currentWallet: this,
151+
).pushReplacement(context);
149152
},
150153
cancelCallback: () => {},
151-
).push(context);
154+
).pushReplacement(context);
152155
save();
153156
default:
154157
throw UnimplementedError(Coin.L.error_ur_tag_unsupported(ur.tag));

lib/coins/monero/wallet_info.dart

+6
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ class MoneroWalletInfo extends CoinWalletInfo {
7777
}
7878
Monero.wPtrList.clear();
7979
final basePath = p.dirname(walletName);
80+
if (File(p.join(basePath, newName)).existsSync()) {
81+
throw Exception(Coin.L.error_wallet_name_already_exists);
82+
}
83+
if (File(p.join(basePath, "$newName.keys")).existsSync()) {
84+
throw Exception(Coin.L.error_wallet_name_already_exists);
85+
}
8086
File(walletName).copySync(p.join(basePath, newName));
8187
File("$walletName.keys").copySync(p.join(basePath, "$newName.keys"));
8288
// Copy and delete later, if anything throws below we end up with copied walled,

lib/dev/generate_rebuild.dart

-23
This file was deleted.

lib/dev/rebuild_generator.dart

-174
This file was deleted.

lib/l10n/app_en.arb

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"error_ur_tag_unsupported": "Unable to handle {urTag}",
4040
"error_wallet_doesnt_exist": "Given wallet doesn't exist {walletName}",
4141
"error_wallet_is_null_no_indication_of_failure": "Wallet creation failed, and status indicated failure but message was empty",
42+
"error_wallet_name_already_exists": "Wallet with this name already exists",
4243
"error_wallet_name_empty": "Wallet name is empty",
4344
"error_wallet_name_unchanged": "Wallet wasn't renamed because the name is not different",
4445
"export_key_images": "Export key images",

0 commit comments

Comments
 (0)