* On Claim All Rewards page, add a toggle "Include rewards from Astroport", off
  by default.
* Display a warning if claiming rewards from Astroport.
* Make sure the correct Astroport LP token is used.
* Page "Claim rewards from Mirror only", previously named "Claim MIR rewards
  only", is no longer needed because "Claim All Rewards" has a toggle. If
  someone has this page bookmarked, a redirection is made.
* Add "Distribute MIR" to the UI - distribute newly emitted MIR so that all
  farmers can claim MIR rewards.

Requires 1_networks_git.diff applied (before or after)

diff --git a/src/forms/ClaimRewardsForm.tsx b/src/forms/ClaimRewardsForm.tsx
index 3f409a1..cc1918f 100644
--- a/src/forms/ClaimRewardsForm.tsx
+++ b/src/forms/ClaimRewardsForm.tsx
@@ -1 +1,2 @@
+import { useState } from "react"
 import useNewContractMsg from "../libs/useNewContractMsg"
@@ -10,11 +11,25 @@ import Container from "../components/Container"
 import FormContainer from "./modules/FormContainer"
+import ToggleAstroportRewards from "./modules/ToggleAstroportRewards"
 
-const ClaimRewardsForm = () => {
+const ClaimRewardsForm = ({ mirroronly }: { mirroronly: boolean }) => {
   /* context */
   const address = useAddress()
-  const { whitelist, contracts, getToken } = useProtocol()
-  const { astro } = useNetwork()
+  const { contracts, getToken } = useProtocol()
+  const { astro, mirrorAstroport } = useNetwork()
   const { contents: findBalance } = useFindBalance()
+
+  const astroportEnabledState = useState(false)
+  const [isAstroportEnabled] = astroportEnabledState
+
   const { contents: rewards } = useRewards()
-  const { data: astroPendingRewards } = useAstroPendingRewards()
+  const { data: astroPendingRewards2 } = useAstroPendingRewards()
+  const astroPendingRewards =
+    mirroronly || !isAstroportEnabled ? null : astroPendingRewards2
+
+  const claimingFromAstroport: boolean =
+    gt(astroPendingRewards?.pending ?? 0, 0) ||
+    gt(astroPendingRewards?.pending_on_proxy ?? 0, 0)
+  const couldClaimFromAstroport: boolean =
+    gt(astroPendingRewards2?.pending ?? 0, 0) ||
+    gt(astroPendingRewards2?.pending_on_proxy ?? 0, 0)
 
@@ -22,2 +37,3 @@ const ClaimRewardsForm = () => {
   const claiming = plus(rewards.total, astroPendingRewards?.pending_on_proxy)
+  const claimingASTROAmount = astroPendingRewards?.pending ?? "0"
 
@@ -25,3 +41,3 @@ const ClaimRewardsForm = () => {
   const astroRewards = (
-    <Formatted symbol="ASTRO">{astroPendingRewards?.pending}</Formatted>
+    <Formatted symbol="ASTRO">{claimingASTROAmount}</Formatted>
   )
@@ -34,3 +50,3 @@ const ClaimRewardsForm = () => {
           <Formatted symbol="MIR">{claiming}</Formatted>
-          {gt(astroPendingRewards?.pending ?? 0, 0) && <> + {astroRewards}</>}
+          {gt(claimingASTROAmount, 0) && <> + {astroRewards}</>}
         </>
@@ -51,3 +67,3 @@ const ClaimRewardsForm = () => {
 
-  const { lpToken: astroLpToken } = whitelist[getToken("MIR")]
+  const { lpToken: astroLpToken } = mirrorAstroport
   const dataAstro = newContractMsg(astro.generator, {
@@ -65,14 +81,12 @@ const ClaimRewardsForm = () => {
 
-  const data =
-    gt(astroPendingRewards?.pending ?? 0, 0) ||
-    gt(astroPendingRewards?.pending_on_proxy ?? 0, 0)
-      ? [dataAstro, ...dataMIR]
-      : dataMIR
+  const data = claimingFromAstroport ? [dataAstro, ...dataMIR] : dataMIR
 
-  const disabled = !(
-    gt(claiming, 0) || gt(astroPendingRewards?.pending ?? 0, 0)
-  )
+  const disabled = !(gt(claiming, 0) || gt(claimingASTROAmount, 0))
+
+  const warnings = claimingFromAstroport
+    ? ["Claiming rewards from Astroport has been broken since June 2023"]
+    : []
 
   /* result */
-  const container = { contents, disabled, data, gasAdjust: 1.5 }
+  const container = { contents, disabled, warnings, data, gasAdjust: 1.5 }
   const props = { tab: { tabs: ["Claim"], current: "Claim" }, label: "Claim" }
@@ -81,3 +95,7 @@ const ClaimRewardsForm = () => {
     <Container sm>
-      <FormContainer {...container} {...props} />
+      <FormContainer {...container} {...props}>
+        {!mirroronly && couldClaimFromAstroport && (
+          <ToggleAstroportRewards state={astroportEnabledState} />
+        )}
+      </FormContainer>
     </Container>
diff --git a/src/forms/DistributeMIRForm.tsx b/src/forms/DistributeMIRForm.tsx
new file mode 100644
index 0000000..2ad032f
--- /dev/null
+++ b/src/forms/DistributeMIRForm.tsx
@@ -0,0 +1,18 @@
+import useNewContractMsg from "../libs/useNewContractMsg"
+import { useProtocol } from "../data/contract/protocol"
+import Container from "../components/Container"
+import FormContainer from "./modules/FormContainer"
+export default function () {
+  const { contracts } = useProtocol()
+  const newContractMsg = useNewContractMsg()
+  return (
+    <Container sm>
+      <FormContainer
+        data={[newContractMsg(contracts["factory"], { distribute: {} })]}
+        gasAdjust={4}
+        contents={[]}
+        label="Distribute"
+      />
+    </Container>
+  )
+}
diff --git a/src/forms/modules/ToggleAstroportRewards.module.scss b/src/forms/modules/ToggleAstroportRewards.module.scss
new file mode 100644
index 0000000..723fbda
--- /dev/null
+++ b/src/forms/modules/ToggleAstroportRewards.module.scss
@@ -0,0 +1,15 @@
+@import "mixins";
+
+.button {
+  @include flex;
+  @include transition(color);
+  font-size: 12px;
+}
+
+.on {
+  color: $blue;
+}
+
+.toggle {
+  margin-right: 8px;
+}
diff --git a/src/forms/modules/ToggleAstroportRewards.tsx b/src/forms/modules/ToggleAstroportRewards.tsx
new file mode 100644
index 0000000..69ac324
--- /dev/null
+++ b/src/forms/modules/ToggleAstroportRewards.tsx
@@ -0,0 +1,28 @@
+import { Dispatch, SetStateAction } from "react"
+import classNames from "classnames/bind"
+import Toggle from "../../components/Toggle"
+import styles from "./ToggleAstroportRewards.module.scss"
+
+const cx = classNames.bind(styles)
+
+interface Props {
+  state: [boolean, Dispatch<SetStateAction<boolean>>]
+}
+
+const ToggleAstroportRewards = ({ state }: Props) => {
+  const [isOn, setIsOn] = state
+  const toggle = () => setIsOn(!isOn)
+
+  return (
+    <button
+      type="button"
+      className={cx(styles.button, { on: isOn })}
+      onClick={toggle}
+    >
+      <Toggle className={styles.toggle} on={isOn} />
+      Include rewards from Astroport
+    </button>
+  )
+}
+
+export default ToggleAstroportRewards
diff --git a/src/pages/My/TotalValue.tsx b/src/pages/My/TotalValue.tsx
index d1fb362..d844d5b 100644
--- a/src/pages/My/TotalValue.tsx
+++ b/src/pages/My/TotalValue.tsx
@@ -49,2 +49,7 @@ const TotalValue = () => {
       </LinkButton>
+      <br />
+      <br />
+      <Link to={getPath(MenuKey.DISTRIBUTEMIR)} className={styles.send}>
+        Distribute MIR
+      </Link>
     </CardMain>
diff --git a/src/pages/Txs/ClaimMirrorRewards.tsx b/src/pages/Txs/ClaimMirrorRewards.tsx
new file mode 100644
index 0000000..cdd497f
--- /dev/null
+++ b/src/pages/Txs/ClaimMirrorRewards.tsx
@@ -0,0 +1,13 @@
+import { useEffect } from "react"
+import { useHistory } from "react-router-dom"
+import Page from "../../components/Page"
+import { getPath, MenuKey } from "../../routes"
+const ClaimMirrorRewards = () => {
+  // No longer needed, redirect to claimrewards, later delete this page
+  const { push } = useHistory()
+  useEffect(() => {
+    push(getPath(MenuKey.CLAIMREWARDS))
+  }, [push])
+  return <Page></Page>
+}
+export default ClaimMirrorRewards
diff --git a/src/pages/Txs/ClaimRewards.tsx b/src/pages/Txs/ClaimRewards.tsx
index bdd33a3..468184e 100644
--- a/src/pages/Txs/ClaimRewards.tsx
+++ b/src/pages/Txs/ClaimRewards.tsx
@@ -6,3 +6,3 @@ const ClaimRewards = () => {
     <Page>
-      <ClaimRewardsForm />
+      <ClaimRewardsForm mirroronly={false} />
     </Page>
diff --git a/src/pages/Txs/DistributeMIR.tsx b/src/pages/Txs/DistributeMIR.tsx
new file mode 100644
index 0000000..dc15e35
--- /dev/null
+++ b/src/pages/Txs/DistributeMIR.tsx
@@ -0,0 +1,15 @@
+import Page from "../../components/Page"
+import DistributeMIRForm from "../../forms/DistributeMIRForm"
+
+const DistributeMIR = () => {
+  return (
+    <Page>
+      Distribute newly emitted MIR so that all farmers can claim MIR rewards.
+      <br />
+      <br />
+      <DistributeMIRForm />
+    </Page>
+  )
+}
+
+export default DistributeMIR
diff --git a/src/routes.tsx b/src/routes.tsx
index 234620b..0ea540b 100644
--- a/src/routes.tsx
+++ b/src/routes.tsx
@@ -17,2 +17,4 @@ import Stake from "./pages/Stake/Stake"
 import ClaimRewards from "./pages/Txs/ClaimRewards"
+import ClaimMirrorRewards from "./pages/Txs/ClaimMirrorRewards"
+import DistributeMIR from "./pages/Txs/DistributeMIR"
 import ClaimUST from "./pages/Txs/ClaimUST"
@@ -42,2 +44,4 @@ export enum MenuKey {
   CLAIMREWARDS = "Claim Rewards",
+  CLAIMMIRRORREWARDS = "Claim Mirror Rewards",
+  DISTRIBUTEMIR = "Distribute MIR",
   CLAIMUST = "Claim UST",
@@ -60,2 +64,7 @@ export const menu: Dictionary<RouteProps> = {
   [MenuKey.CLAIMREWARDS]: { path: "/claim/rewards", component: ClaimRewards },
+  [MenuKey.CLAIMMIRRORREWARDS]: {
+    path: "/claim/mirrewards",
+    component: ClaimMirrorRewards,
+  },
+  [MenuKey.DISTRIBUTEMIR]: { path: "/distributemir", component: DistributeMIR },
   [MenuKey.CLAIMUST]: { path: "/claim/ust", component: ClaimUST },
