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
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,24 @@ on:
branches: [main, develop]

jobs:
changes:
name: Detect changes
runs-on: ubuntu-latest
outputs:
backend: ${{ steps.filter.outputs.backend }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Check changed files
id: filter
uses: dorny/paths-filter@v3
with:
filters: |
backend:
- 'backend/**'
- 'package-lock.json'

frontend:
name: Frontend CI
runs-on: ubuntu-latest
Expand Down Expand Up @@ -49,6 +67,10 @@ jobs:
backend:
name: Backend CI
runs-on: ubuntu-latest
needs: changes
if: >-
github.event_name == 'push' ||
needs.changes.outputs.backend == 'true'
services:
postgres:
image: postgres:16-alpine@sha256:e013e867e712fec275706a6c51c966f0bb0c93cfa8f51000f85a15f9865a28cb
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/components/dashboard/dashboard-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ export function DashboardView({ session, onDisconnect }: DashboardViewProps) {
const handleCreateStream = async (data: StreamFormData) => {
const toastId = toast.loading("Creating stream…");
try {
await sorobanCreateStream(session, {
const result = await sorobanCreateStream(session, {
recipient: data.recipient,
tokenAddress: getTokenAddress(data.token),
amount: toBaseUnits(data.amount),
Expand All @@ -828,6 +828,7 @@ export function DashboardView({ session, onDisconnect }: DashboardViewProps) {
addStreamLocally(data);
// We don't call setShowWizard(false) here anymore, the wizard handles its own flow
toast.success("Transaction confirmed on-chain!", { id: toastId });
return result;
} catch (err) {
toast.error(toSorobanErrorMessage(err), { id: toastId });
throw err;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface StreamFormData {

interface StreamCreationWizardProps {
onClose: () => void;
onSubmit: (data: StreamFormData) => Promise<void>;
onSubmit: (data: StreamFormData) => Promise<{ txHash: string }>;
walletPublicKey?: string;
}

Expand Down Expand Up @@ -381,9 +381,8 @@ export const StreamCreationWizard: React.FC<StreamCreationWizardProps> = ({
setIsSubmitting(true);
try {
// Step 1: Submit transaction
const result = (await onSubmit(formData)) as unknown as { txHash: string };
const hash = result?.txHash;
setTxHash(hash);
const result = await onSubmit(formData);
setTxHash(result.txHash);

// Step 2: Start Polling for Indexer
setIsPolling(true);
Expand Down
Loading
Loading