From c3f61932f55945cc226780578496fde19dc1b000 Mon Sep 17 00:00:00 2001 From: Ravi Patel <82118011+rpatel-figure@users.noreply.github.com> Date: Mon, 11 Dec 2023 11:25:17 -0600 Subject: [PATCH] Fix scope requests no longer including the request (#136) --- .../frameworks/provenance/ProvenanceService.kt | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/service/src/main/kotlin/io/provenance/api/frameworks/provenance/ProvenanceService.kt b/service/src/main/kotlin/io/provenance/api/frameworks/provenance/ProvenanceService.kt index 94fd229..4f3956c 100644 --- a/service/src/main/kotlin/io/provenance/api/frameworks/provenance/ProvenanceService.kt +++ b/service/src/main/kotlin/io/provenance/api/frameworks/provenance/ProvenanceService.kt @@ -99,14 +99,13 @@ class ProvenanceService : Provenance { override fun getScope(config: ProvenanceConfig, scopeUuid: UUID, height: Long?): ScopeResponse = PbClient(config.chainId, URI(config.nodeEndpoint), GasEstimationMethod.MSG_FEE_CALCULATION).use { pbClient -> pbClient.metadataClient.scope( - ScopeRequest.newBuilder() - .setScopeId(scopeUuid.toString()) - .setIncludeRecords(true) - .setIncludeSessions(true) - .also { - height?.let { pbClient.metadataClient.addBlockHeight(it.toString()) } - } - .build() + ScopeRequest.newBuilder().apply { + scopeId = scopeUuid.toString() + includeRecords = true + includeSessions = true + includeRequest = true + height?.let { pbClient.metadataClient.addBlockHeight(it.toString()) } + }.build() ) }