diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 748c1c91..9c90c12a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,5 +1,9 @@ # These owners will be the default owners for everything in + # the repo. Unless a later match takes precedence, + # @chibie @jeremy0x be requested for + # review when someone opens a pull request. -* @chibie @jeremy0x + +- @chibie @OnahProsper diff --git a/app/pages/TransactionForm.tsx b/app/pages/TransactionForm.tsx index 2f7117a0..e9ed0e3a 100644 --- a/app/pages/TransactionForm.tsx +++ b/app/pages/TransactionForm.tsx @@ -38,6 +38,7 @@ import { useNetwork, useTokens, } from "../context"; +import { min } from "date-fns"; /** * TransactionForm component renders a form for submitting a transaction. @@ -338,18 +339,24 @@ export const TransactionForm = ({ let minAmountSentValue = 0.5; const normalizedToken = token?.toUpperCase(); + const isEthereum = selectedNetwork?.chain?.name === "Ethereum"; if (normalizedToken === "CNGN") { if (cngnRate && cngnRate > 0) { // Valid rate available - calculate limits and clear errors maxAmountSentValue = 50000000; - minAmountSentValue = 0.5 * cngnRate; + // For Ethereum, require 1M worth of cNGN. For other networks, require 0.5 worth + minAmountSentValue = isEthereum ? 716 * cngnRate : 0.5 * cngnRate; setRateError(null); } else { // cNGN selected but no valid rate - set error const errorMessage = cngnRateError || "No available quote"; + minAmountSentValue = isEthereum ? 716 : 0.5; setRateError(errorMessage); } + } else if (isEthereum) { + // For non-cNGN tokens on Ethereum, require $50 minimum + minAmountSentValue = 50; } formMethods.register("amountSent", {