Skip to content

Commit

Permalink
chore: cleanup old Mercury files and fix dependencies
Browse files Browse the repository at this point in the history
Co-Authored-By: ben <ben@prologe.io>
  • Loading branch information
1 parent 496dd58 commit ce3aa16
Show file tree
Hide file tree
Showing 6 changed files with 9,346 additions and 7,245 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"pnpm": "^8.0.0"
},
"workspaces": [
"packages/*"
"packages/*",
"pipes/*"
],
"dependencies": {
"@hookform/resolvers": "^3.9.1",
Expand Down
2 changes: 1 addition & 1 deletion pipes/auto-pay/src/components/ui/progress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const Progress = React.forwardRef<
<ProgressPrimitive.Root
ref={ref}
className={cn(
"relative h-4 w-full overflow-hidden rounded-full bg-secondary",
"relative h-2 w-full overflow-hidden rounded-full bg-primary/20",
className
)}
{...props}
Expand Down
70 changes: 0 additions & 70 deletions pipes/auto-pay/src/pages/api/createMercuryTransfer.ts

This file was deleted.

20 changes: 1 addition & 19 deletions pipes/auto-pay/src/pages/api/createTransfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,7 @@ import { NextApiRequest, NextApiResponse } from 'next';
import axios, { AxiosError } from 'axios';
import { v4 as uuidv4 } from 'uuid';
import type { PaymentInfo } from '@/types/wise';
import { pipe } from '@screenpipe/js';

export const getAutoPaySettings = async () => {
const settingsManager = pipe.settings;
const namespaceSettings = await settingsManager?.getNamespaceSettings(
'auto-pay'
);

return {
wiseApiKey: namespaceSettings?.wiseApiKey || process.env.WISE_API_KEY,
wiseProfileId:
namespaceSettings?.wiseProfileId || process.env.WISE_PROFILE_ID,
enableProduction:
namespaceSettings?.enableProduction ||
process.env.NEXT_PUBLIC_USE_PRODUCTION === 'true',
mercuryApiKey: namespaceSettings?.mercuryApiKey || process.env.MERCURY_API_KEY,
mercuryAccountId: namespaceSettings?.mercuryAccountId || process.env.MERCURY_ACCOUNT_ID,
};
};
import { getAutoPaySettings } from '@/lib/auto-pay-settings';

export default async function handler(
req: NextApiRequest,
Expand Down
2 changes: 1 addition & 1 deletion pipes/auto-pay/src/pages/api/fundTransfer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NextApiRequest, NextApiResponse } from 'next';
import axios from 'axios';
import { getAutoPaySettings } from './createTransfer';
import { getAutoPaySettings } from '@/lib/auto-pay-settings';

interface FundTransferRequest {
transferId: string;
Expand Down
Loading

0 comments on commit ce3aa16

Please sign in to comment.