From 7ef37708edc4a5bb5dae746a9dc760bcfdf89a5f Mon Sep 17 00:00:00 2001 From: chyngyz Date: Tue, 19 Dec 2023 11:55:53 +0600 Subject: [PATCH] Change method name --- .../main/kotlin/io/horizontalsystems/bitcoincore/BitcoinCore.kt | 2 +- .../bitcoincore/WatchAddressPublicKeyManager.kt | 2 +- .../kotlin/io/horizontalsystems/bitcoincore/core/Interfaces.kt | 2 +- .../bitcoincore/managers/AccountPublicKeyManager.kt | 2 +- .../horizontalsystems/bitcoincore/managers/PublicKeyManager.kt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/BitcoinCore.kt b/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/BitcoinCore.kt index bc2f3b0e..3317ac7b 100644 --- a/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/BitcoinCore.kt +++ b/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/BitcoinCore.kt @@ -205,7 +205,7 @@ class BitcoinCore( } fun usedAddresses(): List { - return publicKeyManager.usedPublicKeys().map { + return publicKeyManager.usedExternalPublicKeys().map { UsedAddress( index = it.index, address = addressConverter.convert(it, purpose.scriptType).stringValue diff --git a/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/WatchAddressPublicKeyManager.kt b/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/WatchAddressPublicKeyManager.kt index 15dbd286..04767051 100644 --- a/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/WatchAddressPublicKeyManager.kt +++ b/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/WatchAddressPublicKeyManager.kt @@ -20,7 +20,7 @@ class WatchAddressPublicKeyManager( override fun receivePublicKey() = publicKey - override fun usedPublicKeys(): List = listOf(publicKey) + override fun usedExternalPublicKeys(): List = listOf(publicKey) override fun fillGap() { bloomFilterManager?.regenerateBloomFilter() diff --git a/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/core/Interfaces.kt b/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/core/Interfaces.kt index 59a0842a..394073a0 100644 --- a/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/core/Interfaces.kt +++ b/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/core/Interfaces.kt @@ -252,7 +252,7 @@ interface IAccountWallet { interface IPublicKeyManager { fun changePublicKey(): PublicKey fun receivePublicKey(): PublicKey - fun usedPublicKeys(): List + fun usedExternalPublicKeys(): List fun fillGap() fun addKeys(keys: List) fun gapShifts(): Boolean diff --git a/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/managers/AccountPublicKeyManager.kt b/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/managers/AccountPublicKeyManager.kt index 9b68712e..af76d0b1 100644 --- a/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/managers/AccountPublicKeyManager.kt +++ b/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/managers/AccountPublicKeyManager.kt @@ -29,7 +29,7 @@ class AccountPublicKeyManager( return getPublicKey(external = true) } - override fun usedPublicKeys(): List { + override fun usedExternalPublicKeys(): List { return storage.getPublicKeysWithUsedState().filter { it.publicKey.external && it.used }.map { it.publicKey } } diff --git a/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/managers/PublicKeyManager.kt b/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/managers/PublicKeyManager.kt index dbd0204c..e98f3ee3 100644 --- a/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/managers/PublicKeyManager.kt +++ b/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/managers/PublicKeyManager.kt @@ -36,7 +36,7 @@ class PublicKeyManager( return getPublicKey(external = false) } - override fun usedPublicKeys(): List { + override fun usedExternalPublicKeys(): List { return storage.getPublicKeysWithUsedState().filter { it.publicKey.external && it.used }.map { it.publicKey } }