Skip to content

Commit

Permalink
Add a loading indicator for the wallet account list
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Trinkle committed Sep 24, 2021
1 parent c0d8f74 commit b665a12
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion use-case-2/frontend/src/Frontend/ChooseWallet.hs
Expand Up @@ -57,6 +57,8 @@ chooseWallet = do
dmmWalletIds <- viewContracts
dyn_ $ ffor dmmWalletIds $ \case
Nothing -> do
el "p" $ text "Loading..."
Just [] -> do
el "p" $ text "There are no wallets yet available."
el "p" $ text "If the contract is still initializing, just wait. They will appear here once created."
Just walletIds -> do
Expand All @@ -69,5 +71,5 @@ viewContracts
:: ( MonadQuery t (Vessel Q (Const SelectedCount)) m
, Reflex t
)
=> m (Dynamic t (Maybe ([Text])))
=> m (Dynamic t (Maybe [Text]))
viewContracts = (fmap.fmap.fmap) (Map.elems . Map.mapMaybe getFirst . runIdentity) $ queryViewMorphism 1 $ constDyn $ vessel Q_ContractList . identityV

0 comments on commit b665a12

Please sign in to comment.