log raw ticker price within tx

This commit is contained in:
Fabio Cigliano 2018-11-26 12:07:15 +13:00 committed by Josh Harvey
parent 5815a606f2
commit 578a39a721
8 changed files with 132 additions and 39 deletions

View file

@ -19,6 +19,7 @@ type alias CashInTxRec =
, cryptoCode : CryptoCode
, fiat : Float
, commissionPercentage : Maybe Float
, rawTickerPrice : Maybe Float
, fiatCode : String
, txHash : Maybe String
, phone : Maybe String
@ -39,6 +40,7 @@ type alias CashOutTxRec =
, cryptoCode : CryptoCode
, fiat : Float
, commissionPercentage : Maybe Float
, rawTickerPrice : Maybe Float
, fiatCode : String
, status : String
, dispense : Bool

View file

@ -66,6 +66,7 @@ cashInTxDecoder =
|> required "cryptoCode" cryptoCodeDecoder
|> required "fiat" floatString
|> required "commissionPercentage" (nullable floatString)
|> required "rawTickerPrice" (nullable floatString)
|> required "fiatCode" string
|> required "txHash" (nullable string)
|> required "phone" (nullable string)
@ -93,6 +94,7 @@ cashOutTxDecoder =
|> required "cryptoCode" cryptoCodeDecoder
|> required "fiat" floatString
|> required "commissionPercentage" (nullable floatString)
|> required "rawTickerPrice" (nullable floatString)
|> required "fiatCode" string
|> required "status" string
|> required "dispense" bool

View file

@ -43,6 +43,7 @@ cashInTxView tx =
[ div [] [ text tx.id ]
, div [] [ text "This is a cash-in transaction" ]
, div [] [ text ("Fiat: " ++ (format "0,0.00" tx.fiat)) ]
, div [] [ text ("Raw ticker price: " ++ (format "0,0.00" (Maybe.withDefault 0.0 tx.rawTickerPrice))) ]
, div [] [ text ("Status: " ++ cancelStatus) ]
, div [] [ text error ]
, cancelButtonDiv
@ -64,6 +65,7 @@ cashOutTxView tx =
[ div [] [ text tx.id ]
, div [] [ text "This is a cash-out transaction" ]
, div [] [ text ("Fiat: " ++ (format "0,0.00" tx.fiat)) ]
, div [] [ text ("Raw ticker price: " ++ (format "0,0.00" (Maybe.withDefault 0.0 tx.rawTickerPrice))) ]
, div [] [ text error ]
]