Replace setAddresses index const with number

This commit is contained in:
Honza 2023-01-31 09:44:12 +01:00
parent ef248c9dc5
commit fa031d693d
3 changed files with 2 additions and 3 deletions

View File

@ -127,7 +127,7 @@ internal class BlockingLightWalletClientImpl private constructor(
}
val result = requireChannel().createStub().getAddressUtxos(
Service.GetAddressUtxosArg.newBuilder().setAddresses(Constants.TRANSPARENT_ADDRESS_INDEX, tAddress)
Service.GetAddressUtxosArg.newBuilder().setAddresses(0, tAddress)
.setStartHeight(startHeight.value).build()
)
return result.addressUtxosList.asSequence()

View File

@ -3,5 +3,4 @@ package co.electriccoin.lightwallet.client.internal
internal object Constants {
const val LOG_TAG = "LightWalletClient" // NON-NLS
const val ILLEGAL_ARGUMENT_EXCEPTION_MESSAGE = "Illegal argument provided - can't be empty:" // NON-NLS
const val TRANSPARENT_ADDRESS_INDEX = 0
}

View File

@ -128,7 +128,7 @@ internal class CoroutineLightWalletClientImpl private constructor(
"${Constants.ILLEGAL_ARGUMENT_EXCEPTION_MESSAGE} address: $tAddress." // NON-NLS
}
return requireChannel().createStub().getAddressUtxosStream(
Service.GetAddressUtxosArg.newBuilder().setAddresses(Constants.TRANSPARENT_ADDRESS_INDEX, tAddress)
Service.GetAddressUtxosArg.newBuilder().setAddresses(0, tAddress)
.setStartHeight(startHeight.value).build()
)
}