rvv001 - Issue 085 - [Zenith GUI] Read a payment URI
Processing Payment URI is working Display of error messages added to process
This commit is contained in:
parent
6b3ea31882
commit
332b7f5520
1 changed files with 9 additions and 10 deletions
|
@ -273,7 +273,6 @@ buildUI wenv model = widgetTree
|
||||||
[ mainWindow
|
[ mainWindow
|
||||||
, confirmOverlay `nodeVisible` isJust (model ^. confirmTitle)
|
, confirmOverlay `nodeVisible` isJust (model ^. confirmTitle)
|
||||||
, seedOverlay `nodeVisible` model ^. showSeed
|
, seedOverlay `nodeVisible` model ^. showSeed
|
||||||
, paymentURIOverlay `nodeVisible` model ^. paymentURIDisplay
|
|
||||||
, txOverlay `nodeVisible` isJust (model ^. showTx)
|
, txOverlay `nodeVisible` isJust (model ^. showTx)
|
||||||
, sendTxOverlay `nodeVisible` model ^. openSend
|
, sendTxOverlay `nodeVisible` model ^. openSend
|
||||||
, txIdOverlay `nodeVisible` isJust (model ^. showId)
|
, txIdOverlay `nodeVisible` isJust (model ^. showId)
|
||||||
|
@ -289,6 +288,7 @@ buildUI wenv model = widgetTree
|
||||||
model ^.
|
model ^.
|
||||||
updateABAddress
|
updateABAddress
|
||||||
, showVKOverlay `nodeVisible` model ^. viewingKeyDisplay
|
, showVKOverlay `nodeVisible` model ^. viewingKeyDisplay
|
||||||
|
, paymentURIOverlay `nodeVisible` model ^. paymentURIDisplay
|
||||||
, pmtUsingURIOverlay `nodeVisible` model ^. usepmtURIOverlay
|
, pmtUsingURIOverlay `nodeVisible` model ^. usepmtURIOverlay
|
||||||
, shieldOverlay `nodeVisible` model ^. shieldZec
|
, shieldOverlay `nodeVisible` model ^. shieldZec
|
||||||
, deShieldOverlay `nodeVisible` model ^. deShieldZec
|
, deShieldOverlay `nodeVisible` model ^. deShieldZec
|
||||||
|
@ -1735,14 +1735,18 @@ handleEvent wenv node model evt =
|
||||||
--
|
--
|
||||||
DisplayPaymentURI -> [ Model $ model & paymentURIDisplay .~ True & uriString .~ "" & menuPopup .~ False]
|
DisplayPaymentURI -> [ Model $ model & paymentURIDisplay .~ True & uriString .~ "" & menuPopup .~ False]
|
||||||
ClosePaymentURI -> [Model $ model & paymentURIDisplay .~ False]
|
ClosePaymentURI -> [Model $ model & paymentURIDisplay .~ False]
|
||||||
|
--
|
||||||
|
-- Display Pay using URI Form
|
||||||
|
--
|
||||||
|
DisplayPayUsingURI -> [ Model $ model & usepmtURIOverlay.~ True & menuPopup .~ False]
|
||||||
|
ClosePayUsingURI -> [Model $ model & usepmtURIOverlay .~ False]
|
||||||
ProcIfValidURI -> do
|
ProcIfValidURI -> do
|
||||||
[Model $ model & paymentURIDisplay .~ False ]
|
|
||||||
let zp = parseZcashPayment $ T.unpack (model ^. uriString)
|
let zp = parseZcashPayment $ T.unpack (model ^. uriString)
|
||||||
case zp of
|
case zp of
|
||||||
Right p -> do
|
Right p -> do
|
||||||
case uriAmount p of
|
case uriAmount p of
|
||||||
Just a ->
|
Just a ->
|
||||||
[ Model $ model & paymentURIDisplay .~ False
|
[ Model $ model & usepmtURIOverlay .~ False
|
||||||
& openSend .~ True
|
& openSend .~ True
|
||||||
& privacyChoice .~ Full
|
& privacyChoice .~ Full
|
||||||
& recipientValid .~ False
|
& recipientValid .~ False
|
||||||
|
@ -1752,22 +1756,17 @@ handleEvent wenv node model evt =
|
||||||
, Event $ ClosePaymentURI
|
, Event $ ClosePaymentURI
|
||||||
]
|
]
|
||||||
Nothing ->
|
Nothing ->
|
||||||
[ Model $ model & paymentURIDisplay .~ False
|
[ Model $ model & usepmtURIOverlay .~ False
|
||||||
& openSend .~ False
|
& openSend .~ False
|
||||||
& uriString .~ ""
|
& uriString .~ ""
|
||||||
, Event $ ShowError "Invalid URI"
|
, Event $ ShowError "Invalid URI"
|
||||||
]
|
]
|
||||||
Left e -> [ Model $ model & paymentURIDisplay .~ False
|
Left e -> [ Model $ model & usepmtURIOverlay .~ False
|
||||||
& openSend .~ False
|
& openSend .~ False
|
||||||
& uriString .~ ""
|
& uriString .~ ""
|
||||||
, Event $ ShowError "Invalid URI"
|
, Event $ ShowError "Invalid URI"
|
||||||
]
|
]
|
||||||
--
|
--
|
||||||
-- Display Pay using URI Form
|
|
||||||
--
|
|
||||||
DisplayPayUsingURI -> [ Model $ model & usepmtURIOverlay.~ True & menuPopup .~ False]
|
|
||||||
ClosePayUsingURI -> [Model $ model & usepmtURIOverlay .~ False]
|
|
||||||
--
|
|
||||||
--
|
--
|
||||||
ShowShield ->
|
ShowShield ->
|
||||||
if model ^. tBalance > 0
|
if model ^. tBalance > 0
|
||||||
|
|
Loading…
Reference in a new issue