Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/app/src/app/create/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ function CreateLockInner() {
treasury,
explorerUrl,
explorerName,
shortName: chainShortName,
usdcNote,
} = useMemo(
() =>
Expand Down Expand Up @@ -691,6 +692,7 @@ function CreateLockInner() {
sablierAddress={sablierLockup}
explorerUrl={explorerUrl}
explorerName={explorerName}
chainName={chainShortName}
onCreateAnother={resetForm}
/>
) : (
Expand Down Expand Up @@ -1584,6 +1586,7 @@ function SuccessView({
sablierAddress,
explorerUrl,
explorerName,
chainName,
onCreateAnother,
}: {
txHash: `0x${string}`;
Expand All @@ -1600,6 +1603,7 @@ function SuccessView({
sablierAddress: Address;
explorerUrl: string;
explorerName: string;
chainName: string;
onCreateAnother: () => void;
}) {
const now = Math.floor(Date.now() / 1000);
Expand Down Expand Up @@ -1680,6 +1684,7 @@ function SuccessView({
endDate={endDate}
nextUnlock={nextUnlock}
sablierAddress={sablierAddress}
chainName={chainName}
/>

<div className="space-y-4">
Expand Down
6 changes: 5 additions & 1 deletion packages/app/src/app/vaults/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,17 @@ function VaultCard({
usdcDecimals,
sablierAddress,
explorerUrl,
chainName,
}: {
vault: VaultData;
onClaim: (streamId: bigint) => void;
onClaim: (id: bigint) => void;
claimingId: bigint | null;
index: number;
chainId: number;
usdcDecimals: number;
sablierAddress: Address;
explorerUrl: string;
chainName: string;
}) {
const [now, setNow] = useState(() => Math.floor(Date.now() / 1000));

Expand Down Expand Up @@ -280,6 +282,7 @@ function VaultCard({
endDate={new Date(vault.endTime * 1000)}
nextUnlock={nextUnlockLabel}
sablierAddress={sablierAddress}
chainName={chainName}
/>
)}
</div>
Expand Down Expand Up @@ -893,6 +896,7 @@ function VaultDashboard() {
usdcDecimals={usdcDecimals}
sablierAddress={sablierLockup}
explorerUrl={explorerUrl}
chainName={chainConfig.shortName}
/>
</CardErrorBoundary>
))}
Expand Down
11 changes: 8 additions & 3 deletions packages/app/src/components/ShareCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ type ShareCardProps = {
endDate: Date;
nextUnlock: string; // countdown string
sablierAddress: string;
chainName: string;
};

const CARD_W = 600;
Expand All @@ -19,7 +20,7 @@ function drawCard(
props: ShareCardProps,
masked: boolean
) {
const { streamId, amountLocked, scheduleType, endDate, nextUnlock, sablierAddress } = props;
const { streamId, amountLocked, scheduleType, endDate, nextUnlock, sablierAddress, chainName } = props;

// Background
ctx.fillStyle = "#0a0a0a";
Expand Down Expand Up @@ -47,12 +48,16 @@ function drawCard(
ctx.fillText("Proof of Lock", 32, 64);

// Chain badge
const badgePaddingX = 14;
const badgeTextWidth = ctx.measureText(chainName).width;
const badgeWidth = Math.max(68, badgeTextWidth + badgePaddingX * 2);
const badgeX = CARD_W - 32 - badgeWidth;
ctx.fillStyle = "rgba(255,255,255,0.08)";
roundRect(ctx, CARD_W - 100, 24, 68, 26, 13);
roundRect(ctx, badgeX, 24, badgeWidth, 26, 13);
ctx.fill();
ctx.fillStyle = "rgba(255,255,255,0.5)";
ctx.font = "12px system-ui, -apple-system, sans-serif";
ctx.fillText("Base", CARD_W - 78, 42);
ctx.fillText(chainName, badgeX + badgePaddingX, 42);

// Amount
ctx.fillStyle = "#ffffff";
Expand Down