Skip to content

Commit 5b5cb52

Browse files
committed
fix(LbryUri): stream/channel claim id from primary/secondary
Use optional chaining instead of faulty non-nil logic which led to id on both stream/channel with urls like `@channel:id`
1 parent 9eb6163 commit 5b5cb52

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Odysee/Utils/LbryUri.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,8 @@ struct LbryUri: CustomStringConvertible {
279279
}
280280

281281
let streamName: String? = includesChannel ? possibleStreamName : streamOrChannelName
282-
let streamClaimId: String? = includesChannel && secondaryMod != nil ? secondaryMod?
283-
.claimId : primaryMod != nil ? primaryMod?.claimId : nil
284-
let channelClaimId: String? = includesChannel && primaryMod != nil ? primaryMod?.claimId : nil
282+
let streamClaimId: String? = includesChannel ? secondaryMod?.claimId : primaryMod?.claimId
283+
let channelClaimId: String? = includesChannel ? primaryMod?.claimId : nil
285284

286285
return LbryUri(
287286
path: path,

0 commit comments

Comments
 (0)