Skip to content

Commit 1d282bc

Browse files
committed
Ignore findByIdentityShouldReturnWallet() test
1 parent b585c80 commit 1d282bc

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/main/kotlin/io/openfuture/state/controller/ExchangeRateController.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import org.springframework.web.bind.annotation.RequestMapping
77
import org.springframework.web.bind.annotation.RestController
88
import java.math.BigDecimal
99
import java.math.RoundingMode
10+
import java.util.*
1011

1112
@RestController
1213
@RequestMapping("/api/currency/rate")
@@ -18,7 +19,7 @@ class ExchangeRateController(
1819
@GetMapping("/ethereum")
1920
suspend fun getRate(): BigDecimal {
2021
for (blockchain in blockchains) {
21-
if (blockchain.getName().toLowerCase().startsWith("EthereumBlockchain")) {
22+
if (blockchain.getName().lowercase().startsWith("EthereumBlockchain")) {
2223
val price = binanceHttpClientApi.getExchangeRate(blockchain).price
2324
return BigDecimal.ONE.divide(price, price.scale(), RoundingMode.HALF_UP).stripTrailingZeros()
2425
}

src/main/kotlin/io/openfuture/state/service/BlockchainLookupService.kt

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@ package io.openfuture.state.service
22

33
import io.openfuture.state.blockchain.Blockchain
44
import org.springframework.stereotype.Service
5+
import java.util.*
56

67
@Service
78
class BlockchainLookupService(
89
private val blockchains: List<Blockchain>
910
) {
1011

1112
fun findBlockchain(name: String): Blockchain {
12-
val nameInLowerCase = name.toLowerCase()
13+
val nameInLowerCase = name.lowercase()
1314
for (blockchain in blockchains) {
14-
if (blockchain.getName().toLowerCase().startsWith(nameInLowerCase)) return blockchain
15+
if (blockchain.getName().lowercase().startsWith(nameInLowerCase)) return blockchain
1516
}
1617

1718
throw IllegalArgumentException("Can not find blockchain")

src/test/kotlin/io/openfuture/state/repository/WalletRepositoryTest.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ class WalletRepositoryTest : MongoRepositoryTests() {
1919
walletRepository.deleteAll().block()
2020
}
2121

22-
@Test
23-
@Ignore
22+
//@Test
2423
fun findByIdentityShouldReturnWallet() {
2524
var wallet = createDummyWallet(blockchain = "Ethereum", address = "address", id = "walletId")
2625
wallet = walletRepository.save(wallet).block()!!

0 commit comments

Comments
 (0)