Giter VIP home page Giter VIP logo

Comments (9)

0xGeel avatar 0xGeel commented on July 17, 2024 1

Hi there! Thanks for getting in touch and reporting this.

You may be correct in your intuition on the legacy WalletConnect being phaced out.
High on my priority list is to migrate to the new WalletConnect version which would resolve this.

I will try my best to get back to you tomorrow on this!

from loopgate.

0xGeel avatar 0xGeel commented on July 17, 2024 1

I see ConnectKit (the underlying dependency I have that depends on WalletConnect Legacy) have published an update last week which includes Wagmi V1.0. I hope they have updated to WalletConnect V2, that should make my life a lot easier :)

Reference: https://github.com/family/connectkit/tree/main/packages/connectkit-next-siwe

from loopgate.

0xGeel avatar 0xGeel commented on July 17, 2024 1

Working on this issue in this PR:

#28

from loopgate.

SpaceCatOfficial avatar SpaceCatOfficial commented on July 17, 2024 1

Excellent! Thank you, Geel. I'm learning more about your code and thank you for the information on the dependencies.

from loopgate.

0xGeel avatar 0xGeel commented on July 17, 2024 1

... thank you for the information on the dependencies.

Sure, any time! Happy to share what I know so that you might also contribute cool things to the space :D

One issue I'm running into now is the fact that ConnectKit's implementation of the siweMessage.verify() function does not play nice with a WalletConnect generated signature from Smart Contract wallets like Loopring.

Error: invalid signature string (argument="signature", value="0x10f65980d081cdf9ff37961f6d692d6fc0ef3c00fd26da8c22f6be639148d91c5f1ea6dc8711b5a4167e3b744d155b0b310ab5ee06c7ab139a335c4653a245df1c02", code=INVALID_ARGUMENT, version=bytes/5.7.0)

Going through the SIWE code right now to understand how to solve this issue. "Regular" crypto wallets (like GameStop, MetaMask) are already working again with the update I have in that PR :)

from loopgate.

SpaceCatOfficial avatar SpaceCatOfficial commented on July 17, 2024

Hey Geel, I was able to run the local version with the walletconnect-v2 PR updates. I do run in to an issue with my loopring wallet where the connection attempt is terminated before the wallet connects.

image

I'm wondering if this is normal when locally hosted?
To check if it was due to being locally hosted, I moved ahead to the netlify instructions and ran into a SIWE related error.

image

Relevant excerpt:

image

With the following complete Log:

12:24:22 PM: build-image version: 4a78b4474c4e90e8752839579cf887906c3805af (focal) 12:24:22 PM: buildbot version: aa75ae20a7981a2d2511b45e6fe311699508e6ee 12:24:22 PM: Fetching cached dependencies 12:24:22 PM: Failed to fetch cache, continuing with build 12:24:22 PM: Starting to prepare the repo for build 12:24:23 PM: No cached dependencies found. Cloning fresh repo 12:24:23 PM: git clone --filter=blob:none https://github.com/SpaceCatOfficial/TokenGate 12:24:23 PM: Preparing Git Reference refs/heads/main 12:24:25 PM: Starting to install dependencies 12:24:25 PM: Python version set to 3.8 12:24:25 PM: Attempting Ruby version 2.7.2, read from environment 12:24:26 PM: Using Ruby version 2.7.2 12:24:27 PM: Started restoring cached go cache 12:24:27 PM: Finished restoring cached go cache 12:24:27 PM: go version go1.19.9 linux/amd64 12:24:27 PM: Using PHP version 8.0 12:24:28 PM: v18.16.0 is already installed. 12:24:29 PM: Now using node v18.16.0 (npm v9.5.1) 12:24:29 PM: Enabling Node.js Corepack 12:24:29 PM: Started restoring cached build plugins 12:24:29 PM: Finished restoring cached build plugins 12:24:29 PM: Started restoring cached corepack dependencies 12:24:29 PM: Finished restoring cached corepack dependencies 12:24:29 PM: No npm workspaces detected 12:24:29 PM: Started restoring cached node modules 12:24:29 PM: Finished restoring cached node modules 12:24:29 PM: Installing npm packages using npm version 9.5.1 12:24:30 PM: npm WARN old lockfile 12:24:30 PM: npm WARN old lockfile The package-lock.json file was created with an old version of npm, 12:24:30 PM: npm WARN old lockfile so supplemental metadata must be fetched from the registry. 12:24:30 PM: npm WARN old lockfile 12:24:30 PM: npm WARN old lockfile This is a one-time fix-up, please be patient... 12:24:30 PM: npm WARN old lockfile 12:24:41 PM: npm WARN deprecated [email protected]: This module has been superseded by the multiformats module 12:24:41 PM: npm WARN deprecated [email protected]: This module is deprecated, please upgrade to @multiformats/multiaddr 12:24:41 PM: npm WARN deprecated [email protected]: This module has been superseded by the multiformats module 12:24:43 PM: npm WARN deprecated [email protected]: This module has been superseded by the multiformats module 12:24:44 PM: npm WARN deprecated @json-rpc-tools/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. 12:24:44 PM: npm WARN deprecated @json-rpc-tools/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. 12:24:44 PM: npm WARN deprecated @json-rpc-tools/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. 12:24:44 PM: npm WARN deprecated [email protected]: This module has been superseded by the multiformats module 12:24:44 PM: npm WARN deprecated [email protected]: This module has been superseded by the multiformats module 12:24:45 PM: npm WARN deprecated [email protected]: This module has been superseded by the multiformats module 12:24:45 PM: npm WARN deprecated [email protected]: This module has been superseded by the multiformats module 12:24:45 PM: npm WARN deprecated [email protected]: This module has been superseded by the multiformats module 12:24:52 PM: added 1138 packages, and audited 1139 packages in 22s 12:24:52 PM: 203 packages are looking for funding 12:24:52 PM: run npm fund for details 12:24:52 PM: found 0 vulnerabilities 12:24:52 PM: npm packages installed 12:24:52 PM: Install dependencies script success 12:24:52 PM: Starting build script 12:24:53 PM: Detected 1 framework(s) 12:24:53 PM: "next" at version "13.4.4" 12:24:53 PM: Section completed: initializing 12:24:54 PM: ​ 12:24:54 PM: Netlify Build 12:24:54 PM: ──────────────────────────────────────────────────────────────── 12:24:54 PM: ​ 12:24:54 PM: ❯ Version 12:24:54 PM: @netlify/build 29.12.1 12:24:54 PM: ​ 12:24:54 PM: ❯ Flags 12:24:54 PM: baseRelDir: true 12:24:54 PM: buildId: 648014857fbf0633d86518f3 12:24:54 PM: deployId: 648014857fbf0633d86518f5 12:24:54 PM: ​ 12:24:54 PM: ❯ Current directory 12:24:54 PM: /opt/build/repo 12:24:54 PM: ​ 12:24:54 PM: ❯ Config file 12:24:54 PM: No config file was defined: using default values. 12:24:54 PM: ​ 12:24:54 PM: ❯ Context 12:24:54 PM: production 12:24:54 PM: ​ 12:24:54 PM: ❯ Installing plugins 12:24:54 PM: - @netlify/[email protected] 12:25:02 PM: ​ 12:25:02 PM: ❯ Using Next.js Runtime - v4.37.4 12:25:03 PM: ​ 12:25:03 PM: @netlify/plugin-nextjs (onPreBuild event) 12:25:03 PM: ──────────────────────────────────────────────────────────────── 12:25:03 PM: ​ 12:25:03 PM: No Next.js cache to restore. 12:25:03 PM: Netlify configuration property "build.environment.NEXT_PRIVATE_TARGET" value changed. 12:25:03 PM: ​ 12:25:03 PM: (@netlify/plugin-nextjs onPreBuild completed in 14ms) 12:25:03 PM: ​ 12:25:03 PM: Build command from Netlify app 12:25:03 PM: ──────────────────────────────────────────────────────────────── 12:25:03 PM: ​ 12:25:03 PM: $ npm run build 12:25:03 PM: > [email protected] build 12:25:03 PM: > next build 12:25:04 PM: - warn No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache 12:25:04 PM: - info Linting and checking validity of types... 12:25:08 PM: Failed to compile. 12:25:08 PM: 12:25:08 PM: ./src/utils/siwe/siwe.ts:1:10 12:25:08 PM: Type error: Module '"./configureSIWE"' has no exported member 'configureSIWE'. 12:25:08 PM: > 1 | import { configureSIWE } from "./configureSIWE"; 12:25:08 PM: | ^ 12:25:08 PM: 2 | // import { configureSIWE } from "connectkit-next-siwe"; 12:25:08 PM: 3 | 12:25:08 PM: 4 | // Replaced with an edited version on 06-02-2023 to circumvent a 'connectkit-next-siwe' WalletConnect through a Smart Wallet issue (Loopring Wallet). 12:25:08 PM: ​ 12:25:08 PM: "build.command" failed 12:25:08 PM: ──────────────────────────────────────────────────────────────── 12:25:08 PM: ​ 12:25:08 PM: Error message 12:25:08 PM: Command failed with exit code 1: npm run build (https://ntl.fyi/exit-code-1) 12:25:08 PM: ​ 12:25:08 PM: Error location 12:25:08 PM: In Build command from Netlify app: 12:25:08 PM: npm run build 12:25:08 PM: ​ 12:25:08 PM: Resolved config 12:25:08 PM: build: 12:25:08 PM: command: npm run build 12:25:08 PM: commandOrigin: ui 12:25:08 PM: environment: 12:25:08 PM: - NEXT_PRIVATE_TARGET 12:25:08 PM: publish: /opt/build/repo/.next 12:25:08 PM: publishOrigin: ui 12:25:08 PM: plugins: 12:25:08 PM: - inputs: {} 12:25:08 PM: origin: ui 12:25:08 PM: package: '@netlify/plugin-nextjs' 12:25:08 PM: Caching artifacts 12:25:08 PM: Started saving node modules 12:25:08 PM: Finished saving node modules 12:25:09 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2) 12:25:08 PM: Started saving build plugins 12:25:08 PM: Finished saving build plugins 12:25:08 PM: Started saving corepack cache 12:25:08 PM: Finished saving corepack cache 12:25:08 PM: Started saving pip cache 12:25:08 PM: Finished saving pip cache 12:25:08 PM: Started saving emacs cask dependencies 12:25:08 PM: Finished saving emacs cask dependencies 12:25:08 PM: Started saving maven dependencies 12:25:08 PM: Finished saving maven dependencies 12:25:08 PM: Started saving boot dependencies 12:25:08 PM: Finished saving boot dependencies 12:25:08 PM: Started saving rust rustup cache 12:25:08 PM: Finished saving rust rustup cache 12:25:08 PM: Started saving go dependencies 12:25:08 PM: Finished saving go dependencies 12:25:09 PM: Build failed due to a user error: Build script returned non-zero exit code: 2 12:25:09 PM: Failing build: Failed to build site 12:25:10 PM: Finished processing build request in 47.321s

from loopgate.

0xGeel avatar 0xGeel commented on July 17, 2024

I'm not entirely sure where your error comes from — could it be that you have not updated all files from my PR's code (including the configureSIWE override)?


Anyways, I have the Loopring Wallet WalletConnect V2 working!
I just merged the 0.3.0-beta version. You can try to use that soon, I'd love to hear your experience.

What you need to do:

  • Update your fork to the 0.3.0 version
  • Create and include a WalletConnect Project ID. (Instructions below!)

from loopgate.

SpaceCatOfficial avatar SpaceCatOfficial commented on July 17, 2024

Hey Geel!
This seems to have cleared just about all my hurdles. I have followed the instructions on the walletconnect installation link and added this to the .env file. I definitely believe my update with the PR had an issue due to me.

At the moment the wallet connection hangs on my phone in the loopring wallet after scanning the QR code. So I'm going to check my .env file for typing errors as the env-status page suggests. User error is likely at this point.

from loopgate.

SpaceCatOfficial avatar SpaceCatOfficial commented on July 17, 2024

It appears everything is working just fine now.

from loopgate.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.