Skip to content

Commit

Permalink
move json builder further down
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottAntonacAP committed Jun 4, 2024
1 parent 2efb5e7 commit d37be0d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ data class AfterpayCashAppJwt(
companion object {
fun decode(jwt: String): Result<AfterpayCashAppJwt> {
return runCatching {
val json = Json { ignoreUnknownKeys = true }
val split = jwt.split(".").toTypedArray()
val jwtBody = getJson(split[1])

val json = Json { ignoreUnknownKeys = true }
json.decodeFromString(jwtBody)
}
}
Expand Down

0 comments on commit d37be0d

Please sign in to comment.