Skip to content

Commit

Permalink
fix: alias and fix api url
Browse files Browse the repository at this point in the history
  • Loading branch information
Zygimantass committed Nov 3, 2023
1 parent fb9cb9a commit 900cbb0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
pull_request:

jobs:
Deploy-Production:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -21,5 +21,10 @@ jobs:
- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt -e NEXT_PUBLIC_API_URL=${{ secrets.SKIP_DEV_API }} --token=${{ secrets.VERCEL_TOKEN }}

run: vercel deploy --prebuilt -e NEXT_PUBLIC_API_URL=${{ secrets.SKIP_DEV_API }} --token=${{ secrets.VERCEL_TOKEN }} | tee output.txt
- name: Get deployment URL
run: |
DEPLOYMENT_URL=$(tail -n 1 output.txt)
echo "DEPLOYMENT_URL=$DEPLOYMENT_URL" >> $GITHUB_ENV
- name: Create an alias
run: vercel alias $DEPLOYMENT_URL dev.ibc.fun
4 changes: 3 additions & 1 deletion src/solve/context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import {
isLedger,
} from "@/utils/utils";

const API_URL = process.env.NEXT_PUBLIC_API_URL || SKIP_API_URL;

export const SkipContext = createContext<
| {
skipClient: SkipRouter;
Expand All @@ -19,7 +21,7 @@ export const SkipProvider: FC<PropsWithChildren> = ({ children }) => {
const { client: walletClient } = useWalletClient();

const skipClient = new SkipRouter({
apiURL: SKIP_API_URL,
apiURL: API_URL,
getOfflineSigner: async (chainID) => {
if (!walletClient) {
throw new Error("No offline signer available");
Expand Down

0 comments on commit 900cbb0

Please sign in to comment.