Skip to content

Commit

Permalink
Fix parsing memo
Browse files Browse the repository at this point in the history
  • Loading branch information
abdrasulov committed Apr 12, 2024
1 parent ca87823 commit 80fd413
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,13 @@ class BaseTransactionInfoConverter(private val pluginManager: PluginManager) {
val payload = output.lockingScriptPayload ?: return null
if (payload.isEmpty()) return null

val input = BitcoinInput(ByteArrayInputStream(payload))
input.readByte() // op_return
return input.readString()
return try {
val input = BitcoinInput(ByteArrayInputStream(payload))
input.readByte() // op_return
input.readString()
} catch (e: Throwable) {
null
}
}

private fun getInvalidTransactionInfo(
Expand Down

0 comments on commit 80fd413

Please sign in to comment.