Electric-Coin-Company / zcash-swift-wallet-sdk

iOS light client Framework proof-of-concept
MIT License
37 stars 34 forks source link

Zatoshi BinaryInteger conformance #1391

Open LukasKorba opened 2 months ago

LukasKorba commented 2 months ago

Any mathematical operation with Zatoshi forces users of Zatoshi type to use.amount. This can be optimized and improved with BinaryInteger protocol.

let value = Zatoshi(100)

// write
if value > 100 { ... }

// instead of
if value.amount > 100 { ... }