getCustomerAccountsFromName :: CustomerAccounts -> String -> [(UUID, Account)]
getCustomerAccountsFromName CustomerAccounts{..} name = fromMaybe [] $ do
  customerId <- Map.lookup name _customerAccountsCustomerIdsByName
  accountIds <- Map.lookup customerId _customerAccountsCustomerAccounts
  let lookupAccount uuid = (uuid,) <$> Map.lookup uuid _customerAccountsAccountsById
  return $ mapMaybe lookupAccount accountIds
getCustomerAccountsFromName :: CustomerAccounts -> String -> [(UUID, Account)]
getCustomerAccountsFromName CustomerAccounts{..} name = fromMaybe [] $ do
  customerId <- Map.lookup name _customerAccountsCustomerIdsByName
  accountIds <- Map.lookup customerId _customerAccountsCustomerAccounts
  let lookupAccount uuid = (uuid,) <$> Map.lookup uuid _customerAccountsAccountsById
  return $ mapMaybe lookupAccount accountIds
getCustomerAccountsFromName CustomerAccounts{..} name = fromMaybe [] $ do
  customerId <- Map.lookup name _customerAccountsCustomerIdsByName
  accountIds <- Map.lookup customerId _customerAccountsCustomerAccounts
  let lookupAccount uuid = (uuid,) <$> Map.lookup uuid _customerAccountsAccountsById
  return $ mapMaybe lookupAccount accountIds