diff --git a/app/src/main/java/cy/agorise/bitsybitshareswallet/processors/TransfersLoader.kt b/app/src/main/java/cy/agorise/bitsybitshareswallet/processors/TransfersLoader.kt index 2d96113..3f234fa 100644 --- a/app/src/main/java/cy/agorise/bitsybitshareswallet/processors/TransfersLoader.kt +++ b/app/src/main/java/cy/agorise/bitsybitshareswallet/processors/TransfersLoader.kt @@ -27,7 +27,6 @@ import io.reactivex.disposables.CompositeDisposable import io.reactivex.schedulers.Schedulers import org.bitcoinj.core.DumpedPrivateKey import org.bitcoinj.core.ECKey -import java.lang.IllegalArgumentException import java.util.* import javax.crypto.AEADBadTagException @@ -257,11 +256,13 @@ class TransfersLoader(private var mContext: Context?) { val memo = op.memo if (memo.byteMessage != null) { - val destinationAddress = memo.destination try { - if (destinationAddress.toString() == myAddress.toString()) { + if (memo.destination.equals(myAddress)) { val decryptedMessage = Memo.decryptMessage(memoKey, memo.source, memo.nonce, memo.byteMessage) memo.plaintextMessage = decryptedMessage + }else if(memo.source.equals(myAddress)){ + val decryptedMessage = Memo.decryptMessage(memoKey, memo.destination, memo.nonce, memo.byteMessage) + memo.plaintextMessage = decryptedMessage } } catch (e: ChecksumException) { Log.e(TAG, "ChecksumException. Msg: " + e.message) @@ -270,6 +271,10 @@ class TransfersLoader(private var mContext: Context?) { Log.e(TAG, "NullPointerException. Msg: " + e.message) } catch (e: Exception) { Log.e(TAG, "Exception while decoding memo. Msg: " + e.message) + Log.e(TAG,"Exception type: " + e) + for(element in e.stackTrace){ + Log.e(TAG, String.format("%s#%s:%d", element.className, element.methodName, element.lineNumber)) + } } } diff --git a/graphenejlib b/graphenejlib index 4c7c7b2..954cf3e 160000 --- a/graphenejlib +++ b/graphenejlib @@ -1 +1 @@ -Subproject commit 4c7c7b29b2d403e8f44a2a955e0ba22169d02a48 +Subproject commit 954cf3e16d77038feff711ed3b93818470e36b15