Changed version for unstoppable domains. Changed domain validation for unstoppable domains.

M committed Aug 16, 2021 at 12:42 UTC c256d05029be5bdf878ff484540ba66106db452d
4 files changed +20 -15
android/app/build.gradle
+1 -1
@@ -88,7 +88,7 @@ dependencies {
88 testImplementation 'junit:junit:4.12'
89 androidTestImplementation 'androidx.test:runner:1.3.0'
90 androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
91 - implementation 'com.unstoppabledomains:resolution:1.13.0'
91 + implementation 'com.unstoppabledomains:resolution:3.0.0'
92 implementation 'com.google.firebase:firebase-core:19.0.0'
93 implementation 'com.google.firebase:firebase-messaging:19.0.0'
94 }
ios/Podfile
+1 -1
@@ -36,7 +36,7 @@ target 'Runner' do
36
37 # Cake Wallet (Legacy)
38 pod 'CryptoSwift'
39 - pod 'UnstoppableDomainsResolution', '~> 0.3.6'
39 + pod 'UnstoppableDomainsResolution', '~> 2.0.1'
40 pod 'Firebase/Messaging', '6.33.0'
41 end
42
ios/Podfile.lock
+6 -11
@@ -60,8 +60,6 @@ PODS:
60 - SwiftyGif
61 - esys_flutter_share (0.0.1):
62 - Flutter
63 - - EthereumAddress (1.3.0):
64 - - CryptoSwift (~> 1.0)
63 - file_picker (0.0.1):
64 - DKImagePickerController/PhotoGallery
65 - Flutter
@@ -153,10 +151,9 @@ PODS:
151 - Flutter
152 - SwiftProtobuf (1.12.0)
153 - SwiftyGif (5.3.0)
156 - - UnstoppableDomainsResolution (0.3.6):
154 + - UnstoppableDomainsResolution (2.0.1):
155 - BigInt
158 - - CryptoSwift (~> 1.0)
159 - - EthereumAddress (~> 1.3)
156 + - CryptoSwift
157 - url_launcher (0.0.1):
158 - Flutter
159 - webview_flutter (0.0.1):
@@ -181,7 +178,7 @@ DEPENDENCIES:
178 - permission_handler (from `.symlinks/plugins/permission_handler/ios`)
179 - share (from `.symlinks/plugins/share/ios`)
180 - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
184 - - UnstoppableDomainsResolution (~> 0.3.6)
181 + - UnstoppableDomainsResolution (~> 2.0.1)
182 - url_launcher (from `.symlinks/plugins/url_launcher/ios`)
183 - webview_flutter (from `.symlinks/plugins/webview_flutter/ios`)
184
@@ -191,7 +188,6 @@ SPEC REPOS:
188 - CryptoSwift
189 - DKImagePickerController
190 - DKPhotoGallery
194 - - EthereumAddress
191 - Firebase
192 - FirebaseCore
193 - FirebaseCoreDiagnostics
@@ -258,7 +254,6 @@ SPEC CHECKSUMS:
254 DKImagePickerController: b5eb7f7a388e4643264105d648d01f727110fc3d
255 DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
256 esys_flutter_share: 403498dab005b36ce1f8d7aff377e81f0621b0b4
261 - EthereumAddress: 39fe8e11cf04e4e9902b55ae653dbc4e0aee5f30
257 file_picker: 3e6c3790de664ccf9b882732d9db5eaf6b8d4eb1
258 Firebase: 8db6f2d1b2c5e2984efba4949a145875a8f65fe5
259 firebase_core: 5d6a02f3d85acd5f8321c2d6d62877626a670659
@@ -286,10 +281,10 @@ SPEC CHECKSUMS:
281 shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
282 SwiftProtobuf: 4ef85479c18ca85b5482b343df9c319c62bda699
283 SwiftyGif: e466e86c660d343357ab944a819a101c4127cb40
289 - UnstoppableDomainsResolution: 63abb84858d3e91eb838a5bfa6f7e3c0e0593f24
284 + UnstoppableDomainsResolution: 856ba43f08b31f3f34157c7257092bd0c6e31cf8
285 url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
286 webview_flutter: 9f491a9b5a66f2573946a389b2677987b0ff8c0b
287
293 -PODFILE CHECKSUM: 82161cafcb98ddf3e6a0ff8149da3f656be3f1e3
288 +PODFILE CHECKSUM: 2e3a44b4309d141b9a3b43acf609feb2beb43d9b
289
295 -COCOAPODS: 1.9.3
290 +COCOAPODS: 1.10.2
lib/entities/parse_address_from_domain.dart
+12 -2
@@ -2,7 +2,17 @@ import 'package:cake_wallet/entities/openalias_record.dart';
2 import 'package:cake_wallet/entities/parsed_address.dart';
3 import 'package:cake_wallet/entities/unstoppable_domain_address.dart';
4
5 -const topLevelDomain = 'crypto';
5 +const unstoppableDomains = [
6 + 'crypto',
7 + 'zil',
8 + 'x',
9 + 'coin',
10 + 'wallet',
11 + 'bitcoin',
12 + '888',
13 + 'nft',
14 + 'dao',
15 + 'blockchain'];
16
17 Future<ParsedAddress> parseAddressFromDomain(
18 String domain, String ticker) async {
@@ -15,7 +25,7 @@ Future<ParsedAddress> parseAddressFromDomain(
25 return ParsedAddress(address: domain);
26 }
27
18 - if (name.contains(topLevelDomain)) {
28 + if (unstoppableDomains.any((domain) => name.contains(domain))) {
29 final address =
30 await fetchUnstoppableDomainAddress(domain, ticker);
31