Commit bb1f49b1 authored by Cédric F.'s avatar Cédric F.

Remove dead code

parent ec668d35
Pipeline #15457813 failed with stage
in 2 minutes and 29 seconds
......@@ -16,8 +16,7 @@
"elm-lang/keyboard": "1.0.1 <= v < 2.0.0",
"elm-lang/navigation": "2.1.0 <= v < 3.0.0",
"elm-lang/virtual-dom": "2.0.4 <= v < 3.0.0",
"elm-lang/websocket": "1.0.2 <= v < 2.0.0",
"elm-lang/window": "1.0.1 <= v < 2.0.0"
"elm-lang/websocket": "1.0.2 <= v < 2.0.0"
},
"elm-version": "0.18.0 <= v < 0.19.0"
}
......@@ -63,12 +63,6 @@
white-space: nowrap;
}
.glow {
transition: all 1s;
background: orange;
box-shadow: 0 0 10px 5px orange;
}
.rotate {
animation: spin 2s linear infinite;
}
......
......@@ -15,7 +15,6 @@ import Components.Transaction as Transaction
type alias Model =
{ address : String
, transactions : List Transaction.Model
, tickets : List String
, fetching : Bool
, error : Maybe String
, config : Config
......@@ -26,7 +25,6 @@ initialModel : Config -> Model
initialModel config =
{ address = ""
, transactions = []
, tickets = []
, fetching = False
, error = Nothing
, config = config
......@@ -37,7 +35,6 @@ modelFromJson : JsonModel -> Config -> Model
modelFromJson jsonModel config =
{ address = jsonModel.address
, transactions = List.map (\tx -> Transaction.modelFromJson tx config) jsonModel.transactions
, tickets = []
, fetching = False
, error = Nothing
, config = config
......@@ -53,8 +50,6 @@ type alias JsonModel =
type Msg
= SearchRawTransactions String
| SearchRawTransactionsResult (Result Http.Error JsonModel)
| TicketsForAddress String
| TicketsForAddressResult (Result Http.Error (List String))
view : Model -> Time -> Html a
......@@ -171,10 +166,6 @@ update msg model =
, Cmd.none
)
_ ->
-- TODO: tickets
( model, Cmd.none )
searchRawTransactions : Model -> String -> Cmd Msg
searchRawTransactions model address =
......
module Lib.DateExtra exposing (..)
import Date exposing (Date)
import Time exposing (Time)
import String
unsafeFromString : String -> Date
unsafeFromString string =
case Date.fromString string of
Ok date ->
date
Err msg ->
Debug.crash ("unsafeFromString")
toISOString : Date -> String
toISOString date =
let
......@@ -72,21 +61,3 @@ monthToInt month =
Date.Dec ->
12
isWeekend : Date -> Bool
isWeekend day =
case Date.dayOfWeek day of
Date.Sat ->
True
Date.Sun ->
True
_ ->
False
diffDays : Time -> Time -> Time
diffDays from to =
(to - from) / (86400 * Time.second)
module Trappisto.Model exposing (..)
import Navigation
import Window
import Keyboard
import Time exposing (Time)
import Http exposing (Error)
......@@ -26,7 +25,6 @@ type Template
type alias Model =
{ config : Config
, keys : Keys
, window : Window.Size
, addressModel : AddressComponent.Model
, blockModel : BlockComponent.Model
, transactionModel : TransactionComponent.Model
......@@ -50,7 +48,6 @@ initialModel : Config -> String -> Model
initialModel config query =
{ config = config
, keys = Keys False False False False False False
, window = Window.Size 0 0
, addressModel = AddressComponent.initialModel config
, blockModel = BlockComponent.initialModel config
, transactionModel = TransactionComponent.initialModel config
......@@ -79,7 +76,6 @@ type Msg
| WebSocketMsg String
| Query String
| KeyChange Bool Keyboard.KeyCode
| Resize Window.Size
| Tick Time
| GetBestBlockResult (Result Http.Error BestBlock)
......
......@@ -4,7 +4,6 @@ import Navigation
import Keyboard
import Task exposing (Task)
import Time exposing (Time)
import Window
import Lib.JsonRpc as JsonRpc
import Lib.WebSocket as WebSocket
import Components.Address as AddressComponent
......@@ -50,7 +49,6 @@ init flags location =
, notifyBlocks model.config.wsEndpoint
, notifyNewTransactions model.config.wsEndpoint
, Task.perform Tick Time.now
, Task.perform Resize Window.size
]
)
......@@ -60,7 +58,6 @@ subscriptions model =
Sub.batch
[ Keyboard.downs (KeyChange True)
, Keyboard.ups (KeyChange False)
, Window.resizes Resize
, Time.every webSocketTTL Tick
, WebSocket.listen model.config.wsEndpoint WebSocketMsg
, jsToElm JsMsg
......@@ -302,9 +299,6 @@ update action model =
else
( updatedModel, Cmd.none )
Resize size ->
( { model | window = size }, Cmd.none )
fetchAddress : String -> Model -> ( Model, Cmd Msg )
fetchAddress address model =
......
......@@ -161,21 +161,6 @@ suite =
in
Expect.equal result True
]
, describe "Fuzz test examples, using randomly generated input"
-- XXX: keping them as examples
[ fuzz (list int) "Lists always have positive length" <|
\aList ->
List.length aList |> Expect.atLeast 0
, fuzz (list int) "Sorting a list does not change its length" <|
\aList ->
List.sort aList |> List.length |> Expect.equal (List.length aList)
, fuzzWith { runs = 1000 } int "List.member will find an integer in a list containing it" <|
\i ->
List.member i [ i ] |> Expect.true "If you see this, List.member returned False!"
, fuzz2 string string "The length of a string equals the sum of its substrings' lengths" <|
\s1 s2 ->
s1 ++ s2 |> String.length |> Expect.equal (String.length s1 + String.length s2)
]
]
......
......@@ -19,8 +19,7 @@
"elm-lang/keyboard": "1.0.1 <= v < 2.0.0",
"elm-lang/navigation": "2.1.0 <= v < 3.0.0",
"elm-lang/virtual-dom": "2.0.4 <= v < 3.0.0",
"elm-lang/websocket": "1.0.2 <= v < 2.0.0",
"elm-lang/window": "1.0.1 <= v < 2.0.0"
"elm-lang/websocket": "1.0.2 <= v < 2.0.0"
},
"elm-version": "0.18.0 <= v < 0.19.0"
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment