Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate over to mobx #19

Open
wants to merge 5 commits into
base: CW-912-cleanup1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
MONERO_C_TAG=v0.18.3.4-RC12
MONERO_C_TAG=v0.18.4.0-RC1
COIN=monero
1 change: 1 addition & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ key.properties
**/*.keystore
**/*.jks
**/*.pwd
app/.cxx
16 changes: 0 additions & 16 deletions build.yaml

This file was deleted.

67 changes: 0 additions & 67 deletions docs/README.md

This file was deleted.

4 changes: 0 additions & 4 deletions lib/coins/monero/creation/common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,6 @@ class MoneroWalletCreation extends WalletCreation {
}
}

print(await walletAddress.value);
print(await secretSpendKey.value);
print(await secretViewKey.value);

return RestoreFromKeysMoneroWalletCreationMethod(
L,
walletPath: coin.getPathForWallet(walletName),
Expand Down
1 change: 0 additions & 1 deletion lib/coins/monero/wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ class MoneroWallet implements CoinWallet {

@override
Future<void> handleUR(final BuildContext context, final URQRData ur) async {
print("handling: ${ur.tag}");
switch (ur.tag) {
case "xmr-keyimage" || "xmr-txsigned":
throw Exception("Unable to handle ${ur.tag}. This is a offline wallet");
Expand Down
6 changes: 6 additions & 0 deletions lib/coins/monero/wallet_info.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ class MoneroWalletInfo extends CoinWalletInfo {
}
Monero.wPtrList.clear();
final basePath = p.dirname(walletName);
if (File(p.join(basePath, newName)).existsSync()) {
throw Exception(Coin.L.error_wallet_name_already_exists);
}
if (File(p.join(basePath, "$newName.keys")).existsSync()) {
throw Exception(Coin.L.error_wallet_name_already_exists);
}
File(walletName).copySync(p.join(basePath, newName));
File("$walletName.keys").copySync(p.join(basePath, "$newName.keys"));
// Copy and delete later, if anything throws below we end up with copied walled,
Expand Down
23 changes: 0 additions & 23 deletions lib/dev/generate_rebuild.dart

This file was deleted.

174 changes: 0 additions & 174 deletions lib/dev/rebuild_generator.dart

This file was deleted.

1 change: 1 addition & 0 deletions lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"error_ur_tag_unsupported": "Unable to handle {urTag}",
"error_wallet_doesnt_exist": "Given wallet doesn't exist {walletName}",
"error_wallet_is_null_no_indication_of_failure": "Wallet creation failed, and status indicated failure but message was empty",
"error_wallet_name_already_exists": "Wallet with this name already exists",
"error_wallet_name_empty": "Wallet name is empty",
"error_wallet_name_unchanged": "Wallet wasn't renamed because the name is not different",
"export_key_images": "Export key images",
Expand Down
12 changes: 0 additions & 12 deletions lib/utils/get_signing_key.dart

This file was deleted.

9 changes: 1 addition & 8 deletions lib/view_model/abstract.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:cupcake/l10n/app_localizations.dart';
import 'package:cupcake/utils/alerts/basic.dart';
import 'package:flutter/material.dart';

class ViewModel {
abstract class ViewModel {
bool canPop = true;
String get screenName => "screenName";

Expand Down Expand Up @@ -38,13 +38,6 @@ class ViewModel {
return c?.mounted ?? false;
}

void markNeedsBuild() {
if (c == null) {
throw Exception("c is null, did you forget to register(context)?");
}
(c as Element).markNeedsBuild();
}

Future<void> errorHandler(final Object e) => callThrowable(() => throw e, L.create_wallet);

Future<bool> callThrowable(final Future<void> Function() function, final String title) async {
Expand Down
Loading
Loading