Skip to content

Commit

Permalink
rename module
Browse files Browse the repository at this point in the history
  • Loading branch information
john990 committed Sep 18, 2022
1 parent 43bafab commit 819e6db
Show file tree
Hide file tree
Showing 54 changed files with 12 additions and 11 deletions.
3 changes: 1 addition & 2 deletions example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ android {
}

dependencies {
implementation project(path: ':fcl-android')

implementation project(path: ':fcl')
implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.3.0'
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package io.outblock.fcl

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import androidx.test.platform.app.InstrumentationRegistry
import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ object Fcl {

fun verifyAccountProof(includeDomainTag: Boolean = false): FclResult<Boolean> {
assert(Thread.currentThread() != Looper.getMainLooper().thread) { "can't call this method in main thread." }

return processResult {
runBlocking { AccountProofRequest().request(includeDomainTag) }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import io.outblock.fcl.utils.FclException
internal class SignMessageRequest {

suspend fun request(message: String): SignMessageResponse {
Fcl.currentUser ?: throw FclException(FclError.unauthenticated)
val service = Fcl.currentUser?.services?.first { it.type == FCLServiceType.userSignature.value }
?: throw FclException(FclError.invaildService)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.outblock.fcl.utils

import android.os.Looper
import androidx.annotation.WorkerThread
import com.nftco.flow.sdk.FlowBlock
import com.nftco.flow.sdk.bytesToHex
Expand All @@ -18,6 +19,9 @@ fun Fcl.getLatestBlock(sealed: Boolean = true): FlowBlock {

@WorkerThread
fun Fcl.verifyUserSignature(message: String, signatures: List<SignMessageResponse>): Boolean {
assert(Thread.currentThread() != Looper.getMainLooper().thread) { "can't call this method in main thread." }
currentUser ?: throw FclException(FclError.unauthenticated)

val result = query {
cadence(CADENCE_VERIFY_USER_SIGNATURE)
arg { address(signatures.firstOrNull()?.address.orEmpty()) }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="AppTheme">
</style>
<resources>

<style name="AppTheme"></style>

<style name="AppTheme.Transparent">
<item name="android:windowIsTranslucent">true</item>
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
rootProject.name = "fcl-android"
include ':example'
include ':fcl-android'
include ':fcl'

0 comments on commit 819e6db

Please sign in to comment.