Compare commits

..

6 commits

Author SHA1 Message Date
9ab31a6d9b Merge branch 'master' of git.vergara.tech:Vergara_Tech/zenith into branch 'rvv001' 2025-01-10 09:58:46 -05:00
9d4e8a255b rvv001 - Issue 0085 - URI support implemented (GUI & TUI) 2025-01-10 09:49:34 -05:00
16cf30a8e4 Fix #111 (#112)
This PR fixes the bug reported on #111 regarding change addresses in the GUI.

Reviewed-on: #112
Co-authored-by: Rene Vergara <rene@vergara.network>
Co-committed-by: Rene Vergara <rene@vergara.network>
2025-01-09 15:01:00 +00:00
9aaf712bad rvv001 - Start URI payment form 2025-01-08 14:27:09 -05:00
19643ff022
Merge pull request 'Maintenance (#106)' (#107) from milestone4 into master
Reviewed-on: https://git.vergara.tech/Vergara_Tech/zenith/pulls/107
2024-12-17 14:50:15 +00:00
15e120bb14
Maintenance (#106)
This PR contains maintenance code to align with Zebra 2.1.0 and updated Haskell  dependencies.

Reviewed-on: https://git.vergara.tech/Vergara_Tech/zenith/pulls/106
Co-authored-by: Rene Vergara <rene@vergara.network>
Co-committed-by: Rene Vergara <rene@vergara.network>
2024-12-16 16:08:50 +00:00
13 changed files with 279 additions and 195 deletions

3
.gitmodules vendored
View file

@ -1,4 +1,3 @@
[submodule "zcash-haskell"] [submodule "zcash-haskell"]
path = zcash-haskell path = zcash-haskell
url = https://git.vergara.tech/Vergara_Tech/zcash-haskell.git url = https://code.vergara.tech/Vergara_Tech/zcash-haskell
branch = master

View file

@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.7.2.0-beta]
### Fixed
- Creation of change addresses during account creation in GUI ([#111](https://code.vergara.tech/Vergara_Tech/zenith/issues/111))
## [0.7.1.0-beta]
### Changed
- Removed workaround to obtain block time
## [0.7.0.0-beta] ## [0.7.0.0-beta]
### Added ### Added

View file

@ -76,7 +76,7 @@ main = do
zebraPort zebraPort
(zgb_net chainInfo) (zgb_net chainInfo)
threadDelay 90000000 threadDelay 90000000
putStrLn "Zenith RPC Server 0.7.0.0-beta" putStrLn "Zenith RPC Server 0.7.2.0-beta"
putStrLn "------------------------------" putStrLn "------------------------------"
putStrLn $ putStrLn $
"Connected to " ++ "Connected to " ++

View file

@ -6,10 +6,10 @@ with-compiler: ghc-9.6.5
source-repository-package source-repository-package
type: git type: git
location: https://git.vergara.tech/Vergara_Tech/haskell-hexstring.git location: https://code.vergara.tech/Vergara_Tech/haskell-hexstring.git
tag: 39d8da7b11a80269454c2f134a5c834e0f3cb9a7 tag: 39d8da7b11a80269454c2f134a5c834e0f3cb9a7
source-repository-package source-repository-package
type: git type: git
location: https://git.vergara.tech/Vergara_Tech/haskell-foreign-rust.git location: https://code.vergara.tech/Vergara_Tech/haskell-foreign-rust.git
tag: 335e804454cd30da2c526457be37e477f71e4665 tag: 335e804454cd30da2c526457be37e477f71e4665

View file

@ -9,19 +9,18 @@ constraints: any.Cabal ==3.10.3.0,
any.OneTuple ==0.4.2, any.OneTuple ==0.4.2,
any.OpenGLRaw ==3.3.4.1, any.OpenGLRaw ==3.3.4.1,
OpenGLRaw -osandroid +usegles2 +useglxgetprocaddress +usenativewindowslibraries, OpenGLRaw -osandroid +usegles2 +useglxgetprocaddress +usenativewindowslibraries,
any.QuickCheck ==2.14.3, any.QuickCheck ==2.15.0.1,
QuickCheck -old-random +templatehaskell, QuickCheck -old-random +templatehaskell,
any.RSA ==2.4.1, any.RSA ==2.4.1,
any.SHA ==1.6.4.4, any.SHA ==1.6.4.4,
SHA -exe, SHA -exe,
any.StateVar ==1.2.2, any.StateVar ==1.2.2,
any.X11 ==1.10.3, any.X11 ==1.9.2,
X11 -pedantic,
any.adjunctions ==4.4.2, any.adjunctions ==4.4.2,
any.aeson ==2.2.3.0, any.aeson ==2.2.3.0,
aeson +ordered-keymap, aeson +ordered-keymap,
any.alex ==3.5.1.0, any.alex ==3.5.1.0,
any.ansi-terminal ==1.1.1, any.ansi-terminal ==1.1.2,
ansi-terminal -example, ansi-terminal -example,
any.ansi-terminal-types ==1.1, any.ansi-terminal-types ==1.1,
any.appar ==0.1.8, any.appar ==0.1.8,
@ -39,11 +38,11 @@ constraints: any.Cabal ==3.10.3.0,
attoparsec -developer, attoparsec -developer,
any.attoparsec-aeson ==2.2.2.0, any.attoparsec-aeson ==2.2.2.0,
any.authenticate-oauth ==1.7, any.authenticate-oauth ==1.7,
any.auto-update ==0.2.1, any.auto-update ==0.2.4,
any.base ==4.18.2.1, any.base ==4.18.2.1,
any.base-compat ==0.13.1, any.base-compat ==0.14.1,
any.base-compat-batteries ==0.13.1, any.base-compat-batteries ==0.14.1,
any.base-orphans ==0.9.2, any.base-orphans ==0.9.3,
any.base16 ==1.0, any.base16 ==1.0,
any.base16-bytestring ==1.0.2.0, any.base16-bytestring ==1.0.2.0,
any.base58-bytestring ==0.1.0, any.base58-bytestring ==0.1.0,
@ -62,18 +61,16 @@ constraints: any.Cabal ==3.10.3.0,
any.boring ==0.2.2, any.boring ==0.2.2,
boring +tagged, boring +tagged,
any.borsh ==0.3.0, any.borsh ==0.3.0,
any.brick ==2.4, any.brick ==2.6,
brick -demos, brick -demos,
any.bsb-http-chunked ==0.0.0.4, any.bsb-http-chunked ==0.0.0.4,
any.byteorder ==1.0.4, any.byteorder ==1.0.4,
any.bytes ==0.17.3, any.bytes ==0.17.4,
any.bytestring ==0.11.5.3, any.bytestring ==0.11.5.3,
any.bytestring-builder ==0.10.8.2.0,
bytestring-builder +bytestring_has_builder,
any.bytestring-to-vector ==0.3.0.1, any.bytestring-to-vector ==0.3.0.1,
any.c2hs ==0.28.8, any.c2hs ==0.28.8,
c2hs +base3 -regression, c2hs +base3 -regression,
any.cabal-doctest ==1.0.10, any.cabal-doctest ==1.0.11,
any.call-stack ==0.4.0, any.call-stack ==0.4.0,
any.case-insensitive ==1.2.1.0, any.case-insensitive ==1.2.1.0,
any.cborg ==0.2.10.0, any.cborg ==0.2.10.0,
@ -84,10 +81,10 @@ constraints: any.Cabal ==3.10.3.0,
any.clock ==0.8.4, any.clock ==0.8.4,
clock -llvm, clock -llvm,
any.colour ==2.3.6, any.colour ==2.3.6,
any.comonad ==5.0.8, any.comonad ==5.0.9,
comonad +containers +distributive +indexed-traversable, comonad +containers +distributive +indexed-traversable,
any.concurrent-output ==1.10.21, any.concurrent-output ==1.10.21,
any.conduit ==1.3.5, any.conduit ==1.3.6,
any.conduit-extra ==1.3.6, any.conduit-extra ==1.3.6,
any.config-ini ==0.2.7.0, any.config-ini ==0.2.7.0,
config-ini -enable-doctests, config-ini -enable-doctests,
@ -101,21 +98,20 @@ constraints: any.Cabal ==3.10.3.0,
any.crypto-api ==0.13.3, any.crypto-api ==0.13.3,
crypto-api -all_cpolys, crypto-api -all_cpolys,
any.crypto-pubkey-types ==0.4.3, any.crypto-pubkey-types ==0.4.3,
any.crypton ==1.0.0, any.cryptohash-md5 ==0.11.101.0,
any.cryptohash-sha1 ==0.11.101.0,
any.crypton ==1.0.1,
crypton -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq +support_pclmuldq +support_rdrand -support_sse +use_target_attributes, crypton -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq +support_pclmuldq +support_rdrand -support_sse +use_target_attributes,
any.crypton-connection ==0.4.1, any.crypton-connection ==0.4.3,
any.crypton-x509 ==1.7.7, any.crypton-x509 ==1.7.7,
any.crypton-x509-store ==1.6.9, any.crypton-x509-store ==1.6.9,
any.crypton-x509-system ==1.6.7, any.crypton-x509-system ==1.6.7,
any.crypton-x509-validation ==1.6.12, any.crypton-x509-validation ==1.6.13,
any.cryptonite ==0.30, any.cryptonite ==0.30,
cryptonite -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq -support_pclmuldq +support_rdrand -support_sse +use_target_attributes, cryptonite -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq -support_pclmuldq +support_rdrand -support_sse +use_target_attributes,
any.data-clist ==0.2, any.data-clist ==0.2,
any.data-default ==0.7.1.1, any.data-default ==0.8.0.0,
any.data-default-class ==0.1.2.0, any.data-default-class ==0.2.0.0,
any.data-default-instances-containers ==0.0.1,
any.data-default-instances-dlist ==0.0.1,
any.data-default-instances-old-locale ==0.0.1,
any.data-fix ==0.3.4, any.data-fix ==0.3.4,
any.dec ==0.0.6, any.dec ==0.0.6,
any.deepseq ==1.4.8.1, any.deepseq ==1.4.8.1,
@ -129,11 +125,11 @@ constraints: any.Cabal ==3.10.3.0,
any.easy-file ==0.2.5, any.easy-file ==0.2.5,
any.entropy ==0.4.1.10, any.entropy ==0.4.1.10,
entropy -donotgetentropy, entropy -donotgetentropy,
any.envy ==2.1.3.0, any.envy ==2.1.4.0,
any.esqueleto ==3.5.11.2, any.esqueleto ==3.5.13.1,
any.exceptions ==0.10.7, any.exceptions ==0.10.7,
any.extra ==1.7.16, any.extra ==1.8,
any.fast-logger ==3.2.3, any.fast-logger ==3.2.5,
any.file-embed ==0.0.16.0, any.file-embed ==0.0.16.0,
any.filepath ==1.4.300.1, any.filepath ==1.4.300.1,
any.fixed ==0.3, any.fixed ==0.3,
@ -142,8 +138,6 @@ constraints: any.Cabal ==3.10.3.0,
any.formatting ==7.2.0, any.formatting ==7.2.0,
formatting -no-double-conversion, formatting -no-double-conversion,
any.free ==5.2, any.free ==5.2,
any.generic-deriving ==1.14.5,
generic-deriving +base-4-9,
any.generically ==0.1.1, any.generically ==0.1.1,
any.generics-sop ==0.5.1.4, any.generics-sop ==0.5.1.4,
any.ghc ==9.6.5, any.ghc ==9.6.5,
@ -153,33 +147,34 @@ constraints: any.Cabal ==3.10.3.0,
any.ghc-heap ==9.6.5, any.ghc-heap ==9.6.5,
any.ghc-prim ==0.10.0, any.ghc-prim ==0.10.0,
any.ghci ==9.6.5, any.ghci ==9.6.5,
any.half ==0.3.1, any.half ==0.3.2,
any.happy ==1.20.1.1, any.happy ==2.1.3,
any.happy-lib ==2.1.3,
any.hashable ==1.4.7.0, any.hashable ==1.4.7.0,
hashable -arch-native +integer-gmp -random-initial-seed, hashable -arch-native +integer-gmp -random-initial-seed,
any.haskell-lexer ==1.1.1, any.haskell-lexer ==1.1.2,
any.haskoin-core ==1.1.0, any.haskoin-core ==1.1.0,
any.hexstring ==0.12.1.0, any.hexstring ==0.12.1.0,
any.hourglass ==0.2.12, any.hourglass ==0.2.12,
any.hpc ==0.6.2.0, any.hpc ==0.6.2.0,
any.hsc2hs ==0.68.10, any.hsc2hs ==0.68.10,
hsc2hs -in-ghc-tree, hsc2hs -in-ghc-tree,
any.hspec ==2.11.9, any.hspec ==2.11.10,
any.hspec-core ==2.11.9, any.hspec-core ==2.11.10,
any.hspec-discover ==2.11.9, any.hspec-discover ==2.11.10,
any.hspec-expectations ==0.8.4, any.hspec-expectations ==0.8.4,
any.http-api-data ==0.6.1, any.http-api-data ==0.6.1,
http-api-data -use-text-show, http-api-data -use-text-show,
any.http-client ==0.7.17, any.http-client ==0.7.17,
http-client +network-uri, http-client +network-uri,
any.http-client-tls ==0.3.6.3, any.http-client-tls ==0.3.6.4,
any.http-conduit ==2.3.8.3, any.http-conduit ==2.3.9.1,
http-conduit +aeson, http-conduit +aeson,
any.http-date ==0.0.11, any.http-date ==0.0.11,
any.http-media ==0.8.1.1, any.http-media ==0.8.1.1,
any.http-semantics ==0.1.2, any.http-semantics ==0.3.0,
any.http-types ==0.12.4, any.http-types ==0.12.4,
any.http2 ==5.2.6, any.http2 ==5.3.9,
http2 -devel -h2spec, http2 -devel -h2spec,
any.indexed-traversable ==0.1.4, any.indexed-traversable ==0.1.4,
any.indexed-traversable-instances ==0.1.2, any.indexed-traversable-instances ==0.1.2,
@ -187,19 +182,19 @@ constraints: any.Cabal ==3.10.3.0,
any.integer-gmp ==1.1, any.integer-gmp ==1.1,
any.integer-logarithms ==1.0.3.1, any.integer-logarithms ==1.0.3.1,
integer-logarithms -check-bounds +integer-gmp, integer-logarithms -check-bounds +integer-gmp,
any.invariant ==0.6.3, any.invariant ==0.6.4,
any.iproute ==1.7.12, any.iproute ==1.7.15,
any.kan-extensions ==5.2.6, any.kan-extensions ==5.2.6,
any.language-c ==0.9.3, any.language-c ==0.10.0,
language-c -allwarnings +iecfpextension +usebytestrings, language-c +iecfpextension +usebytestrings,
any.lens ==5.3.2, any.lens ==5.3.2,
lens -benchmark-uniplate -dump-splices +inlining -j +test-hunit +test-properties +test-templates +trustworthy, lens -benchmark-uniplate -dump-splices +inlining -j +test-hunit +test-properties +test-templates +trustworthy,
any.lens-aeson ==1.2.3, any.lens-aeson ==1.2.3,
any.lift-type ==0.1.1.1, any.lift-type ==0.1.2.0,
any.lifted-base ==0.2.3.12, any.lifted-base ==0.2.3.12,
any.linear ==1.22, any.linear ==1.22,
linear -herbie +template-haskell, linear -herbie +template-haskell,
any.megaparsec ==9.6.1, any.megaparsec ==9.7.0,
megaparsec -dev, megaparsec -dev,
any.memory ==0.18.0, any.memory ==0.18.0,
memory +support_bytestring +support_deepseq, memory +support_bytestring +support_deepseq,
@ -213,30 +208,31 @@ constraints: any.Cabal ==3.10.3.0,
monad-logger +template_haskell, monad-logger +template_haskell,
any.monad-loops ==0.4.3, any.monad-loops ==0.4.3,
monad-loops +base4, monad-loops +base4,
any.mono-traversable ==1.0.17.0, any.mono-traversable ==1.0.21.0,
any.monomer ==1.6.0.1, any.monomer ==1.6.0.1,
monomer -examples, monomer -examples,
any.mtl ==2.3.1, any.mtl ==2.3.1,
any.murmur3 ==1.0.5, any.murmur3 ==1.0.5,
any.nanovg ==0.8.1.0, any.nanovg ==0.8.1.0,
nanovg -examples -gl2 -gles3 -stb_truetype, nanovg -examples -gl2 -gles3 -stb_truetype,
any.network ==3.2.1.0, any.network ==3.2.7.0,
network -devel, network -devel,
any.network-byte-order ==0.1.7, any.network-byte-order ==0.1.7,
any.network-control ==0.1.1, any.network-control ==0.1.3,
any.network-info ==0.2.1,
any.network-uri ==2.6.4.2, any.network-uri ==2.6.4.2,
any.old-locale ==1.0.0.7, any.old-locale ==1.0.0.7,
any.old-time ==1.1.0.4, any.old-time ==1.1.0.4,
any.optparse-applicative ==0.18.1.0, any.optparse-applicative ==0.18.1.0,
optparse-applicative +process, optparse-applicative +process,
any.os-string ==2.0.6, any.os-string ==2.0.7,
any.parallel ==3.2.2.0, any.parallel ==3.2.2.0,
any.parsec ==3.1.16.1, any.parsec ==3.1.16.1,
any.parser-combinators ==1.3.0, any.parser-combinators ==1.3.0,
parser-combinators -dev, parser-combinators -dev,
any.path-pieces ==0.2.1, any.path-pieces ==0.2.1,
any.pem ==0.2.4, any.pem ==0.2.4,
any.persistent ==2.14.6.1, any.persistent ==2.14.6.3,
any.persistent-sqlite ==2.13.3.0, any.persistent-sqlite ==2.13.3.0,
persistent-sqlite -build-sanity-exe +full-text-search +have-usleep +json1 -systemlib +uri-filenames -use-pkgconfig -use-stat3 +use-stat4, persistent-sqlite -build-sanity-exe +full-text-search +have-usleep +json1 -systemlib +uri-filenames -use-pkgconfig -use-stat3 +use-stat4,
any.persistent-template ==2.12.0.0, any.persistent-template ==2.12.0.0,
@ -250,13 +246,13 @@ constraints: any.Cabal ==3.10.3.0,
any.psqueues ==0.2.8.0, any.psqueues ==0.2.8.0,
any.pureMD5 ==2.1.4, any.pureMD5 ==2.1.4,
pureMD5 -test, pureMD5 -test,
any.qrcode-core ==0.9.9, any.qrcode-core ==0.9.10,
any.qrcode-juicypixels ==0.8.5, any.qrcode-juicypixels ==0.8.6,
any.quickcheck-io ==0.2.0, any.quickcheck-io ==0.2.0,
any.quickcheck-transformer ==0.3.1.2, any.quickcheck-transformer ==0.3.1.2,
any.random ==1.2.1.2, any.random ==1.2.1.2,
any.recv ==0.1.0, any.recv ==0.1.0,
any.reflection ==2.1.8, any.reflection ==2.1.9,
reflection -slow +template-haskell, reflection -slow +template-haskell,
any.regex-base ==0.94.0.2, any.regex-base ==0.94.0.2,
any.regex-compat ==0.95.2.1, any.regex-compat ==0.95.2.1,
@ -271,7 +267,7 @@ constraints: any.Cabal ==3.10.3.0,
scientific -integer-simple, scientific -integer-simple,
any.sdl2 ==2.5.5.0, any.sdl2 ==2.5.5.0,
sdl2 -examples -no-linear -opengl-example +pkgconfig +recent-ish, sdl2 -examples -no-linear -opengl-example +pkgconfig +recent-ish,
any.secp256k1-haskell ==1.2.0, any.secp256k1-haskell ==1.4.2,
any.semialign ==1.3.1, any.semialign ==1.3.1,
semialign +semigroupoids, semialign +semigroupoids,
any.semigroupoids ==6.0.1, any.semigroupoids ==6.0.1,
@ -280,9 +276,9 @@ constraints: any.Cabal ==3.10.3.0,
semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +template-haskell +text +transformers +unordered-containers, semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +template-haskell +text +transformers +unordered-containers,
any.serialise ==0.2.6.1, any.serialise ==0.2.6.1,
serialise +newtime15, serialise +newtime15,
any.servant ==0.20.1, any.servant ==0.20.2,
any.servant-server ==0.20, any.servant-server ==0.20.2,
any.silently ==1.2.5.3, any.silently ==1.2.5.4,
any.simple-sendfile ==0.2.32, any.simple-sendfile ==0.2.32,
simple-sendfile +allow-bsd -fallback, simple-sendfile +allow-bsd -fallback,
any.singleton-bool ==0.1.8, any.singleton-bool ==0.1.8,
@ -301,8 +297,10 @@ constraints: any.Cabal ==3.10.3.0,
any.strict ==0.5.1, any.strict ==0.5.1,
any.string-conversions ==0.4.0.1, any.string-conversions ==0.4.0.1,
any.system-cxx-std-lib ==1.0, any.system-cxx-std-lib ==1.0,
any.tagged ==0.8.8, any.tagged ==0.8.9,
tagged +deepseq +transformers, tagged +deepseq +transformers,
any.tasty ==1.5.2,
tasty +unix,
any.template-haskell ==2.20.0.0, any.template-haskell ==2.20.0.0,
any.terminal-size ==0.3.4, any.terminal-size ==0.3.4,
any.terminfo ==0.4.1.6, any.terminfo ==0.4.1.6,
@ -310,42 +308,43 @@ constraints: any.Cabal ==3.10.3.0,
any.text-iso8601 ==0.1.1, any.text-iso8601 ==0.1.1,
any.text-short ==0.1.6, any.text-short ==0.1.6,
text-short -asserts, text-short -asserts,
any.text-show ==3.10.5, any.text-show ==3.11,
text-show +base-4-9 +integer-gmp +new-functor-classes +template-haskell-2-11, text-show +integer-gmp,
any.text-zipper ==0.13, any.text-zipper ==0.13,
any.tf-random ==0.5, any.tf-random ==0.5,
any.th-abstraction ==0.7.0.0, any.th-abstraction ==0.7.1.0,
any.th-compat ==0.1.5, any.th-compat ==0.1.6,
any.th-lift ==0.8.4, any.th-lift ==0.8.6,
any.th-lift-instances ==0.1.20, any.th-lift-instances ==0.1.20,
any.these ==1.2.1, any.these ==1.2.1,
any.time ==1.12.2, any.time ==1.12.2,
any.time-compat ==1.9.7, any.time-compat ==1.9.7,
any.time-locale-compat ==0.1.1.5, any.time-locale-compat ==0.1.1.5,
time-locale-compat -old-locale, time-locale-compat -old-locale,
any.time-manager ==0.1.0, any.time-manager ==0.2.1,
any.tls ==2.1.0, any.tls ==2.1.5,
tls -devel, tls -devel,
any.transformers ==0.6.1.0, any.transformers ==0.6.1.0,
any.transformers-base ==0.4.6, any.transformers-base ==0.4.6,
transformers-base +orphaninstances, transformers-base +orphaninstances,
any.transformers-compat ==0.7.2, any.transformers-compat ==0.7.2,
transformers-compat -five +five-three -four +generic-deriving +mtl -three -two, transformers-compat -five +five-three -four +generic-deriving +mtl -three -two,
any.typed-process ==0.2.11.1, any.typed-process ==0.2.12.0,
any.unix ==2.8.4.0, any.unix ==2.8.4.0,
any.unix-compat ==0.7.2, any.unix-compat ==0.7.3,
any.unix-time ==0.4.15, any.unix-time ==0.4.16,
any.unliftio ==0.2.25.0, any.unliftio ==0.2.25.0,
any.unliftio-core ==0.2.1.0, any.unliftio-core ==0.2.1.0,
any.unordered-containers ==0.2.20, any.unordered-containers ==0.2.20,
unordered-containers -debug, unordered-containers -debug,
any.utf8-string ==1.0.2, any.utf8-string ==1.0.2,
any.uuid ==1.3.16,
any.uuid-types ==1.0.6, any.uuid-types ==1.0.6,
any.vault ==0.3.1.5, any.vault ==0.3.1.5,
vault +useghc, vault +useghc,
any.vector ==0.13.1.0, any.vector ==0.13.2.0,
vector +boundschecks -internalchecks -unsafechecks -wall, vector +boundschecks -internalchecks -unsafechecks -wall,
any.vector-algorithms ==0.9.0.2, any.vector-algorithms ==0.9.0.3,
vector-algorithms +bench +boundschecks -internalchecks -llvm +properties -unsafechecks, vector-algorithms +bench +boundschecks -internalchecks -llvm +properties -unsafechecks,
any.vector-stream ==0.1.0.1, any.vector-stream ==0.1.0.1,
any.void ==0.7.3, any.void ==0.7.3,
@ -357,10 +356,10 @@ constraints: any.Cabal ==3.10.3.0,
any.wai ==3.2.4, any.wai ==3.2.4,
any.wai-app-static ==3.1.9, any.wai-app-static ==3.1.9,
wai-app-static +crypton -print, wai-app-static +crypton -print,
any.wai-extra ==3.1.15, any.wai-extra ==3.1.17,
wai-extra -build-example, wai-extra -build-example,
any.wai-logger ==2.4.0, any.wai-logger ==2.5.0,
any.warp ==3.4.1, any.warp ==3.4.7,
warp +allow-sendfilefd -network-bytestring -warp-debug +x509, warp +allow-sendfilefd -network-bytestring -warp-debug +x509,
any.wide-word ==0.1.6.0, any.wide-word ==0.1.6.0,
any.witherable ==0.5, any.witherable ==0.5,
@ -370,4 +369,4 @@ constraints: any.Cabal ==3.10.3.0,
wreq -aws -developer +doctest -httpbin, wreq -aws -developer +doctest -httpbin,
any.zlib ==0.7.1.0, any.zlib ==0.7.1.0,
zlib -bundled-c-zlib +non-blocking-ffi +pkg-config zlib -bundled-c-zlib +non-blocking-ffi +pkg-config
index-state: hackage.haskell.org 2024-07-10T18:40:26Z index-state: hackage.haskell.org 2024-12-14T09:52:48Z

View file

@ -75,7 +75,7 @@ import Control.Monad.Logger
import Data.Aeson import Data.Aeson
import Data.HexString (HexString(..), toText) import Data.HexString (HexString(..), toText)
import Data.Maybe import Data.Maybe
import Data.Scientific (Scientific, scientific) import Data.Scientific (Scientific, scientific, fromFloatDigits)
import qualified Data.Text as T import qualified Data.Text as T
import qualified Data.Text.Encoding as E import qualified Data.Text.Encoding as E
import Data.Time.Clock.POSIX (posixSecondsToUTCTime) import Data.Time.Clock.POSIX (posixSecondsToUTCTime)
@ -125,6 +125,7 @@ import Zenith.Types
, OrchardSpendingKeyDB(..) , OrchardSpendingKeyDB(..)
, SaplingSpendingKeyDB(..) , SaplingSpendingKeyDB(..)
, TransparentSpendingKeyDB(..) , TransparentSpendingKeyDB(..)
, ZcashPaymentURI(..)
) )
import Zenith.Utils import Zenith.Utils
( displayTaz ( displayTaz
@ -136,6 +137,7 @@ import Zenith.Utils
, jsonNumber , jsonNumber
, showAddress , showAddress
, validBarValue , validBarValue
, parseZcashPayment
) )
data Name data Name
@ -198,6 +200,13 @@ data PaymentInput = PaymentInput
makeLenses ''PaymentInput makeLenses ''PaymentInput
data URIText = URIText
{
_uriString :: !T.Text
} deriving (Show)
makeLenses ''URIText
data DialogType data DialogType
= WName = WName
| AName | AName
@ -216,6 +225,8 @@ data DialogType
| ViewingKeyMenu | ViewingKeyMenu
| ViewingKeyShow | ViewingKeyShow
| PaymentURIShow | PaymentURIShow
| PayUsingURIShow
| ProcessURIMenu
data DisplayType data DisplayType
= AddrDisplay = AddrDisplay
@ -272,6 +283,7 @@ data State = State
, _vkName :: !T.Text , _vkName :: !T.Text
, _vkData :: !T.Text , _vkData :: !T.Text
, _pmtURIForm :: !(Form PaymentInput () Name) , _pmtURIForm :: !(Form PaymentInput () Name)
, _payUsingURIForm :: !(Form URIText () Name)
} }
makeLenses ''State makeLenses ''State
@ -344,11 +356,8 @@ drawUI s = [splashDialog s, helpDialog s, displayDialog s, inputDialog s, ui s]
, capCommand "A" "ccounts" , capCommand "A" "ccounts"
, capCommand "V" "iew address" , capCommand "V" "iew address"
, capCommand "S" "end Tx" , capCommand "S" "end Tx"
, capCommand2 "Gen " "U" "RI" , capCommand "U" "RI Support"
, capCommand3 , capCommand3 "ba" "L" ("ance (" ++ (T.unpack (st ^. currencyCode)) ++ ")")
"ba"
"L"
("ance (" ++ (T.unpack (st ^. currencyCode)) ++ ")")
]) ])
, C.hCenter , C.hCenter
(hBox (hBox
@ -438,7 +447,7 @@ drawUI s = [splashDialog s, helpDialog s, displayDialog s, inputDialog s, ui s]
, "Switch accounts" , "Switch accounts"
, "View address" , "View address"
, "Send Tx" , "Send Tx"
, "Gen URI" , "URI Menu"
, "Address Book" , "Address Book"
, "Shield/De-Shield" , "Shield/De-Shield"
, "Viewing Keys" , "Viewing Keys"
@ -488,14 +497,28 @@ drawUI s = [splashDialog s, helpDialog s, displayDialog s, inputDialog s, ui s]
(D.dialog (Just (str " Send Transaction ")) Nothing 50) (D.dialog (Just (str " Send Transaction ")) Nothing 50)
(renderForm (st ^. txForm) <=> (renderForm (st ^. txForm) <=>
C.hCenter C.hCenter
(hBox [capCommand "" "Send", capCommand "<esc> " "Cancel"])) (hBox [capCommand "" "Send", capCommand3 " " "<esc> " "Cancel"]))
--
-- URI Support
--
-- | Create a New payment URI
PaymentURIShow -> PaymentURIShow ->
D.renderDialog D.renderDialog
(D.dialog (Just (str " Create Payment URI ")) Nothing 50) (D.dialog (Just (str " Create Payment URI ")) Nothing 50)
(renderForm (st ^. pmtURIForm) <=> (renderForm (st ^. pmtURIForm) <=>
C.hCenter C.hCenter
(hBox (hBox
[capCommand "P" "rocess", capCommand3 " " "<esc> " "Cancel"])) [capCommand "" "Process", capCommand3 " " "<esc> " "Cancel"]))
--
-- | Pay using a URI
PayUsingURIShow ->
D.renderDialog
(D.dialog (Just (str " Pay Using URI ")) Nothing 50)
(renderForm (st ^. payUsingURIForm) <=>
C.hCenter
(hBox
[capCommand "" "Process", capCommand3 " " "<esc> " "Cancel"]))
--
DeshieldForm -> DeshieldForm ->
D.renderDialog D.renderDialog
(D.dialog (Just (str " De-Shield ZEC ")) Nothing 50) (D.dialog (Just (str " De-Shield ZEC ")) Nothing 50)
@ -546,6 +569,15 @@ drawUI s = [splashDialog s, helpDialog s, displayDialog s, inputDialog s, ui s]
, capCommand "I" "ncoming" , capCommand "I" "ncoming"
, capCommand3 "" "E" "xit" , capCommand3 "" "E" "xit"
])) ]))
ProcessURIMenu ->
D.renderDialog
(D.dialog (Just (str " URI Support ")) Nothing 50)
(C.hCenter
(hBox
[ capCommand "C" "reate Payment URI"
, capCommand "P" "ay using an URI"
, capCommand3 "" "E" "xit"
]))
Blank -> emptyWidget Blank -> emptyWidget
-- Address Book List -- Address Book List
AdrBook -> AdrBook ->
@ -654,7 +686,7 @@ drawUI s = [splashDialog s, helpDialog s, displayDialog s, inputDialog s, ui s]
(str (str
" _____ _ _ _ \n|__ /___ _ __ (_) |_| |__\n / // _ \\ '_ \\| | __| '_ \\\n / /| __/ | | | | |_| | | |\n/____\\___|_| |_|_|\\__|_| |_|") <=> " _____ _ _ _ \n|__ /___ _ __ (_) |_| |__\n / // _ \\ '_ \\| | __| '_ \\\n / /| __/ | | | | |_| | | |\n/____\\___|_| |_|_|\\__|_| |_|") <=>
C.hCenter C.hCenter
(withAttr titleAttr (str "Zcash Wallet v0.7.1.0-beta")) <=> (withAttr titleAttr (str "Zcash Wallet v0.7.2.0-beta")) <=>
C.hCenter (withAttr blinkAttr $ str "Press any key...")) C.hCenter (withAttr blinkAttr $ str "Press any key..."))
else emptyWidget else emptyWidget
capCommand3 :: String -> String -> String -> Widget Name capCommand3 :: String -> String -> String -> Widget Name
@ -846,6 +878,15 @@ mkPaymentURIForm bal =
label s w = label s w =
padBottom (Pad 1) $ vLimit 1 (hLimit 15 $ str s <+> fill ' ') <+> w padBottom (Pad 1) $ vLimit 1 (hLimit 15 $ str s <+> fill ' ') <+> w
mkPayUsingURIForm :: URIText -> Form URIText e Name
mkPayUsingURIForm =
newForm
[ label " URI: " @@= editTextField uriString MemoField (Just 1)
]
where
label s w =
padBottom (Pad 1) $ vLimit 1 (hLimit 15 $ str s <+> fill ' ') <+> w
mkDeshieldForm :: Integer -> ShDshEntry -> Form ShDshEntry e Name mkDeshieldForm :: Integer -> ShDshEntry -> Form ShDshEntry e Name
mkDeshieldForm tbal = mkDeshieldForm tbal =
newForm newForm
@ -856,7 +897,7 @@ mkDeshieldForm tbal =
isAmountValid :: Integer -> Scientific -> Bool isAmountValid :: Integer -> Scientific -> Bool
isAmountValid b i = fromIntegral b >= (i * scientific 1 8) isAmountValid b i = fromIntegral b >= (i * scientific 1 8)
label s w = label s w =
padBottom (Pad 1) $ vLimit 1 (hLimit 15 $ str s <+> fill ' ') <+> w padBottom (Pad 1) $ vLimit 1 (hLimit 25 $ str s <+> fill ' ') <+> w
{-- {--
mkShieldForm :: Integer -> ShDshEntry -> Form ShDshEntry e Name mkShieldForm :: Integer -> ShDshEntry -> Form ShDshEntry e Name
mkShieldForm bal = mkShieldForm bal =
@ -1045,26 +1086,13 @@ scanZebra dbP zHost zPort b eChan znet = do
_ <- liftIO $ completeSync pool Failed _ <- liftIO $ completeSync pool Failed
liftIO $ BC.writeBChan eChan $ TickMsg e1 liftIO $ BC.writeBChan eChan $ TickMsg e1
Right blk -> do Right blk -> do
r2 <-
liftIO $
makeZebraCall
zHost
zPort
"getblock"
[Data.Aeson.String $ T.pack $ show bl, jsonNumber 0]
case r2 of
Left e2 -> do
_ <- liftIO $ completeSync pool Failed
liftIO $ BC.writeBChan eChan $ TickMsg e2
Right hb -> do
let blockTime = getBlockTime hb
bi <- bi <-
saveBlock pool $ saveBlock pool $
ZcashBlock ZcashBlock
(fromIntegral $ bl_height blk) (fromIntegral $ bl_height blk)
(HexStringDB $ bl_hash blk) (HexStringDB $ bl_hash blk)
(fromIntegral $ bl_confirmations blk) (fromIntegral $ bl_confirmations blk)
blockTime (fromIntegral $ bl_time blk)
(ZcashNetDB znet) (ZcashNetDB znet)
mapM_ (processTx zHost zPort bi pool) $ bl_txs blk mapM_ (processTx zHost zPort bi pool) $ bl_txs blk
liftIO $ BC.writeBChan eChan $ TickVal step liftIO $ BC.writeBChan eChan $ TickVal step
@ -1149,8 +1177,10 @@ appEvent (BT.AppEvent t) = do
ShieldForm -> return () ShieldForm -> return ()
ViewingKeyShow -> return () ViewingKeyShow -> return ()
ViewingKeyMenu -> return () ViewingKeyMenu -> return ()
ProcessURIMenu -> return ()
ShowFIATBalance -> return () ShowFIATBalance -> return ()
PaymentURIShow -> return () PaymentURIShow -> return ()
PayUsingURIShow -> return ()
Blank -> do Blank -> do
if s ^. timer == 90 if s ^. timer == 90
then do then do
@ -1728,7 +1758,9 @@ appEvent (BT.VtyEvent e) = do
ev -> ev ->
BT.zoom deshieldForm $ do BT.zoom deshieldForm $ do
handleFormEvent (BT.VtyEvent ev) handleFormEvent (BT.VtyEvent ev)
--
-- Process ShowFIATBalance events -- Process ShowFIATBalance events
--
ShowFIATBalance -> do ShowFIATBalance -> do
case e of case e of
V.EvKey (V.KChar 'x') [] -> V.EvKey (V.KChar 'x') [] ->
@ -1816,7 +1848,63 @@ appEvent (BT.VtyEvent e) = do
-- --
PaymentURIShow -> do PaymentURIShow -> do
case e of case e of
V.EvKey V.KEnter [] -> BT.modify $ set dialogBox Blank
V.EvKey V.KEsc [] -> BT.modify $ set dialogBox Blank V.EvKey V.KEsc [] -> BT.modify $ set dialogBox Blank
ev -> do
BT.zoom pmtURIForm $ do
handleFormEvent (BT.VtyEvent ev)
--
-- Pay using URI Form Events
--
PayUsingURIShow -> do
case e of
V.EvKey V.KEnter [] -> do
fs <- BT.zoom payUsingURIForm $ BT.gets formState
let zp = parseZcashPayment $ T.unpack (fs ^. uriString)
case zp of
Right p -> do
case uriAmount p of
Just a -> do
BT.modify $
set txForm $
mkSendForm
(s ^. balance)
(SendInput
(T.pack (uriAddress p))
(fromFloatDigits a)
(uriMemo p)
Full)
BT.modify $ set dialogBox SendTx
Nothing -> do
BT.modify $
set
msg "URI error - Invalid value "
BT.modify $ set displayBox MsgDisplay
Left e -> do
BT.modify $
set msg e
BT.modify $ set displayBox MsgDisplay
V.EvKey V.KEsc [] -> BT.modify $ set dialogBox Blank
ev -> do
BT.zoom payUsingURIForm $ do
handleFormEvent (BT.VtyEvent ev)
--
-- Open URI process form
--
ProcessURIMenu -> do
case e of
V.EvKey (V.KChar 'c') [] -> do
BT.modify $
set pmtURIForm $
mkPaymentURIForm (s ^. balance) (PaymentInput 0.0 "")
BT.modify $ set dialogBox PaymentURIShow
V.EvKey (V.KChar 'p') [] -> do
BT.modify $
set payUsingURIForm $
mkPayUsingURIForm (URIText "")
BT.modify $ set dialogBox PayUsingURIShow
V.EvKey (V.KChar 'e') [] ->
BT.modify $ set dialogBox Blank
ev -> return () ev -> return ()
-- --
-- Process any other event -- Process any other event
@ -1844,11 +1932,8 @@ appEvent (BT.VtyEvent e) = do
set txForm $ set txForm $
mkSendForm (s ^. balance) (SendInput "" 0.0 "" Full) mkSendForm (s ^. balance) (SendInput "" 0.0 "" Full)
BT.modify $ set dialogBox SendTx BT.modify $ set dialogBox SendTx
V.EvKey (V.KChar 'u') [] -> do V.EvKey (V.KChar 'u') [] ->
BT.modify $ BT.modify $ set dialogBox ProcessURIMenu
set pmtURIForm $
mkPaymentURIForm (s ^. balance) (PaymentInput 0.0 "")
BT.modify $ set dialogBox PaymentURIShow
V.EvKey (V.KChar 'b') [] -> V.EvKey (V.KChar 'b') [] ->
BT.modify $ set dialogBox AdrBook BT.modify $ set dialogBox AdrBook
V.EvKey (V.KChar 'l') [] -> do V.EvKey (V.KChar 'l') [] -> do
@ -1925,6 +2010,11 @@ appEvent (BT.VtyEvent e) = do
BT.modify $ set displayBox MsgDisplay BT.modify $ set displayBox MsgDisplay
V.EvKey (V.KChar 'k') [] -> do V.EvKey (V.KChar 'k') [] -> do
BT.modify $ set dialogBox ViewingKeyMenu BT.modify $ set dialogBox ViewingKeyMenu
V.EvKey (V.KChar 'u') [] -> do
BT.modify $ set dialogBox ViewingKeyMenu
-- set pmtURIForm $
-- mkPaymentURIForm (s ^. balance) (PaymentInput 0.0 "")
-- BT.modify $ set dialogBox PaymentURIShow
ev -> ev ->
case r of case r of
Just AList -> Just AList ->
@ -2082,6 +2172,7 @@ runZenithTUI config = do
"" ""
"" ""
(mkPaymentURIForm 0 $ PaymentInput 0.0 "") (mkPaymentURIForm 0 $ PaymentInput 0.0 "")
(mkPayUsingURIForm $ URIText "")
Left _e -> do Left _e -> do
print $ print $
"No Zebra node available on port " <> "No Zebra node available on port " <>

View file

@ -787,7 +787,7 @@ shieldTransparentNotes pool zebraHost zebraPort znet za bh = do
prepTSpends prepTSpends
(getTranSK $ zcashAccountTPrivateKey $ entityVal acc) (getTranSK $ zcashAccountTPrivateKey $ entityVal acc)
trNotes trNotes
chgAddr <- getInternalAddresses pool $ entityKey acc chgAddr <- liftIO $ getInternalAddresses pool $ entityKey acc
let internalUA = let internalUA =
getUA $ walletAddressUAddress $ entityVal $ head chgAddr getUA $ walletAddressUAddress $ entityVal $ head chgAddr
let oRcvr = let oRcvr =
@ -1076,7 +1076,7 @@ prepareTxV2 pool zebraHost zebraPort zn za bh pnotes policy = do
makeOutgoing acc recvs chg pol = do makeOutgoing acc recvs chg pol = do
let k = map (\(x, _, _, _) -> x) recvs let k = map (\(x, _, _, _) -> x) recvs
let j = map (\(_, _, x, _) -> x) recvs let j = map (\(_, _, x, _) -> x) recvs
chgAddr <- runNoLoggingT $ getInternalAddresses pool $ entityKey acc chgAddr <- getInternalAddresses pool $ entityKey acc
let internalUA = getUA $ walletAddressUAddress $ entityVal $ head chgAddr let internalUA = getUA $ walletAddressUAddress $ entityVal $ head chgAddr
case pol of case pol of
Full -> Full ->
@ -1298,8 +1298,7 @@ syncWallet config w = do
mapM (liftIO . runNoLoggingT . getAddresses pool . entityKey) accs mapM (liftIO . runNoLoggingT . getAddresses pool . entityKey) accs
logDebugN $ "addrs: " <> T.pack (show addrs) logDebugN $ "addrs: " <> T.pack (show addrs)
intAddrs <- intAddrs <-
concat <$> concat <$> mapM (liftIO . getInternalAddresses pool . entityKey) accs
mapM (liftIO . runNoLoggingT . getInternalAddresses pool . entityKey) accs
chainTip <- liftIO $ getMaxBlock pool znet chainTip <- liftIO $ getMaxBlock pool znet
logDebugN $ "chain tip: " <> T.pack (show chainTip) logDebugN $ "chain tip: " <> T.pack (show chainTip)
lastBlock <- liftIO $ getLastSyncBlock pool $ entityKey w lastBlock <- liftIO $ getLastSyncBlock pool $ entityKey w

View file

@ -647,8 +647,9 @@ getAddressById pool a = do
getInternalAddresses :: getInternalAddresses ::
ConnectionPool -- ^ The database path ConnectionPool -- ^ The database path
-> ZcashAccountId -- ^ The account ID to check -> ZcashAccountId -- ^ The account ID to check
-> NoLoggingT IO [Entity WalletAddress] -> IO [Entity WalletAddress]
getInternalAddresses pool a = getInternalAddresses pool a =
runNoLoggingT $
PS.retryOnBusy $ PS.retryOnBusy $
flip PS.runSqlPool pool $ do flip PS.runSqlPool pool $ do
select $ do select $ do
@ -1436,7 +1437,8 @@ getWalletTransactions ::
-> NoLoggingT IO () -> NoLoggingT IO ()
getWalletTransactions pool w = do getWalletTransactions pool w = do
let w' = entityVal w let w' = entityVal w
chgAddr <- getInternalAddresses pool $ walletAddressAccId $ entityVal w chgAddr <-
liftIO $ getInternalAddresses pool $ walletAddressAccId $ entityVal w
let ctReceiver = t_rec =<< readUnifiedAddressDB (entityVal $ head chgAddr) let ctReceiver = t_rec =<< readUnifiedAddressDB (entityVal $ head chgAddr)
let csReceiver = s_rec =<< readUnifiedAddressDB (entityVal $ head chgAddr) let csReceiver = s_rec =<< readUnifiedAddressDB (entityVal $ head chgAddr)
let coReceiver = o_rec =<< readUnifiedAddressDB (entityVal $ head chgAddr) let coReceiver = o_rec =<< readUnifiedAddressDB (entityVal $ head chgAddr)

View file

@ -98,6 +98,7 @@ data AppEvent
| NewClicked | NewClicked
| ViewingKeysClicked | ViewingKeysClicked
| NewAddress !(Maybe (Entity ZcashAccount)) | NewAddress !(Maybe (Entity ZcashAccount))
| NewInternalAddress !(Maybe (Entity ZcashAccount))
| NewAccount !(Maybe (Entity ZcashWallet)) | NewAccount !(Maybe (Entity ZcashWallet))
| NewWallet | NewWallet
| SetPool !ZcashPool | SetPool !ZcashPool
@ -111,6 +112,7 @@ data AppEvent
| LoadAddrs ![Entity WalletAddress] | LoadAddrs ![Entity WalletAddress]
| LoadAccs ![Entity ZcashAccount] | LoadAccs ![Entity ZcashAccount]
| LoadWallets ![Entity ZcashWallet] | LoadWallets ![Entity ZcashWallet]
| CheckChange
| ConfirmCancel | ConfirmCancel
| SaveAddress !(Maybe (Entity ZcashAccount)) | SaveAddress !(Maybe (Entity ZcashAccount))
| SaveAccount !(Maybe (Entity ZcashWallet)) | SaveAccount !(Maybe (Entity ZcashWallet))
@ -1430,6 +1432,7 @@ handleEvent wenv node model evt =
AccountClicked -> [Model $ model & accPopup .~ True] AccountClicked -> [Model $ model & accPopup .~ True]
MenuClicked -> [Model $ model & menuPopup .~ True] MenuClicked -> [Model $ model & menuPopup .~ True]
NewClicked -> [Model $ model & newPopup .~ not (model ^. newPopup)] NewClicked -> [Model $ model & newPopup .~ not (model ^. newPopup)]
NewInternalAddress acc -> [Task $ addNewAddress "Change" Internal acc]
NewAddress acc -> NewAddress acc ->
[ Model $ [ Model $
model & confirmTitle ?~ "New Address" & confirmAccept .~ "Create" & model & confirmTitle ?~ "New Address" & confirmAccept .~ "Create" &
@ -1604,13 +1607,28 @@ handleEvent wenv node model evt =
, Event $ ShowMsg "Copied transaction ID!" , Event $ ShowMsg "Copied transaction ID!"
] ]
LoadTxs t -> [Model $ model & transactions .~ t] LoadTxs t -> [Model $ model & transactions .~ t]
CheckChange ->
[ Task $ do
case currentAccount of
Nothing -> return $ ShowError "No account available"
Just acc -> do
pool <-
runNoLoggingT $ initPool $ c_dbPath $ model ^. configuration
chgAddr <- getInternalAddresses pool $ entityKey acc
if not (null chgAddr)
then return $ SetPool OrchardPool
else return $ NewInternalAddress currentAccount
]
LoadAddrs a -> LoadAddrs a ->
if not (null a) if not (null a)
then [ Model $ model & addresses .~ a then [ Model $ model & addresses .~ a
, Event CheckChange
, Event $ SwitchAddr $ model ^. selAddr , Event $ SwitchAddr $ model ^. selAddr
, Event $ SetPool OrchardPool , Event $ SetPool OrchardPool
] ]
else [Event $ NewAddress currentAccount] else [ Event $ NewAddress currentAccount
, Event $ NewInternalAddress currentAccount
]
LoadAccs a -> LoadAccs a ->
if not (null a) if not (null a)
then [Model $ model & accounts .~ a, Event $ SwitchAcc 0] then [Model $ model & accounts .~ a, Event $ SwitchAcc 0]
@ -2111,26 +2129,13 @@ scanZebra dbPath zHost zPort net sendMsg = do
_ <- completeSync pool Failed _ <- completeSync pool Failed
sendMsg (ShowError $ showt e1) sendMsg (ShowError $ showt e1)
Right blk -> do Right blk -> do
r2 <-
liftIO $
makeZebraCall
zHost
zPort
"getblock"
[Data.Aeson.String $ showt bl, jsonNumber 0]
case r2 of
Left e2 -> do
_ <- completeSync pool Failed
sendMsg (ShowError $ showt e2)
Right hb -> do
let blockTime = getBlockTime hb
bi <- bi <-
saveBlock pool $ saveBlock pool $
ZcashBlock ZcashBlock
(fromIntegral $ bl_height blk) (fromIntegral $ bl_height blk)
(HexStringDB $ bl_hash blk) (HexStringDB $ bl_hash blk)
(fromIntegral $ bl_confirmations blk) (fromIntegral $ bl_confirmations blk)
blockTime (fromIntegral $ bl_time blk)
(ZcashNetDB net) (ZcashNetDB net)
mapM_ (processTx zHost zPort bi pool) $ bl_txs blk mapM_ (processTx zHost zPort bi pool) $ bl_txs blk
sendMsg (SyncVal step) sendMsg (SyncVal step)
@ -2415,7 +2420,7 @@ runZenithGUI config = do
Left _e -> print "Zebra not available" Left _e -> print "Zebra not available"
where where
params hd = params hd =
[ appWindowTitle "Zenith - Zcash Full Node Wallet" [ appWindowTitle "Zenith - Zcash Full Node Wallet - 0.7.2.0-beta"
, appWindowState $ MainWindowNormal (1000, 700) , appWindowState $ MainWindowNormal (1000, 700)
, appTheme zenithTheme , appTheme zenithTheme
, appFontDef , appFontDef

View file

@ -932,22 +932,12 @@ scanZebra dbPath zHost zPort net = do
case r of case r of
Left _ -> completeSync pool Failed Left _ -> completeSync pool Failed
Right blk -> do Right blk -> do
r2 <-
makeZebraCall
zHost
zPort
"getblock"
[Data.Aeson.String $ T.pack (show bl), jsonNumber 0]
case r2 of
Left _ -> completeSync pool Failed
Right hb -> do
let blockTime = getBlockTime hb
bi <- bi <-
saveBlock pool $ saveBlock pool $
ZcashBlock ZcashBlock
(fromIntegral $ bl_height blk) (fromIntegral $ bl_height blk)
(HexStringDB $ bl_hash blk) (HexStringDB $ bl_hash blk)
(fromIntegral $ bl_confirmations blk) (fromIntegral $ bl_confirmations blk)
blockTime (fromIntegral $ bl_time blk)
(ZcashNetDB net) (ZcashNetDB net)
mapM_ (processTx zHost zPort bi pool) $ bl_txs blk mapM_ (processTx zHost zPort bi pool) $ bl_txs blk

View file

@ -135,26 +135,13 @@ processBlock host port pool pg net b = do
_ <- completeSync pool Failed _ <- completeSync pool Failed
liftIO $ throwIO $ userError e liftIO $ throwIO $ userError e
Right blk -> do Right blk -> do
r2 <-
liftIO $
makeZebraCall
host
port
"getblock"
[Data.Aeson.String $ T.pack $ show b, jsonNumber 0]
case r2 of
Left e2 -> do
_ <- completeSync pool Failed
liftIO $ throwIO $ userError e2
Right hb -> do
let blockTime = getBlockTime hb
bi <- bi <-
saveBlock pool $ saveBlock pool $
ZcashBlock ZcashBlock
(fromIntegral $ bl_height blk) (fromIntegral $ bl_height blk)
(HexStringDB $ bl_hash blk) (HexStringDB $ bl_hash blk)
(fromIntegral $ bl_confirmations blk) (fromIntegral $ bl_confirmations blk)
blockTime (fromIntegral $ bl_time blk)
net net
mapM_ (processTx host port bi pool) $ bl_txs blk mapM_ (processTx host port bi pool) $ bl_txs blk
liftIO $ tick pg liftIO $ tick pg

@ -1 +1 @@
Subproject commit cfa862ec9495e810e7296fa6fe724b46dbe0ee52 Subproject commit a28edcb5995667677e96a08c6952a568bfd6c51e

View file

@ -1,6 +1,6 @@
cabal-version: 3.0 cabal-version: 3.0
name: zenith name: zenith
version: 0.7.0.0-beta version: 0.7.2.0-beta
license: MIT license: MIT
license-file: LICENSE license-file: LICENSE
author: Rene Vergara author: Rene Vergara