Skip to content

Commit 3dad4b7

Browse files
committed
Bug fix
1 parent 716d6d8 commit 3dad4b7

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

  • bc-gateway
    • bc-gateway-app/src/main/kotlin/co/nilin/opex/bcgateway/app/controller
    • bc-gateway-ports/bc-gateway-persister-postgres/src/main/kotlin/co/nilin/opex/bcgateway/ports/postgres/impl

bc-gateway/bc-gateway-app/src/main/kotlin/co/nilin/opex/bcgateway/app/controller/AdminController.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,14 @@ class AdminController(
2424
@GetMapping("/chain")
2525
suspend fun getChains(): List<ChainResponse> {
2626
return chainLoader.fetchAllChains()
27-
.map { c -> ChainResponse(c.name, c.addressTypes.map { it.type }.getOrNull(0), c.externalChinScannerUrl, c.addressRegx) }
27+
.map { c ->
28+
ChainResponse(
29+
c.name,
30+
c.addressTypes.map { it.type }.getOrNull(0),
31+
c.externalChinScannerUrl,
32+
c.addressTypes.map { it.addressRegex }.getOrNull(0)
33+
)
34+
}
2835
}
2936

3037
@PostMapping("/chain")

bc-gateway/bc-gateway-ports/bc-gateway-persister-postgres/src/main/kotlin/co/nilin/opex/bcgateway/ports/postgres/impl/ChainHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class ChainHandler(
4444
.map { AddressType(it.id!!, it.type, it.addressRegex, it.memoRegex) }
4545
.toList()
4646

47-
Chain(c.name, addressTypes, c.externalChainScannerUrl, c.addressRegex)
47+
Chain(c.name, addressTypes, c.externalChainScannerUrl)
4848
}
4949
}
5050

0 commit comments

Comments
 (0)