Skip to content

Commit

Permalink
Add query customer address form
Browse files Browse the repository at this point in the history
  • Loading branch information
paolino committed Sep 18, 2024
1 parent 0656caa commit 36a7625
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions lib/ui/src/Cardano/Wallet/UI/Deposit/Html/Pages/Wallet.hs
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,30 @@ deleteWalletModalH =
walletElementH :: (BL.ByteString -> Html ()) -> WalletPresent -> Html ()
walletElementH alert = \case
WalletPresent (WalletPublicIdentity xpub customers) -> do
record $ do
simpleField "Public Key" $ pubKeyH xpub
simpleField "Customer Discovery" $ toHtml $ toText customers
div_ [class_ "row"] $ do
div_ [class_ "row mt-5 "] $ do
h5_ [class_ "text-center"] "Wallet Details"
div_ [class_ "col"] $ record $ do
simpleField "Public Key" $ pubKeyH xpub
simpleField "Customer Discovery" $ toHtml $ toText customers
div_ [class_ "row mt-5"] $ do
h5_ [class_ "text-center"] "Query Address"
div_ [class_ "col-3"]
$
input_
[ type_ "number"
, hxTarget_ "#customer-address"
, class_ "form-control"
, hxTrigger_ "change"
, hxPost_ $ linkText customerAddressLink
, min_ "0"
, max_ $ toText $ customers - 1
, step_ "1"
, name_ "customer"
]
div_ [class_ "col-9", id_ "customer-address"] $ do
"Customer Address"
div_ [class_ "row mt-5"] $ do
h5_ [class_ "text-center"] "Actions"
div_ [class_ "col"] $ do
deleteWalletButtonH
div_ [id_ "delete-result"] mempty
Expand Down

0 comments on commit 36a7625

Please sign in to comment.