Fix ZEC amount entry field in billable creation.

[?]
Apr 2, 2021, 3:01 AM
WZ5ULFSZ7RD7MFHY7RZH3WJCLO56OUIC23BB6DP64BNC4RHKRXXAC

Dependencies

  • [2] XGMFJUER Fix the broken modals.
  • [3] N6FG4EW6 Working bootstrap modal! Only a little FFI.
  • [4] YBLHJFCN Implement billing modal.
  • [5] 3PFXXJTL WIP
  • [6] RUAQYIXI Add Landkit styles to billing creation
  • [7] 4GOBY5NQ WIP on modals.
  • [8] 27H4DECZ Add billing create API call.
  • [9] T2DN23M7 Factor out billing create component.
  • [10] KET5QGQP Add billable list (in-progress)
  • [*] VTZT2ILU Wire up billing navigation.

Change contents

  • replacement in client/src/Aftok/Billing/Create.purs at line 10
    [3.265][3.265:305]()
    import Aftok.Zcash (ZEC(..), toZatoshi)
    [3.265]
    [3.526]
    import Aftok.Zcash (ZEC(..), toZatoshi, ZPrec)
  • replacement in client/src/Aftok/Billing/Create.purs at line 16
    [3.452][3.452:489]()
    import Data.Maybe (Maybe(..), maybe)
    [3.452]
    [3.489]
    import Data.Maybe (Maybe(..), maybe, fromMaybe)
  • replacement in client/src/Aftok/Billing/Create.purs at line 61
    [3.1659][3.1174:1198]()
    , amount :: Maybe ZEC
    [3.1659]
    [3.1029]
    , amount :: Maybe String
  • replacement in client/src/Aftok/Billing/Create.purs at line 70
    [3.1804][2.205:218]()
    data Output
    [3.1804]
    [2.218]
    data Output
  • replacement in client/src/Aftok/Billing/Create.purs at line 128
    [3.2927][2.678:693]()
    render st =
    [3.2927]
    [2.693]
    render st =
  • replacement in client/src/Aftok/Billing/Create.purs at line 259
    [2.6021][2.6021:6104]()
    , P.value (maybe "" (Fixed.toString <<< unwrap) st.amount)
    [2.6021]
    [2.6104]
    , P.value (fromMaybe "" st.amount)
  • replacement in client/src/Aftok/Billing/Create.purs at line 324
    [3.4021][2.8544:8546]()
    [3.4021]
    [2.8546]
  • replacement in client/src/Aftok/Billing/Create.purs at line 330
    [2.8748][2.8748:8750]()
    [2.8748]
    [3.3687]
  • replacement in client/src/Aftok/Billing/Create.purs at line 354
    [3.4367][2.8751:8753]()
    [3.4367]
    [3.6528]
  • replacement in client/src/Aftok/Billing/Create.purs at line 370
    [3.7294][2.8829:8972]()
    err str =
    [ HH.div_
    [ HH.span
    [ P.classes (ClassName <$> [ "badge", "badge-danger-soft" ]) ] [ HH.text str ] ]
    [3.7294]
    [2.8972]
    err str =
    [ HH.div_
    [ HH.span
    [ P.classes (ClassName <$> [ "badge", "badge-danger-soft" ]) ] [ HH.text str ] ]
  • replacement in client/src/Aftok/Billing/Create.purs at line 408
    [3.8414][3.4643:4673]()
    SetBillingAmount amt ->
    [3.8414]
    [3.8445]
    SetBillingAmount amt -> do
    curAmount <- H.gets (_.amount)
  • replacement in client/src/Aftok/Billing/Create.purs at line 411
    [3.8482][3.8482:8587]()
    (Just zec) -> H.modify_ (_ { amount = Just (ZEC zec) })
    (Nothing) -> pure unit
    [3.8482]
    [3.4674]
    (Just (_ :: Fixed.Fixed ZPrec)) ->
    H.modify_ (_ { amount = Just amt })
    (Nothing) ->
    H.modify_ (_ { amount = curAmount })
  • replacement in client/src/Aftok/Billing/Create.purs at line 435
    [3.9565][3.9565:9659]()
    zatsV <- V <<< maybe (Left [AmountField]) (Right <<< toZatoshi) <$> H.gets (_.amount)
    [3.9565]
    [3.9659]
    zecStr <- (Fixed.fromString =<< _) <$> H.gets (_.amount)
    zatsV <- pure $ V (maybe (Left [AmountField]) (Right <<< toZatoshi <<< ZEC) zecStr)
  • replacement in client/src/Aftok/Zcash.purs at line 7
    [3.19516][3.4515:4594]()
    import Data.Fixed (Fixed, P1000000, TenTimes, fromInt, numerator, fromBigInt)
    [3.19516]
    [3.19584]
    import Data.Fixed (Fixed, P1000000, TenTimes, fromInt, numerator, fromBigInt)
  • replacement in client/src/Aftok/Zcash.purs at line 9
    [3.19622][3.1684:1703](),[3.1684][3.1684:1703]()
    [3.19622]
    [3.1703]
  • replacement in client/src/Aftok/Zcash.purs at line 22
    [3.4620][3.4620:4641]()
    toZEC (Zatoshi z) =
    [3.4620]
    [3.4641]
    toZEC (Zatoshi z) =
  • replacement in client/src/Aftok/Zcash.purs at line 39
    [3.19794][3.19794:19816]()
    toZatoshi (ZEC z) =
    [3.19794]
    [3.19816]
    toZatoshi (ZEC z) =