Skip to content

Commit

Permalink
Merge pull request #4 from kadena-community/colin/disable-tx
Browse files Browse the repository at this point in the history
Disable TX Form
  • Loading branch information
fosskers authored Dec 16, 2019
2 parents 4c0b990 + f46396f commit beafa72
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 13 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@

![Running a transaction.](screenshot.png)

## Installation

`boh` is a Haskell project that builds with the
[Stack](https://docs.haskellstack.org/en/stable/README/) tool.

```
stack install
```

This will place the binary in `~/.local/bin`.

## Usage

```
Expand Down
2 changes: 1 addition & 1 deletion bag-of-holding.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.2
name: bag-of-holding
version: 1.1.1
version: 1.1.2
synopsis: A terminal-based wallet for Chainweb.
description: A terminal-based wallet for Chainweb.
homepage: https://github.com/kadena-community/bag-of-holding
Expand Down
31 changes: 19 additions & 12 deletions exec/BOH/UI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -135,18 +135,24 @@ draw e w = dispatch <> [ui]

-- TODO Look into text wrapping.
he1p :: Widget Name
he1p = C.centerLayer . vLimit 16 . hLimitPercent 50 . B.borderWithLabel (txt " Help ")
he1p = C.centerLayer . vLimit 17 . hLimitPercent 50 . B.borderWithLabel (txt " Help ")
$ vBox
[ C.hCenter . padBottom (Pad 1) $ txt "The Bag of Holding - A Chainweb Wallet"
, txt "Author: Colin Woodbury"
, txt "Issues: " <+> hyperlink url (txt url)
, txt $ "Chainweb: " <> chainwebVersionToText (verOf e)
, txt $ "Account: " <> (accOf e ^. _Unwrapped)
, padTop (Pad 1) $ txt "A note on endpoints:"
, txt "LOCAL: Transaction is 'free', but results aren't"
, txt " saved to the blockchain. Returns instantly."
, txt "SEND: Transaction is mined into a block."
, txt " Costs gas and takes time for the results."
, txt "Author: Colin Woodbury"
, txt "Issues: " <+> hyperlink url (txt url)
, txt $ "Network: " <> chainwebVersionToText (verOf e)
, txt $ "Account: " <> (accOf e ^. _Unwrapped)
, padTop (Pad 1) $ txt "Controls:"
, txt "q - Exit BOH from the Main Screen."
, txt "↓↑ - Navigate the Transaction History."
, txt "TAB - Cycle through form fields."
, txt "SPC - Activate a checkbox."
, txt "ESC - Exit a form."
-- , padTop (Pad 1) $ txt "A note on endpoints:"
-- , txt "LOCAL: Transaction is 'free', but results aren't"
-- , txt " saved to the blockchain. Returns instantly."
-- , txt "SEND: Transaction is mined into a block."
-- , txt " Costs gas and takes time for the results."
, padTop (Pad 1) $ C.hCenter (txt "Press any key.") ]
where
url = "github.com/kadena-community/bag-of-holding"
Expand Down Expand Up @@ -226,7 +232,8 @@ header = vLimit 1 . C.center $ txt " The Bag of Holding "
footer :: Text -> Widget a
footer t = vLimit 1 $ txt (T.take 10 t) <+> C.hCenter legend
where
legend = txt "[P]act Transaction - [T]ransfer - [B]alances - [H]elp - [Q]uit"
-- legend = txt "[P]act Transaction - [T]ransfer - [B]alances - [H]elp - [Q]uit"
legend = txt "[T]ransfer - [B]alances - [H]elp - [Q]uit"

replForm :: Env -> REPL -> Form REPL e Name
replForm e = newForm
Expand Down Expand Up @@ -378,7 +385,7 @@ mainEvent e w (VtyEvent ve) = case ve of
V.EvKey (V.KChar 'q') [] -> halt w

-- Transaction Form --
V.EvKey (V.KChar 'p') [] -> continue (w & field @"focOf" %~ focusSetCurrent ReplCode)
-- V.EvKey (V.KChar 'p') [] -> continue (w & field @"focOf" %~ focusSetCurrent ReplCode)

-- Transfer Wizard --
V.EvKey (V.KChar 't') [] -> continue (w & field @"focOf" %~ focusSetCurrent Transfer)
Expand Down
Binary file modified screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit beafa72

Please sign in to comment.