|
|
@ -22,9 +22,7 @@ class TokenAdaptor { |
|
|
|
for (index, item) in balance.enumerated() { |
|
|
|
for (index, item) in balance.enumerated() { |
|
|
|
//id is the value of the bytes32 ticket |
|
|
|
//id is the value of the bytes32 ticket |
|
|
|
let id = item.balance |
|
|
|
let id = item.balance |
|
|
|
if id == Constants.nullTicket { // if balance is 0, then skip |
|
|
|
guard isNonZeroBalance(id) else { continue } |
|
|
|
continue |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if let ticketInt = BigUInt(id.drop0x, radix: 16) { |
|
|
|
if let ticketInt = BigUInt(id.drop0x, radix: 16) { |
|
|
|
let ticket = getTicket(for: ticketInt, index: UInt16(index), in: token) |
|
|
|
let ticket = getTicket(for: ticketInt, index: UInt16(index), in: token) |
|
|
|
tickets.append(ticket) |
|
|
|
tickets.append(ticket) |
|
|
|