lib: rename skipCoinbaseOutputs to ignoreMiningRewards

This commit is contained in:
Oscar Mira 2024-02-13 20:10:28 +01:00
parent 44223c962b
commit f406edcf8c
3 changed files with 5 additions and 5 deletions

View File

@ -7,7 +7,7 @@ interface IWallet {
String getAccountPrimaryAddress();
void addBalanceListener(in IBalanceListener listener);
void removeBalanceListener(in IBalanceListener listener);
oneway void resumeRefresh(boolean skipCoinbaseOutputs, in IWalletCallbacks callback);
oneway void resumeRefresh(boolean skipCoinbase, in IWalletCallbacks callback);
oneway void cancelRefresh();
oneway void setRefreshSince(long heightOrTimestamp);
oneway void commit(in IWalletCallbacks callback);

View File

@ -55,9 +55,9 @@ class MoneroWallet internal constructor(
@OptIn(ExperimentalCoroutinesApi::class)
suspend fun awaitRefresh(
skipCoinbaseOutputs: Boolean = false,
ignoreMiningRewards: Boolean = true,
): RefreshResult = suspendCancellableCoroutine { continuation ->
wallet.resumeRefresh(skipCoinbaseOutputs, object : BaseWalletCallbacks() {
wallet.resumeRefresh(ignoreMiningRewards, object : BaseWalletCallbacks() {
override fun onRefreshResult(blockchainTime: BlockchainTime, status: Int) {
val result = RefreshResult(blockchainTime, status)
continuation.resume(result) {}

View File

@ -133,13 +133,13 @@ class WalletNative private constructor(
@OptIn(ExperimentalCoroutinesApi::class)
override fun resumeRefresh(
skipCoinbaseOutputs: Boolean,
skipCoinbase: Boolean,
callback: IWalletCallbacks?,
) {
scope.launch {
val status = suspendCancellableCoroutine { continuation ->
launch(singleThreadedDispatcher) {
continuation.resume(nativeNonReentrantRefresh(handle, skipCoinbaseOutputs)) {}
continuation.resume(nativeNonReentrantRefresh(handle, skipCoinbase)) {}
}
continuation.invokeOnCancellation {
nativeCancelRefresh(handle)