quietgarden/elm-web3-ui/2.0.0

Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: github.com/quietgarden/elm-web3-ui is gone (deleted or private); Software Heritage not asked yet (this run's --swh-calls were used up); no fork with tag 2.0.0 found (1 same-name repos checked); no cached copy. Use another version.

Details

Web3.Ui.ChainGate

Render content only when the wallet is on the expected chain.

A common pattern in every dapp: show the actual UI when connected to the right network, show a prompt to switch otherwise. This wraps that pattern so it does not have to be repeated in every view.

Web3.Ui.ChainGate.chainGate model.wallet
    (Chain.chainId Chain.pulsechain)
    (Html.text "Please switch to PulseChain")
    actualContent
chainGate : State -> ChainId -> Html msg -> Html msg -> Html msg

Render contentView when the wallet is Connected on expectedChain. Render wrongChainView for every other state (disconnected, wrong chain, read-only, connecting, error).