|
|
@ -77,11 +77,11 @@ public class UniversalLinkHandler { |
|
|
|
if let format = LinkFormat(rawValue: encodingByte) { |
|
|
|
if let format = LinkFormat(rawValue: encodingByte) { |
|
|
|
switch format { |
|
|
|
switch format { |
|
|
|
case .unassigned: |
|
|
|
case .unassigned: |
|
|
|
return handleUnSpawnableLink(linkBytes: linkBytes) |
|
|
|
return handleNormalLink(linkBytes: linkBytes) |
|
|
|
case .normal: |
|
|
|
case .normal: |
|
|
|
//new link format, remove extra byte and continue |
|
|
|
//new link format, remove extra byte and continue |
|
|
|
linkBytes.remove(at: 0) |
|
|
|
linkBytes.remove(at: 0) |
|
|
|
return handleUnSpawnableLink(linkBytes: linkBytes) |
|
|
|
return handleNormalLink(linkBytes: linkBytes) |
|
|
|
case .spawnable: |
|
|
|
case .spawnable: |
|
|
|
return handleSpawnableLink(linkBytes: linkBytes) |
|
|
|
return handleSpawnableLink(linkBytes: linkBytes) |
|
|
|
case .customizable: |
|
|
|
case .customizable: |
|
|
@ -95,7 +95,7 @@ public class UniversalLinkHandler { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private func handleUnSpawnableLink(linkBytes: [UInt8]) -> SignedOrder { |
|
|
|
private func handleNormalLink(linkBytes: [UInt8]) -> SignedOrder { |
|
|
|
let price = getPriceFromLinkBytes(linkBytes: linkBytes) |
|
|
|
let price = getPriceFromLinkBytes(linkBytes: linkBytes) |
|
|
|
let expiry = getExpiryFromLinkBytes(linkBytes: linkBytes) |
|
|
|
let expiry = getExpiryFromLinkBytes(linkBytes: linkBytes) |
|
|
|
let contractAddress = getContractAddressFromLinkBytes(linkBytes: linkBytes) |
|
|
|
let contractAddress = getContractAddressFromLinkBytes(linkBytes: linkBytes) |
|
|
|