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();
|
String getAccountPrimaryAddress();
|
||||||
void addBalanceListener(in IBalanceListener listener);
|
void addBalanceListener(in IBalanceListener listener);
|
||||||
void removeBalanceListener(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 cancelRefresh();
|
||||||
oneway void setRefreshSince(long heightOrTimestamp);
|
oneway void setRefreshSince(long heightOrTimestamp);
|
||||||
oneway void commit(in IWalletCallbacks callback);
|
oneway void commit(in IWalletCallbacks callback);
|
||||||
|
@ -55,9 +55,9 @@ class MoneroWallet internal constructor(
|
|||||||
|
|
||||||
@OptIn(ExperimentalCoroutinesApi::class)
|
@OptIn(ExperimentalCoroutinesApi::class)
|
||||||
suspend fun awaitRefresh(
|
suspend fun awaitRefresh(
|
||||||
skipCoinbaseOutputs: Boolean = false,
|
ignoreMiningRewards: Boolean = true,
|
||||||
): RefreshResult = suspendCancellableCoroutine { continuation ->
|
): RefreshResult = suspendCancellableCoroutine { continuation ->
|
||||||
wallet.resumeRefresh(skipCoinbaseOutputs, object : BaseWalletCallbacks() {
|
wallet.resumeRefresh(ignoreMiningRewards, object : BaseWalletCallbacks() {
|
||||||
override fun onRefreshResult(blockchainTime: BlockchainTime, status: Int) {
|
override fun onRefreshResult(blockchainTime: BlockchainTime, status: Int) {
|
||||||
val result = RefreshResult(blockchainTime, status)
|
val result = RefreshResult(blockchainTime, status)
|
||||||
continuation.resume(result) {}
|
continuation.resume(result) {}
|
||||||
|
@ -133,13 +133,13 @@ class WalletNative private constructor(
|
|||||||
|
|
||||||
@OptIn(ExperimentalCoroutinesApi::class)
|
@OptIn(ExperimentalCoroutinesApi::class)
|
||||||
override fun resumeRefresh(
|
override fun resumeRefresh(
|
||||||
skipCoinbaseOutputs: Boolean,
|
skipCoinbase: Boolean,
|
||||||
callback: IWalletCallbacks?,
|
callback: IWalletCallbacks?,
|
||||||
) {
|
) {
|
||||||
scope.launch {
|
scope.launch {
|
||||||
val status = suspendCancellableCoroutine { continuation ->
|
val status = suspendCancellableCoroutine { continuation ->
|
||||||
launch(singleThreadedDispatcher) {
|
launch(singleThreadedDispatcher) {
|
||||||
continuation.resume(nativeNonReentrantRefresh(handle, skipCoinbaseOutputs)) {}
|
continuation.resume(nativeNonReentrantRefresh(handle, skipCoinbase)) {}
|
||||||
}
|
}
|
||||||
continuation.invokeOnCancellation {
|
continuation.invokeOnCancellation {
|
||||||
nativeCancelRefresh(handle)
|
nativeCancelRefresh(handle)
|
||||||
|
Loading…
Reference in New Issue
Block a user