Skip to content

Commit

Permalink
Fix currency version serialization (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyav authored Nov 7, 2024
1 parent 0046871 commit 983cf2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions uma/uma.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,9 @@ func GetLnurlpResponse(
// Ensure currencies are correctly serialized:
if umaVersion != nil {
umaVersionParsed, err := ParseVersion(*umaVersion)
if err != nil && umaVersionParsed != nil && umaVersionParsed.Major == 0 {
if err == nil && umaVersionParsed != nil {
for i := range *currencyOptions {
(*currencyOptions)[i].UmaMajorVersion = 0
(*currencyOptions)[i].UmaMajorVersion = umaVersionParsed.Major
}
}
}
Expand Down

0 comments on commit 983cf2d

Please sign in to comment.