Commit Graph

11 Commits

Author SHA1 Message Date
Francisco Gindre 5de1b50b29 make Memo and MemoBytes parameters nullable so they can be omitted when sending to transparent receivers.
update libzcashlc
2022-10-24 22:49:04 -03:00
Francisco Gindre 2fb25dcd35 Fix: Transaction repository tests pass 2022-10-21 18:19:08 -03:00
Kris Nuttycombe 7847a7195e Fix incorrect encoding of optional strings in PendingTransaction. 2022-10-19 14:58:51 -06:00
Francisco Gindre 789cf01188 Add Fee field to Transaction, ConfirmedTransaction, ReceivedTransactions and Pen
dingTransactions.
Update Notes DAOs with new fields.

Make Zatoshi Codable

add tests for Recipient.forEncodedAddress
2022-10-19 17:37:06 -03:00
Kris Nuttycombe 849083ffd9 Fix UInt32 conversions to SQL in PendingTransactionDao 2022-10-19 14:13:18 -06:00
Kris Nuttycombe 0fbf90dc82 Add migration to re-create pending_transactions table with nullable columns. 2022-10-18 19:44:34 -06:00
Kris Nuttycombe f5d7aa0f17 Modify PendingTransactionEntity to be able to represent internal shielding tx. 2022-10-18 10:07:23 -06:00
Francisco Gindre 9b930391a4 [#384] Adopt Type Safe Memos in the FFI and SDK
Closes #384

This makes the SDK use the Memo and MemoBytes types across the FFI and the
public interface of the SDKSynchronizer. Addresses the comments by @defuse  on
issue https://github.com/zcash/ZcashLightClientKit/issues/378.
These changes depend on zcash-light-client-ffi repo changes managing
memos as byte arrays instead of string encoding of memos.

There are some compromises in terms of database representation of memos
and their exposure in transaction representing entities because we
wanted to avoid changing the database at this moment and be retro-
compatible with earlier versions and maintain deprecated APIs for wallets
to have time to adopt.

Memo and MemoBytes are WIP and subject to change. we are exploring
making Memo an opaque type based on a struct and drop the enum approach
to make the interface less throwing.

Fix: wrap new functions and deprecate old API. catch Memo errors

update get_sent and get_received memo functions from rust welding
point to branch in FFI repo

Fix type Tests/DarksideTests/BalanceTests.swift

Co-authored-by: Carter Jernigan <git@carterjernigan.com>

PR suggestions. Inverted condition

PR Suggestions + cleanup

merge fixes

Suggestions from PR to treat null bytes on TextMemo

refactor unpaddedRawBytes function and add tests

undo change in PendingTransactionSQLDAO

Fix broken import on Swift Package for libzcashlc

Fix libzcashlc url

Fix travis.yml
2022-09-07 14:49:08 -03:00
Francisco Gindre c7a27c0b86
[#401] DecodingError when refreshing pending transactions (#402)
Closes #401
This commit changes the way Codable in implemented for Zatoshi and PendingTransaction.

SQLite attempts to decode Custom Types as JSONStrings inside a TEXT column whereas Zatoshi only needs to be an INTEGER that can be treated as an Int64 value

`ConfirmedTransaction` entity is not affected because it is already deserialized
in a custom fashion whereas `PendingTransaction` was relying on `Codable` and
`CodingKey`.
2022-06-27 12:51:13 -03:00
Francisco Gindre b9ae012e09
[#381] Move Zatoshi and Amount Types to the SDK (#396)
Closes #381

This commit brings a Zatoshi type developed on the Secant project,
helper classes like Clamped and tests.

Zatoshi has been incorporated as a Codable type for SQLite Swift
to allow serialization into the pending database.

FIXES on Demo App

fix comments
2022-06-22 16:45:37 -03:00
Daniel Haight 86d1257ab5 Remove dependecy on rust sources 2022-02-28 17:03:20 +00:00