Skip to content

Commit

Permalink
[Filecoin] Update block explorer (#1199)
Browse files Browse the repository at this point in the history
* change filecoin block explorer

* misc updates

* update kotlin_version to latest
  • Loading branch information
hewigovens committed Dec 7, 2020
1 parent eb310e1 commit 0d6c123
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 29 deletions.
15 changes: 7 additions & 8 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'

android {
Expand Down Expand Up @@ -30,21 +29,21 @@ android {

dependencies {
implementation project(':trustwalletcore')
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.8"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2-native-mt'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2-native-mt'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.appcompat:appcompat:1.2.0'

// Tests
testImplementation 'junit:junit:4.12'
androidTestImplementation("androidx.test.espresso:espresso-core:3.1.0-beta02", {
testImplementation 'junit:junit:4.13.1'
exclude group: "com.android.support", module: "support-annotations"
})
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.1.1'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.3.0'
androidTestImplementation 'androidx.test:runner:1.3.0'
androidTestImplementation 'android.arch.core:core-testing:1.1.1'

implementation 'io.grpc:grpc-protobuf:1.24.2'
implementation 'io.grpc:grpc-protobuf:1.34.0'
}
repositories {
mavenCentral()
Expand Down
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.3.21'
ext.kotlin_version = '1.4.21'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'com.android.tools.build:gradle:4.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5'
Expand Down
4 changes: 2 additions & 2 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu May 14 14:21:48 CST 2020
#Mon Dec 07 16:44:22 CST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
2 changes: 1 addition & 1 deletion android/trustwalletcore/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ android {
}

dependencies {
implementation 'io.grpc:grpc-protobuf:1.24.2'
implementation 'io.grpc:grpc-protobuf:1.34.0'
}

apply from: 'maven-push.gradle'
Expand Down
10 changes: 5 additions & 5 deletions coins.json
Original file line number Diff line number Diff line change
Expand Up @@ -940,11 +940,11 @@
"curve": "secp256k1",
"publicKeyType": "secp256k1Extended",
"explorer": {
"url": "https://filscan.io",
"txPath": "/#/message/detail?cid=",
"accountPath": "/#/address/detail?address=",
"sampleTx": "bafy2bzacecbm3ofxjjzcl2rg32ninphza34mm3ijr55zjsamwfqmz4ib63mqe",
"sampleAccount": "t1nbb73vhk5dtmnsgeaetbo76daepqjtrfoccn74i"
"url": "https://filfox.info/en",
"txPath": "/message/",
"accountPath": "/address/",
"sampleTx": "bafy2bzacedsgjcd6xfhrrymmfrqubb44otlyhvgqkgsh533d5j5hwniiqespm",
"sampleAccount": "f1abjxfbp274xpdqcpuaykwkfb43omjotacm2p3za"
},
"info": {
"url": "https://filecoin.io/",
Expand Down
2 changes: 1 addition & 1 deletion docs/coins.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This list is generated from [./coins.json](../coins.json)
| 74 | ICON | ICX | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/icon/info/logo.png" width="32" /> | <https://icon.foundation> |
| 118 | Cosmos | ATOM | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/cosmos/info/logo.png" width="32" /> | <https://cosmos.network> |
| 133 | Zcash | ZEC | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/zcash/info/logo.png" width="32" /> | <https://z.cash> |
| 136 | Zcoin | XZC | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/zcoin/info/logo.png" width="32" /> | <https://zcoin.io> |
| 136 | Zcoin | FIRO | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/zcoin/info/logo.png" width="32" /> | <https://firo.org/> |
| 144 | XRP | XRP | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ripple/info/logo.png" width="32" /> | <https://ripple.com/xrp> |
| 145 | Bitcoin Cash | BCH | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/bitcoincash/info/logo.png" width="32" /> | <https://bitcoincash.org> |
| 148 | Stellar | XLM | <img src="https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/stellar/info/logo.png" width="32" /> | <https://stellar.org> |
Expand Down
2 changes: 1 addition & 1 deletion include/TrustWalletCore/TWBitcoinAddress.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct TWBitcoinAddress;

/// Compares two addresses for equality.
TW_EXPORT_STATIC_METHOD
bool TWBitcoinAddressEqual(struct TWBitcoinAddress *_Nonnull lhs, struct TWBitcoinAddress *_Nonnull rhs);
bool TWBitcoinAddressEqual(struct TWBitcoinAddress *_Nonnull lhs, struct TWBitcoinAddress *_Nonnull rhs);

/// Determines if the data is a valid Bitcoin address.
TW_EXPORT_STATIC_METHOD
Expand Down
13 changes: 4 additions & 9 deletions tests/Filecoin/TWCoinTypeTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@

TEST(TWFilecoinCoinType, TWCoinType) {
auto symbol = WRAPS(TWCoinTypeConfigurationGetSymbol(TWCoinTypeFilecoin));
auto txId = WRAPS(TWStringCreateWithUTF8Bytes(
"bafy2bzacecbm3ofxjjzcl2rg32ninphza34mm3ijr55zjsamwfqmz4ib63mqe"));
auto txId = WRAPS(TWStringCreateWithUTF8Bytes("bafy2bzacedsgjcd6xfhrrymmfrqubb44otlyhvgqkgsh533d5j5hwniiqespm"));
auto txUrl = WRAPS(TWCoinTypeConfigurationGetTransactionURL(TWCoinTypeFilecoin, txId.get()));
auto accId = WRAPS(TWStringCreateWithUTF8Bytes("t1nbb73vhk5dtmnsgeaetbo76daepqjtrfoccn74i"));
auto accId = WRAPS(TWStringCreateWithUTF8Bytes("f1abjxfbp274xpdqcpuaykwkfb43omjotacm2p3za"));
auto accUrl = WRAPS(TWCoinTypeConfigurationGetAccountURL(TWCoinTypeFilecoin, accId.get()));
auto id = WRAPS(TWCoinTypeConfigurationGetID(TWCoinTypeFilecoin));
auto name = WRAPS(TWCoinTypeConfigurationGetName(TWCoinTypeFilecoin));
Expand All @@ -27,12 +26,8 @@ TEST(TWFilecoinCoinType, TWCoinType) {
ASSERT_EQ(0x0, TWCoinTypeP2shPrefix(TWCoinTypeFilecoin));
ASSERT_EQ(0x0, TWCoinTypeStaticPrefix(TWCoinTypeFilecoin));
assertStringsEqual(symbol, "FIL");
assertStringsEqual(txUrl,
"https://filscan.io/#/message/"
"detail?cid=bafy2bzacecbm3ofxjjzcl2rg32ninphza34mm3ijr55zjsamwfqmz4ib63mqe");
assertStringsEqual(
accUrl,
"https://filscan.io/#/address/detail?address=t1nbb73vhk5dtmnsgeaetbo76daepqjtrfoccn74i");
assertStringsEqual(txUrl, "https://filfox.info/en/message/bafy2bzacedsgjcd6xfhrrymmfrqubb44otlyhvgqkgsh533d5j5hwniiqespm");
assertStringsEqual(accUrl, "https://filfox.info/en/address/f1abjxfbp274xpdqcpuaykwkfb43omjotacm2p3za");
assertStringsEqual(id, "filecoin");
assertStringsEqual(name, "Filecoin");
}

1 comment on commit 0d6c123

@mikeygbooth99
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.