Skip to content

Commit cae1acb

Browse files
committed
Added an overloaded connectWallet method that supports the new ActivityResult API.(#17)
1 parent e48ccf2 commit cae1acb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lib/src/main/java/dora/pay/PayUtils.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ object PayUtils {
6666
@JvmStatic
6767
@WorkerThread
6868
fun queryTransaction(transactionHash: String, jsonRpcUrl: String) : Boolean {
69-
val web3j: Web3j = Web3j.build(HttpService(jsonRpcUrl))
69+
val web3: Web3j = Web3j.build(HttpService(jsonRpcUrl))
7070
val receipt: TransactionReceipt? =
71-
web3j.ethGetTransactionReceipt(transactionHash).send().result
71+
web3.ethGetTransactionReceipt(transactionHash).send().result
7272
return receipt != null && receipt.blockNumber != null
7373
}
7474

@@ -94,8 +94,8 @@ object PayUtils {
9494
@JvmStatic
9595
@WorkerThread
9696
fun queryTransactionDetail(transactionHash: String, jsonRpcUrl: String) : Transaction? {
97-
val web3j: Web3j = Web3j.build(HttpService(jsonRpcUrl))
98-
return web3j.ethGetTransactionByHash(transactionHash).send().transaction.orElse(null)
97+
val web3: Web3j = Web3j.build(HttpService(jsonRpcUrl))
98+
return web3.ethGetTransactionByHash(transactionHash).send().transaction.orElse(null)
9999
}
100100

101101
/**

0 commit comments

Comments
 (0)