diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..86b868e
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,20 @@
+version: 2
+updates:
+ - package-ecosystem: npm
+ directory: "/"
+ schedule:
+ interval: weekly
+ day: monday
+ open-pull-requests-limit: 10
+ labels:
+ - dependencies
+ groups:
+ stellar:
+ patterns:
+ - "@stellar/*"
+ testing:
+ patterns:
+ - "jest*"
+ - "@types/jest"
+ - "@testing-library/*"
+ - "ts-jest"
diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml
index cf23031..b8a1395 100644
--- a/.github/workflows/web.yml
+++ b/.github/workflows/web.yml
@@ -28,7 +28,7 @@ jobs:
run: npm run typecheck
- name: Test
- run: npm test
+ run: npm run test:ci
- name: Lint
run: npm run lint
diff --git a/components/issuer/panels/DistributionPanel.tsx b/components/issuer/panels/DistributionPanel.tsx
index 4d3f2cf..5565803 100644
--- a/components/issuer/panels/DistributionPanel.tsx
+++ b/components/issuer/panels/DistributionPanel.tsx
@@ -3,8 +3,10 @@
import { useState } from "react";
import { StrKey } from "@stellar/stellar-sdk";
import type { AssetDetail } from "@/types";
-import { dividend } from "@/lib/contracts";
+import { assetToken, contractIds, dividend } from "@/lib/contracts";
import { useTx } from "@/hooks/useTx";
+import { useAsync } from "@/hooks/useAsync";
+import { useWallet } from "@/hooks/useWallet";
import { useDividends } from "@/hooks/useDividends";
import { parseTokenAmount, formatTokenAmount, truncateAddress } from "@/lib/format";
import { PAYMENT_TOKEN_DECIMALS } from "@/components/dividend/ClaimButton";
@@ -43,10 +45,44 @@ function CreateDistributionCard({
onCreated?: () => void;
}) {
const tx = useTx();
+ const { address, network } = useWallet();
const [paymentToken, setPaymentToken] = useState("");
const [totalAmount, setTotalAmount] = useState("");
const [formError, setFormError] = useState
+ Insufficient balance — your wallet holds less than the requested distribution amount. +
+ )} + {needsApproval && !insufficientBalance && ( ++ The dividend contract is not approved to spend enough of this token on your behalf. + Submit an approve transaction for at least{" "} + {formatTokenAmount(requestedRaw ?? 0n, PAYMENT_TOKEN_DECIMALS)} tokens before funding + this distribution. +
+ )} ++ This token is currently paused. Minting will likely fail until the token is + unpaused below. +
+ )}