Skip to content

Commit

Permalink
Linter errors fixes. Move secrandom native to cw_core
Browse files Browse the repository at this point in the history
  • Loading branch information
mkyq committed Jan 14, 2022
1 parent c5ad751 commit 30b77eb
Show file tree
Hide file tree
Showing 13 changed files with 89 additions and 29 deletions.
2 changes: 0 additions & 2 deletions cw_bitcoin/lib/bitcoin_amount_format.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'dart:math';

import 'package:intl/intl.dart';
import 'package:cw_core/crypto_amount_format.dart';

Expand Down
2 changes: 1 addition & 1 deletion cw_bitcoin/lib/bitcoin_mnemonic.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'dart:typed_data';
import 'package:crypto/crypto.dart';
import 'package:unorm_dart/unorm_dart.dart' as unorm;
import 'package:cryptography/cryptography.dart' as cryptography;
import 'package:cake_wallet/core/sec_random_native.dart';
import 'package:cw_core/sec_random_native.dart';

const segwit = '100';
final wordlist = englishWordlist;
Expand Down
14 changes: 7 additions & 7 deletions cw_bitcoin/lib/bitcoin_transaction_priority.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:cw_core/transaction_priority.dart';
import 'package:cake_wallet/generated/i18n.dart';
//import 'package:cake_wallet/generated/i18n.dart';

class BitcoinTransactionPriority extends TransactionPriority {
const BitcoinTransactionPriority({String title, int raw})
Expand Down Expand Up @@ -34,13 +34,13 @@ class BitcoinTransactionPriority extends TransactionPriority {

switch (this) {
case BitcoinTransactionPriority.slow:
label = '${S.current.transaction_priority_slow} ~24hrs';
label = 'Slow ~24hrs'; // '${S.current.transaction_priority_slow} ~24hrs';
break;
case BitcoinTransactionPriority.medium:
label = S.current.transaction_priority_medium;
label = 'Medium'; // S.current.transaction_priority_medium;
break;
case BitcoinTransactionPriority.fast:
label = S.current.transaction_priority_fast;
label = 'Fast'; // S.current.transaction_priority_fast;
break;
default:
break;
Expand Down Expand Up @@ -86,13 +86,13 @@ class LitecoinTransactionPriority extends BitcoinTransactionPriority {

switch (this) {
case LitecoinTransactionPriority.slow:
label = S.current.transaction_priority_slow;
label = 'Slow'; // S.current.transaction_priority_slow;
break;
case LitecoinTransactionPriority.medium:
label = S.current.transaction_priority_medium;
label = 'Medium'; // S.current.transaction_priority_medium;
break;
case LitecoinTransactionPriority.fast:
label = S.current.transaction_priority_fast;
label = 'Fast'; // S.current.transaction_priority_fast;
break;
default:
break;
Expand Down
1 change: 1 addition & 0 deletions cw_bitcoin/lib/electrum.dart
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ class ElectrumClient {
return subscription;
} catch(e) {
print(e.toString());
return null;
}
}

Expand Down
1 change: 0 additions & 1 deletion cw_bitcoin/lib/electrum_wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import 'package:cw_bitcoin/electrum_transaction_info.dart';
import 'package:cw_core/pathForWallet.dart';
import 'package:cw_bitcoin/address_to_output_script.dart';
import 'package:cw_bitcoin/bitcoin_address_record.dart';
import 'package:cw_bitcoin/bitcoin_amount_format.dart';
import 'package:cw_bitcoin/electrum_balance.dart';
import 'package:cw_bitcoin/bitcoin_mnemonic.dart';
import 'package:cw_bitcoin/bitcoin_transaction_credentials.dart';
Expand Down
1 change: 0 additions & 1 deletion cw_bitcoin/lib/litecoin_wallet_addresses.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:bitcoin_flutter/bitcoin_flutter.dart' as bitcoin;
import 'package:cw_bitcoin/bitcoin_mnemonic.dart';
import 'package:cw_bitcoin/utils.dart';
import 'package:cw_bitcoin/bitcoin_address_record.dart';
import 'package:cw_bitcoin/electrum_wallet_addresses.dart';
Expand Down
43 changes: 39 additions & 4 deletions cw_bitcoin/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ packages:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.0"
version: "1.6.0"
asn1lib:
dependency: transitive
description:
name: asn1lib
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.5"
async:
dependency: transitive
description:
Expand Down Expand Up @@ -123,14 +130,14 @@ packages:
name: built_collection
url: "https://pub.dartlang.org"
source: hosted
version: "5.1.1"
version: "4.3.2"
built_value:
dependency: transitive
description:
name: built_value
url: "https://pub.dartlang.org"
source: hosted
version: "8.1.3"
version: "7.1.0"
characters:
dependency: transitive
description:
Expand Down Expand Up @@ -194,6 +201,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.5"
cryptography:
dependency: "direct main"
description:
name: cryptography
url: "https://pub.dartlang.org"
source: hosted
version: "1.4.1"
cw_core:
dependency: "direct main"
description:
Expand All @@ -215,6 +229,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.0"
encrypt:
dependency: "direct main"
description:
name: encrypt
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.3"
fake_async:
dependency: transitive
description:
Expand Down Expand Up @@ -242,7 +263,7 @@ packages:
name: fixnum
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
version: "0.10.11"
flutter:
dependency: "direct main"
description: flutter
Expand Down Expand Up @@ -491,6 +512,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.8"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.5"
rxdart:
dependency: "direct main"
description:
Expand Down Expand Up @@ -594,6 +622,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
unorm_dart:
dependency: "direct main"
description:
name: unorm_dart
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0"
vector_math:
dependency: transitive
description:
Expand Down
8 changes: 6 additions & 2 deletions cw_bitcoin/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: cw_bitcoin
description: A new Flutter package project.
version: 0.0.1
author:
homepage:
publish_to: none
author: Cake Wallet
homepage: https://cakewallet.com

environment:
sdk: ">=2.7.0 <3.0.0"
Expand All @@ -23,6 +24,9 @@ dependencies:
url: https://github.com/cake-tech/bitcoin_flutter.git
ref: cake
rxdart: ^0.26.0
unorm_dart: ^0.2.0
cryptography: ^1.4.0
encrypt: ^4.0.0

dev_dependencies:
flutter_test:
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion cw_core/lib/transaction_info.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:cw_core/transaction_direction.dart';
import 'package:cake_wallet/utils/mobx.dart';
//import 'package:cake_wallet/utils/mobx.dart';
import 'package:cw_core/keyable.dart';

abstract class TransactionInfo extends Object with Keyable {
Expand Down
33 changes: 27 additions & 6 deletions cw_core/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ packages:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.0"
version: "1.6.0"
asn1lib:
dependency: transitive
description:
name: asn1lib
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.1"
async:
dependency: transitive
description:
Expand Down Expand Up @@ -147,14 +154,14 @@ packages:
name: convert
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
version: "2.1.1"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
version: "2.1.5"
dart_style:
dependency: transitive
description:
Expand All @@ -168,7 +175,14 @@ packages:
name: dartx
url: "https://pub.dartlang.org"
source: hosted
version: "0.8.0"
version: "0.5.0"
encrypt:
dependency: "direct main"
description:
name: encrypt
url: "https://pub.dartlang.org"
source: hosted
version: "4.1.0"
fake_async:
dependency: transitive
description:
Expand Down Expand Up @@ -234,7 +248,7 @@ packages:
name: hive
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.0-nullsafety.2"
version: "1.4.4+1"
hive_generator:
dependency: "direct dev"
description:
Expand Down Expand Up @@ -403,6 +417,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3"
pointycastle:
dependency: transitive
description:
name: pointycastle
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
pool:
dependency: transitive
description:
Expand Down Expand Up @@ -512,7 +533,7 @@ packages:
name: time
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "1.4.1"
timing:
dependency: transitive
description:
Expand Down
6 changes: 4 additions & 2 deletions cw_core/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: cw_core
description: A new Flutter package project.
version: 0.0.1
author:
homepage:
publish_to: none
author: Cake Wallet
homepage: https://cakewallet.com

environment:
sdk: ">=2.7.0 <3.0.0"
Expand All @@ -16,6 +17,7 @@ dependencies:
mobx: ^1.2.1+2
flutter_mobx: ^1.1.0+2
intl: ^0.17.0
encrypt: ^4.0.0

dev_dependencies:
flutter_test:
Expand Down
5 changes: 3 additions & 2 deletions cw_monero/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: cw_monero
description: A new flutter plugin project.
version: 0.0.1
author:
homepage:
publish_to: none
author: Cake Wallet
homepage: https://cakewallet.com

environment:
sdk: ">=2.6.0 <3.0.0"
Expand Down

0 comments on commit 30b77eb

Please sign in to comment.