-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Distinct between decryptAndStoreTransaction and setTransactionStatus path by minedHeight - Convert from RawStatusUnsafe to TransactionStatus - Add RawTransaction object and related functions - These changes resolve older issue #1254
- Loading branch information
Showing
11 changed files
with
213 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,4 +32,4 @@ interface JniTransactionDataRequest { | |
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
sdk-lib/src/main/java/cash/z/ecc/android/sdk/internal/model/ext/RawTransactionUnsafeExt.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package cash.z.ecc.android.sdk.internal.model.ext | ||
|
||
import cash.z.ecc.android.sdk.internal.model.TransactionStatus | ||
import cash.z.ecc.android.sdk.model.ZcashNetwork | ||
import co.electriccoin.lightwallet.client.model.RawTransactionUnsafe | ||
import co.electriccoin.lightwallet.client.model.RawTransactionUnsafe.MainChain | ||
import co.electriccoin.lightwallet.client.model.RawTransactionUnsafe.Mempool | ||
import co.electriccoin.lightwallet.client.model.RawTransactionUnsafe.OrphanedBlock | ||
|
||
internal fun RawTransactionUnsafe.toTransactionStatus(network: ZcashNetwork): TransactionStatus { | ||
return when (this) { | ||
is MainChain -> TransactionStatus.Mined(height.toBlockHeight(network)) | ||
is Mempool -> TransactionStatus.NotInMainChain | ||
is OrphanedBlock -> TransactionStatus.TxidNotRecognized | ||
} | ||
} |
Oops, something went wrong.