fix format to 4 bytes func

pull/196/head
James Sangalli 7 years ago
parent e055d6d2a1
commit c351475f96
  1. 3
      Trust/Market/UniversalLinkHandler.swift
  2. 8
      Trust/Transactions/Coordinators/TicketsCoordinator.swift

@ -130,6 +130,9 @@ public class UniversalLinkHandler {
for _ in 0...missingDigits - 1 {
formattedArray.append(0)
}
for i in 0...array.count - 1 {
formattedArray.append(array[i])
}
return formattedArray
}
}

@ -258,12 +258,16 @@ class TicketsCoordinator: NSObject, Coordinator {
// self.delegate?.importPaidSignedOrder(signedOrder: signedOrder, tokenObject: tokenObj)
//TODO check ether casting to wei
private func generateSellLink(ticketHolder: TicketHolder, linkExpiryDate: Date, ethCost: String, dollarCost: String, paymentFlow: PaymentFlow) -> String {
private func generateSellLink(ticketHolder: TicketHolder,
linkExpiryDate: Date,
ethCost: String,
dollarCost: String,
paymentFlow: PaymentFlow) -> String {
let wei = BigUInt(ethCost)! * 1000000000000000000
let order = Order(
price: wei,
indices: ticketHolder.ticketIndices,
expiry: BigUInt(linkExpiryDate.timeIntervalSince1970.description)!,
expiry: BigUInt(Int(linkExpiryDate.timeIntervalSince1970)),
contractAddress: Constants.fifaContractAddress,
start: BigUInt("0")!,
count: ticketHolder.ticketIndices.count

Loading…
Cancel
Save