Skip to content
This repository has been archived by the owner on May 14, 2021. It is now read-only.

Commit

Permalink
Merge pull request #66 from kinecosystem/is_burned_remove_public_addres
Browse files Browse the repository at this point in the history
remove public address from isAccountBurned
  • Loading branch information
yosriz authored Jan 17, 2019
2 parents 62fed9a + 14f5749 commit 7e18d19
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 1 addition & 4 deletions kin-core/src/main/java/kin/core/KinAccount.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import java.math.BigDecimal;

import kin.core.exception.AccountDeletedException;
import kin.core.exception.AccountNotActivatedException;
import kin.core.exception.AccountNotFoundException;
Expand Down Expand Up @@ -90,15 +89,13 @@ TransactionId sendTransactionSync(@NonNull String publicAddress, @NonNull BigDec
* Checks if the account is "burned", which means that this account is no more active and no kin can be transferred to this account.
* <p><b>Note:</b> This method accesses the network, and should not be called on the android main thread.</p>
*
* @param publicAddress the account address to send the specified kin amount.
* @return true if this account is "burned", false otherwise.
* @throws AccountNotFoundException if the sender or destination account was not created.
* @throws AccountNotActivatedException if the sender or destination account is not activated.
* @throws AccountDeletedException if the account is deleted.
* @throws OperationFailedException other error occurred.
*/
@NonNull
boolean isAccountBurnedSync(@NonNull String publicAddress) throws OperationFailedException;
boolean isAccountBurnedSync() throws OperationFailedException;

/**
* Create, sign and send a transaction which "burns" the given account, which means that this account
Expand Down
5 changes: 2 additions & 3 deletions kin-core/src/main/java/kin/core/KinAccountImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,10 @@ public TransactionId sendBurnAccountTransactionSync(@NonNull String publicAddres
return transactionSender.sendBurnTransaction(account, getBalanceSync().value());
}

@NonNull
@Override
public boolean isAccountBurnedSync(@NonNull String publicAddress) throws OperationFailedException {
public boolean isAccountBurnedSync() throws OperationFailedException {
checkValidAccount();
return accountInfoRetriever.isAccountBurned(publicAddress);
return accountInfoRetriever.isAccountBurned(account.getAccountId());
}

@NonNull
Expand Down

0 comments on commit 7e18d19

Please sign in to comment.