mirror of
https://github.com/mollyim/monero-wallet-sdk.git
synced 2024-10-01 03:45:36 -04:00
lib: rename skipCoinbaseOutputs to ignoreMiningRewards
This commit is contained in:
parent
44223c962b
commit
f406edcf8c
@ -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);
|
||||
|
@ -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) {}
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user