mirror of
https://github.com/mollyim/monero-wallet-sdk.git
synced 2025-02-18 13:24:24 -05:00
lib: rename function fullNode to localSyncWallet
This commit is contained in:
parent
874f777deb
commit
8dbf0ffb6b
@ -10,21 +10,21 @@ class WalletNativeTest {
|
||||
@Test
|
||||
fun keyGenerationIsDeterministic() {
|
||||
assertThat(
|
||||
WalletNative.fullNode(
|
||||
WalletNative.localSyncWallet(
|
||||
networkId = MoneroNetwork.Mainnet.id,
|
||||
secretSpendKey = SecretKey("d2ca26e22489bd9871c910c58dee3ab08e66b9d566825a064c8c0af061cd8706".parseHex()),
|
||||
).primaryAccountAddress
|
||||
).isEqualTo("4AYjQM9HoAFNUeC3cvSfgeAN89oMMpMqiByvunzSzhn97cj726rJj3x8hCbH58UnMqQJShczCxbpWRiCJQ3HCUDHLiKuo4T")
|
||||
|
||||
assertThat(
|
||||
WalletNative.fullNode(
|
||||
WalletNative.localSyncWallet(
|
||||
networkId = MoneroNetwork.Testnet.id,
|
||||
secretSpendKey = SecretKey("48a35268bc33227eea43ac1ecfd144d51efc023c115c26ca68a01cc6201e9900".parseHex()),
|
||||
).primaryAccountAddress
|
||||
).isEqualTo("A1v6gVUcGgGE87c1uFRWB1KfPVik2qLLDJiZT3rhZ8qjF3BGA6oHzeDboD23dH8rFaFFcysyqwF6DBj8WUTBWwEhESB7nZz")
|
||||
|
||||
assertThat(
|
||||
WalletNative.fullNode(
|
||||
WalletNative.localSyncWallet(
|
||||
networkId = MoneroNetwork.Stagenet.id,
|
||||
secretSpendKey = SecretKey("561a8d4e121ffca7321a7dc6af79679ceb4cdc8c0dcb0ef588b574586c5fac04".parseHex()),
|
||||
).primaryAccountAddress
|
||||
@ -35,13 +35,13 @@ class WalletNativeTest {
|
||||
@Test
|
||||
fun publicAddressesAreDistinct() {
|
||||
val publicAddress =
|
||||
WalletNative.fullNode(
|
||||
WalletNative.localSyncWallet(
|
||||
networkId = MoneroNetwork.Mainnet.id,
|
||||
secretSpendKey = randomSecretKey(),
|
||||
).primaryAccountAddress
|
||||
|
||||
val anotherPublicAddress =
|
||||
WalletNative.fullNode(
|
||||
WalletNative.localSyncWallet(
|
||||
networkId = MoneroNetwork.Mainnet.id,
|
||||
secretSpendKey = randomSecretKey(),
|
||||
).primaryAccountAddress
|
||||
@ -52,7 +52,7 @@ class WalletNativeTest {
|
||||
@Test
|
||||
fun atGenesisBalanceIsZero() {
|
||||
with(
|
||||
WalletNative.fullNode(
|
||||
WalletNative.localSyncWallet(
|
||||
networkId = MoneroNetwork.Mainnet.id,
|
||||
secretSpendKey = randomSecretKey(),
|
||||
).currentBalance
|
||||
|
@ -25,8 +25,7 @@ internal class WalletNative private constructor(
|
||||
) : IWallet.Stub(), Closeable {
|
||||
|
||||
companion object {
|
||||
// TODO: Find better name because this is a local synchronization wallet, not a full node wallet
|
||||
suspend fun fullNode(
|
||||
suspend fun localSyncWallet(
|
||||
networkId: Int,
|
||||
storageAdapter: IStorageAdapter,
|
||||
rpcClient: IHttpRpcClient? = null,
|
||||
|
@ -79,7 +79,7 @@ internal class WalletServiceImpl(
|
||||
callback: IWalletServiceCallbacks?,
|
||||
) {
|
||||
serviceScope.launch {
|
||||
val wallet = WalletNative.fullNode(
|
||||
val wallet = WalletNative.localSyncWallet(
|
||||
networkId = config.networkId,
|
||||
storageAdapter = storage,
|
||||
rpcClient = rpcClient,
|
||||
@ -96,7 +96,7 @@ internal class WalletServiceImpl(
|
||||
secretSpendKey: SecretKey,
|
||||
restorePoint: Long? = null,
|
||||
): IWallet {
|
||||
return WalletNative.fullNode(
|
||||
return WalletNative.localSyncWallet(
|
||||
networkId = config.networkId,
|
||||
storageAdapter = storage,
|
||||
rpcClient = rpcClient,
|
||||
|
Loading…
x
Reference in New Issue
Block a user