-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Intent/SignedIntent Hash formatted method (#56)
- Loading branch information
1 parent
2e55016
commit b78ff0a
Showing
5 changed files
with
96 additions
and
7 deletions.
There are no files selected for viewing
7 changes: 6 additions & 1 deletion
7
jvm/sargon-android/src/main/java/com/radixdlt/sargon/extensions/IntentHash.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 |
---|---|---|
@@ -1,8 +1,13 @@ | ||
package com.radixdlt.sargon.extensions | ||
|
||
import com.radixdlt.sargon.AddressFormat | ||
import com.radixdlt.sargon.IntentHash | ||
import com.radixdlt.sargon.intentHashFormatted | ||
import com.radixdlt.sargon.newIntentHashFromString | ||
|
||
@Throws(SargonException::class) | ||
fun IntentHash.Companion.init(string: String) = | ||
newIntentHashFromString(string = string) | ||
newIntentHashFromString(string = string) | ||
|
||
fun IntentHash.formatted(format: AddressFormat = AddressFormat.DEFAULT) = | ||
intentHashFormatted(address = this, format = format) |
7 changes: 6 additions & 1 deletion
7
jvm/sargon-android/src/main/java/com/radixdlt/sargon/extensions/SignedIntentHash.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 |
---|---|---|
@@ -1,8 +1,13 @@ | ||
package com.radixdlt.sargon.extensions | ||
|
||
import com.radixdlt.sargon.AddressFormat | ||
import com.radixdlt.sargon.SignedIntentHash | ||
import com.radixdlt.sargon.newSignedIntentHashFromString | ||
import com.radixdlt.sargon.signedIntentHashFormatted | ||
|
||
@Throws(SargonException::class) | ||
fun SignedIntentHash.Companion.init(string: String) = | ||
newSignedIntentHashFromString(string = string) | ||
newSignedIntentHashFromString(string = string) | ||
|
||
fun SignedIntentHash.formatted(format: AddressFormat = AddressFormat.DEFAULT) = | ||
signedIntentHashFormatted(address = this, format = format) |
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