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

🥳[Feature] Unstoppable ext update #11

Merged
merged 5 commits into from
Apr 18, 2022
Merged
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
6 changes: 4 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ android {
unitTests.returnDefaultValues = true
}
packagingOptions {
pickFirst 'protobuf.meta'
resources {
pickFirsts += ['protobuf.meta']
}
}
externalNativeBuild {
cmake {
Expand Down Expand Up @@ -308,7 +310,7 @@ dependencies {
implementation 'com.jakewharton.timber:timber:5.0.1'

// Unstoppable domain
implementation 'com.unstoppabledomains:resolution:2.0.0'
implementation 'com.unstoppabledomains:resolution:5.0.0'

// Progress Button
implementation 'com.github.razir.progressbutton:progressbutton:2.1.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,11 @@ import com.unstoppabledomains.resolution.Resolution
import com.unstoppabledomains.resolution.naming.service.NamingServiceType
import timber.log.Timber


/** Litewallet
* Created by Mohamed Barry on 12/23/20
* email: [email protected]
* Copyright © 2020 Litecoin Foundation. All rights reserved.
*/
data class ResolutionResult(val error: NamingServiceException?, val address: String?)

class UDResolution {
private val tool: DomainResolution = Resolution.builder()
.infura(NamingServiceType.CNS, Network.MAINNET, BuildConfig.INFURA_KEY)
// .infura(NamingServiceType.CNS, Network.MAINNET, BuildConfig.INFURA_KEY)
.build()

fun resolve(domain: String): ResolutionResult {
Expand All @@ -29,4 +23,23 @@ class UDResolution {
ResolutionResult(err, null)
}
}
}
}

//https://github.com/unstoppabledomains/resolution-java/blob/master/samples.md
//data class ResolutionResult(val error: NamingServiceException?, val address: String?) {}
//
//class AsyncResolution : AsyncTask<String, String, ResolutionResult>() {
// private val tool: DomainResolution = Resolution()
//
// override fun doInBackground(vararg params: String?): ResolutionResult {
// val domain = params[0]
// val currency = params[1]
// return try {
// val address = this.tool.addr(domain, currency)
// ResolutionResult(null, address)
// } catch(err: NamingServiceException) {
// err.printStackTrace();
// ResolutionResult(err, null)
// }
// }
//}
9 changes: 4 additions & 5 deletions app/src/main/res/layout/fragment_send.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,18 +161,17 @@
<EditText
android:id="@+id/ud_address_edit"
style="@style/BREditStyle"
android:layout_width="0dp"
android:layout_height="32dp"
android:layout_width="wrap_content"
android:layout_height="65dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
android:layout_weight="1"
android:background="@android:color/transparent"
android:ellipsize="middle"
android:ems="10"
android:ems="8"
android:hint="@string/Send.UnstoppableDomains.placeholder"
android:inputType="textPersonName"
android:singleLine="true" />
tools:ignore="TextContrastCheck" />

<com.breadwallet.presenter.customviews.BRButton
android:id="@+id/ud_lookup_button"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@
<string name="Send.toLabel">Geben Sie eine Litecoin-Adresse ein</string>

<!-- Enter to match domain name to LTC Address -->
<string name="Send.UnstoppableDomains.placeholder">Geben Sie eine .crypto- oder .zil-Domain ein</string>
<string name="Send.UnstoppableDomains.placeholder">Geben Sie eine .crypto-, .wallet-, .zil-, .nft-, .blockchain-,\n.bitcoin-, .coin-, .888-, .dao- oder .x-Domäne ein.</string>
<!-- Or -->
<string name="Send.or">oder</string>
<!-- Lookup -->
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@
<string name="Send.toLabel">Introduzca una dirección de Litecoin</string>

<!-- Enter to match domain name to LTC Address -->
<string name="Send.UnstoppableDomains.placeholder">Ingrese un dominio .crypto o .zil</string>
<string name="Send.UnstoppableDomains.placeholder">Ingrese un dominio .crypto, .wallet, .zil, .nft, .blockchain,\n.bitcoin, .coin, .888, .dao o .x.</string>
<!-- Or -->
<string name="Send.or">o</string>
<!-- Lookup -->
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@
<string name="Send.toLabel">Entrez une adresse Litecoin</string>

<!-- Enter to match domain name to LTC Address -->
<string name="Send.UnstoppableDomains.placeholder">Entrez un domaine .crypto ou .zil</string>
<string name="Send.UnstoppableDomains.placeholder">Saisissez un domaine .crypto, .wallet, .zil, .nft, .blockchain,\n.bitcoin, .coin, .888, .dao ou .x.</string>
<!-- Or -->
<string name="Send.or">Ou</string>
<!-- Lookup -->
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-in/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@
<string name="Send.toLabel">Masukkan alamat Litecoin</string>

<!-- Enter to match domain name to LTC Address -->
<string name="Send.UnstoppableDomains.placeholder">Masukkan domain .crypto atau .zil</string>
<string name="Send.UnstoppableDomains.placeholder">Masukkan domain .crypto, .wallet, .zil, .nft, .blockchain,\n.bitcoin, .coin, .888, .dao, atau .x.</string>
<!-- Or -->
<string name="Send.or">Atau</string>
<!-- Lookup -->
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@
<string name="Send.toLabel">Inserire un indirizzo Litecoin</string>

<!-- Enter to match domain name to LTC Address -->
<string name="Send.UnstoppableDomains.placeholder">Inserisci un dominio .crypto o .zil</string>
<string name="Send.UnstoppableDomains.placeholder">Inserisci un dominio .crypto, .wallet, .zil, .nft, .blockchain,\n.bitcoin, .coin, .888, .dao o .x.</string>
<!-- Or -->
<string name="Send.or">o</string>
<!-- Lookup -->
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-ja/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@
<string name="Send.toLabel">Litecoinのアドレスを入力してください。</string>

<!-- Enter to match domain name to LTC Address -->
<string name="Send.UnstoppableDomains.placeholder">.cryptoまたは.zilドメインを入力してください</string>
<string name="Send.UnstoppableDomains.placeholder">.crypto、.wallet、.zil、.nft、.blockchain、\ n.bitcoin、.coin、.888、.dao、または.xドメインを入力します。</string>
<!-- Or -->
<string name="Send.or">或いは</string>
<!-- Lookup -->
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-ko/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@
<string name="Send.toLabel">라이트 코인 주소를 입력하세요</string>

<!-- Enter to match domain name to LTC Address -->
<string name="Send.UnstoppableDomains.placeholder">.crypto 또는 .zil 도메인을 입력하세요.</string>
<string name="Send.UnstoppableDomains.placeholder">.crypto, .wallet, .zil, .nft, .blockchain,\n.bitcoin, .coin, .888, .dao 또는 .x 도메인을 입력하세요.</string>
<!-- Or -->
<string name="Send.or">또는</string>
<!-- Lookup -->
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@
<string name="Send.toLabel">Introduzir um endereço Litecoin</string>

<!-- Enter to match domain name to LTC Address -->
<string name="Send.UnstoppableDomains.placeholder">Insira um domínio .crypto ou .zil</string>
<string name="Send.UnstoppableDomains.placeholder">Insira um domínio .crypto, .wallet, .zil, .nft, .blockchain,\n.bitcoin, .coin, .888, .dao ou .x.</string>
<!-- Or -->
<string name="Send.or">ou</string>
<!-- Lookup -->
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@
<string name="Send.toLabel">Введите адрес Litecoin</string>

<!-- Enter to match domain name to LTC Address -->
<string name="Send.UnstoppableDomains.placeholder">Введите домен .crypto или .zil</string>
<string name="Send.UnstoppableDomains.placeholder">Введите домен .crypto, .wallet, .zil, .nft, .blockchain,\n.bitcoin, .coin, .888, .dao или .x.</string>
<!-- Or -->
<string name="Send.or">или</string>
<!-- Lookup -->
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-tr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@
<string name="Send.toLabel">Bir Litecoin adresi girin</string>

<!-- Enter to match domain name to LTC Address -->
<string name="Send.UnstoppableDomains.placeholder">Bir .crypto veya .zil alanı girin</string>
<string name="Send.UnstoppableDomains.placeholder">Bir .crypto, .wallet, .zil, .nft, .blockchain,\n.bitcoin, .coin, .888, .dao veya .x alan adı girin.</string>
<!-- Or -->
<string name="Send.or">Veya</string>
<!-- Lookup -->
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-uk/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@
<string name="Send.toLabel">Введіть адресу Litecoin</string>

<!-- Enter to match domain name to LTC Address -->
<string name="Send.UnstoppableDomains.placeholder">Введіть домен .crypto або .zil</string>
<string name="Send.UnstoppableDomains.placeholder">Введіть домен .crypto, .wallet, .zil, .nft, .blockchain,\n.bitcoin, .coin, .888, .dao або .x.</string>
<!-- Or -->
<string name="Send.or">Or</string>
<!-- Lookup -->
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@
<string name="Send.toLabel">输入一个Litecoin地址</string>

<!-- Enter to match domain name to LTC Address -->
<string name="Send.UnstoppableDomains.placeholder">输入.crypto或.zil域</string>
<string name="Send.UnstoppableDomains.placeholder">输入 .crypto、.wallet、.zil、.nft、.blockchain、\n.bitcoin、.coin、.888、.dao 或 .x 域。</string>
<!-- Or -->
<string name="Send.or">要么</string>
<!-- Lookup -->
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@
<string name="Send.toLabel">輸入萊特幣地址</string>

<!-- Enter to match domain name to LTC Address -->
<string name="Send.UnstoppableDomains.placeholder">輸入.crypto或.zil域</string>
<string name="Send.UnstoppableDomains.placeholder">輸入 .crypto、.wallet、.zil、.nft、.blockchain、\n.bitcoin、.coin、.888、.dao 或 .x 域。</string>
<!-- Or -->
<string name="Send.or">要么</string>
<!-- Lookup -->
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@
<string name="Send.toLabel">Enter a Litecoin address</string>

<!-- Enter to match domain name to LTC Address -->
<string name="Send.UnstoppableDomains.placeholder">Enter a .crypto or .zil domain</string>
<string name="Send.UnstoppableDomains.placeholder">Enter a .crypto, .wallet, .zil, .nft, .blockchain,\n.bitcoin, .coin, .888, .dao, or .x domain.</string>
<!-- Or -->
<string name="Send.or">Or</string>
<!-- Lookup -->
Expand Down