Fix incorrect encoding of optional strings in PendingTransaction.
This commit is contained in:
parent
789cf01188
commit
7847a7195e
|
@ -152,7 +152,7 @@ struct PendingTransaction: PendingTransactionEntity, Decodable, Encodable {
|
||||||
accountId = Int(acct)
|
accountId = Int(acct)
|
||||||
}
|
}
|
||||||
|
|
||||||
try container.encode(toAddress, forKey: .toAddress)
|
try container.encodeIfPresent(toAddress, forKey: .toAddress)
|
||||||
try container.encodeIfPresent(accountId, forKey: .toInternalAccount)
|
try container.encodeIfPresent(accountId, forKey: .toInternalAccount)
|
||||||
try container.encode(self.accountIndex, forKey: .accountIndex)
|
try container.encode(self.accountIndex, forKey: .accountIndex)
|
||||||
try container.encode(self.minedHeight, forKey: .minedHeight)
|
try container.encode(self.minedHeight, forKey: .minedHeight)
|
||||||
|
|
Loading…
Reference in New Issue