Skip to content

Commit

Permalink
Merge branch 'main' into refactor/dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
zaibon committed Mar 15, 2024
2 parents 3c4a172 + c2a1776 commit dfb1ec2
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
node-version: '18.x'

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 8
Expand All @@ -29,7 +29,7 @@ jobs:
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ node_modules
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

.vercel
# Sentry Config File
.sentryclirc

.vercel
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@
"@socket.tech/ll-core-v2": "^0.0.68"
}
}
}
}
25 changes: 25 additions & 0 deletions src/hooks.client.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { handleErrorWithSentry, Replay } from '@sentry/sveltekit';
import * as Sentry from '@sentry/sveltekit';

import { dev } from '$app/environment';

Sentry.init({
dsn: 'https://15841eeeac40ad075e756df391e51793@o4506180497899520.ingest.sentry.io/4506180501241856',
tracesSampleRate: 1.0,

// This sets the sample rate to be 10%. You may want this to be 100% while
// in development and sample at a lower rate in production
replaysSessionSampleRate: 0.1,

// If the entire session is not sampled, use the below sample rate to sample
// sessions when an error occurs.
replaysOnErrorSampleRate: 1.0,

// If you don't want to use Session Replay, just remove the line below:
integrations: [new Replay()],

environment: dev ? 'development' : 'production'
});

// If you have a custom error handler, pass it to `handleErrorWithSentry`
export const handleError = handleErrorWithSentry();
17 changes: 17 additions & 0 deletions src/hooks.server.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { handleErrorWithSentry, sentryHandle } from '@sentry/sveltekit';
import * as Sentry from '@sentry/sveltekit';
import { sequence } from '@sveltejs/kit/hooks';

import { dev } from '$app/environment';

Sentry.init({
dsn: 'https://15841eeeac40ad075e756df391e51793@o4506180497899520.ingest.sentry.io/4506180501241856',
tracesSampleRate: 1.0,
environment: dev ? 'development' : 'production'
});

// If you have custom handlers, make sure to place them after `sentryHandle()` in the `sequence` function.
export const handle = sequence(sentryHandle());

// If you have a custom error handler, pass it to `handleErrorWithSentry`
export const handleError = handleErrorWithSentry();
1 change: 0 additions & 1 deletion src/lib/services/wallet.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// import { chains } from '$lib/consts/chains';
import { CHAIN_DETAILS } from '@squirrel-labs/peanut-sdk';
import { createWeb3Modal, defaultConfig } from '@web3modal/ethers5';
import { ethers } from 'ethers';
Expand Down
5 changes: 4 additions & 1 deletion src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
Toast
} from '@skeletonlabs/skeleton';
import { inject } from '@vercel/analytics';
import { onMount } from 'svelte';
import { dev } from '$app/environment';
import Web3Modal from '$lib/components/Web3Modal.svelte';
Expand All @@ -20,7 +21,9 @@
inject({ mode: dev ? 'development' : 'production' });
initializeStores();
initWeb3Modal();
onMount(() => {
initWeb3Modal();
});
// Floating UI for Popups
storePopup.set({ computePosition, autoUpdate, flip, shift, offset, arrow });
Expand Down
14 changes: 13 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
import { sentrySvelteKit } from '@sentry/sveltekit';
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
import { purgeCss } from 'vite-plugin-tailwind-purgecss';

export default defineConfig({
plugins: [sveltekit(), purgeCss()]
plugins: [
sentrySvelteKit({
autoUploadSourceMaps: false,
// sourceMapsUploadOptions: {
// org: 'zaibon',
// project: 'commitkudos',
// },
adapter: 'vercel'
}),
sveltekit(),
purgeCss()
]
});

0 comments on commit dfb1ec2

Please sign in to comment.