diff --git a/.env b/.env index 68ea3a8..ba2be7d 100644 --- a/.env +++ b/.env @@ -1,3 +1,3 @@ VITE_PROFILE_ADDRESS=0xba1132bc08f82fe2 -VITE_ACCESS_NODE_API=https://access-testnet.onflow.org +VITE_ACCESS_NODE_API=https://rest-testnet.onflow.org VITE_DISCOVERY_WALLET=https://fcl-discovery.onflow.org/testnet/authn \ No newline at end of file diff --git a/package.json b/package.json index 5514ea8..caa8217 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fcl-sveltekit", - "version": "0.0.1", + "version": "1.0.0", "scripts": { "dev": "svelte-kit dev", "build": "svelte-kit build", @@ -9,11 +9,9 @@ }, "devDependencies": { "@picocss/pico": "^1.4.4", - "@rollup/plugin-node-resolve": "^13.1.1", - "@samatech/onflow-fcl-esm": "^0.4.4", - "@sveltejs/adapter-auto": "1.0.0-next.4", - "@sveltejs/adapter-vercel": "1.0.0-next.32", - "@sveltejs/kit": "1.0.0-next.202", + "@onflow/fcl": "^1.0.0-alpha.2", + "@sveltejs/adapter-auto": "^1.0.0-next.40", + "@sveltejs/kit": "^1.0.0-next.202", "@sveltejs/vite-plugin-svelte": "^1.0.0-next.32", "rollup-plugin-node-builtins": "^2.1.2", "rollup-plugin-node-globals": "^1.4.0", diff --git a/src/flow/actions.js b/src/flow/actions.js index c0db2e3..0af848e 100644 --- a/src/flow/actions.js +++ b/src/flow/actions.js @@ -1,7 +1,7 @@ import { browser } from '$app/env'; import { get } from 'svelte/store'; -import * as fcl from "@samatech/onflow-fcl-esm"; +import * as fcl from "@onflow/fcl"; import "./config"; import { user, profile, transactionStatus, transactionInProgress } from './stores'; diff --git a/src/flow/config.js b/src/flow/config.js index 644c96d..e38989a 100644 --- a/src/flow/config.js +++ b/src/flow/config.js @@ -1,6 +1,8 @@ -import { config } from "@samatech/onflow-fcl-esm"; +import { config } from "@onflow/config"; config({ + "app.detail.title": "FCL Quickstart for SvelteKit", // Shows user what dapp is trying to connect + "app.detail.icon": "https://unavatar.io/twitter/muttonia", // shows image to the user to display your dapp brand "accessNode.api": import.meta.env.VITE_ACCESS_NODE_API, "discovery.wallet": import.meta.env.VITE_DISCOVERY_WALLET, "0xProfile": import.meta.env.VITE_PROFILE_ADDRESS diff --git a/svelte.config.js b/svelte.config.js index b117298..965d1b1 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -1,53 +1,10 @@ -/** @type {import('@sveltejs/kit').Config} */ - -import resolve from '@rollup/plugin-node-resolve' -import builtins from 'rollup-plugin-node-builtins'; -import globals from 'rollup-plugin-node-globals'; -import vercel from '@sveltejs/adapter-vercel'; +import adapter from '@sveltejs/adapter-auto'; +/** @type {import('@sveltejs/kit').Config} */ const config = { - // options passed to svelte.compile (https://svelte.dev/docs#svelte_compile) - compilerOptions: null, - - // an array of file extensions that should be treated as Svelte components - extensions: ['.svelte'], - - kit: { - adapter: vercel(), // change this to whatever build adapter you want to use (e.g. static) - files: { - assets: 'static', - hooks: 'src/hooks', - lib: 'src/lib', - routes: 'src/routes', - serviceWorker: 'src/service-worker', - template: 'src/app.html' - }, - paths: { - assets: '', - base: '' - }, - // hydrate: false, - prerender: { - crawl: false, - enabled: false - }, - router: true, - ssr: true, - vite: () => ({ - plugins: [ - builtins(), - resolve({ - browser: true, - }), - globals(), - ], - }), - }, - - // SvelteKit uses vite-plugin-svelte. Its options can be provided directly here. - - // See the available options at https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/config.md - + kit: { + adapter: adapter(), + } }; export default config; \ No newline at end of file