Fix incorrect encoding of optional strings in PendingTransaction.

This commit is contained in:
Kris Nuttycombe 2022-10-19 14:58:51 -06:00
parent 789cf01188
commit 7847a7195e
1 changed files with 1 additions and 1 deletions

View File

@ -152,7 +152,7 @@ struct PendingTransaction: PendingTransactionEntity, Decodable, Encodable {
accountId = Int(acct)
}
try container.encode(toAddress, forKey: .toAddress)
try container.encodeIfPresent(toAddress, forKey: .toAddress)
try container.encodeIfPresent(accountId, forKey: .toInternalAccount)
try container.encode(self.accountIndex, forKey: .accountIndex)
try container.encode(self.minedHeight, forKey: .minedHeight)