Add lamassu-admin-elm to this repo (#185)

This commit is contained in:
Rafael Taranto 2018-10-08 16:29:06 -03:00 committed by Josh Harvey
parent 5ee7e40872
commit f4fc9d6328
134 changed files with 28171 additions and 83 deletions

View file

@ -0,0 +1,35 @@
module MaintenanceFunding.State exposing (..)
import MaintenanceFunding.Rest exposing (..)
import MaintenanceFunding.Types exposing (..)
import RemoteData exposing (..)
init : Model
init =
NotAsked
load : Maybe String -> ( Model, Cmd Msg )
load maybeCrypto =
( Loading, getForm maybeCrypto )
fundingUpdate : SubModel -> ( SubModel, Cmd Msg )
fundingUpdate model =
model ! []
switchCrypto : String -> Model -> ( Model, Cmd Msg )
switchCrypto crypto model =
( Loading, getForm (Just crypto) )
update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
case msg of
Load newModel ->
RemoteData.update fundingUpdate newModel
CryptoSwitch crypto ->
switchCrypto crypto model