Skip to content

Commit

Permalink
Jslib cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
skibitsky committed Nov 4, 2024
1 parent 90c3290 commit d957a10
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/unity-bulid-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
uses: actions/download-artifact@v3
with:
name: Build-WebGL
path: Builds/WebGL
path: Builds/WebGL/WebGL
- name: Deploy to Vercel
uses: amondnet/vercel-action@v20
with:
Expand All @@ -72,4 +72,4 @@ jobs:
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
github-token: ${{ secrets.GITHUB_TOKEN }}
github-comment: true
working-directory: Builds/WebGL
working-directory: Builds/WebGL/WebGL
14 changes: 6 additions & 8 deletions src/Reown.AppKit.Unity/Plugins/AppKit.jslib
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,12 @@ mergeInto(LibraryManager.library, {
const enableAnalytics = parameters.enableAnalytics;

// Load the scripts and initialize the configuration
import("https://cdn.jsdelivr.net/npm/@reown/[email protected]/dist/appkit.js").then(CDNW3M => {
console.log("CDNW3M", CDNW3M)
const WagmiCore = CDNW3M['WagmiCore'];
const Chains = CDNW3M['networks'];
const WagmiAdapter = CDNW3M['WagmiAdapter'];
const reconnect = WagmiCore['reconnect']
const createAppKit = CDNW3M['createAppKit']
import("https://cdn.jsdelivr.net/npm/@reown/[email protected]/dist/appkit.js").then(AppKit => {
const WagmiCore = AppKit['WagmiCore'];
const WagmiAdapter = AppKit['WagmiAdapter'];
const Chains = AppKit['networks'];
const reconnect = WagmiCore['reconnect'];
const createAppKit = AppKit['createAppKit'];

const chainsArr = chains.map(chainName => Chains[chainName]);

Expand Down Expand Up @@ -105,7 +104,6 @@ mergeInto(LibraryManager.library, {
wagmiCore: WagmiCore
};


// Insert the container into the DOM at the canvas's original position
const canvas = document.getElementsByTagName('canvas')[0];
const container = document.createElement('div');
Expand Down

0 comments on commit d957a10

Please sign in to comment.