Coder Social home page Coder Social logo

Bug: CoinbaseWalletSDK/CoinbaseWalletSDK.swift:32: Fatal error: `CoinbaseWalletSDK.configure` should be called only once. about wallet-mobile-sdk HOT 7 CLOSED

moesaid avatar moesaid commented on August 14, 2024
Bug: CoinbaseWalletSDK/CoinbaseWalletSDK.swift:32: Fatal error: `CoinbaseWalletSDK.configure` should be called only once.

from wallet-mobile-sdk.

Comments (7)

bangtoven avatar bangtoven commented on August 14, 2024 1

hey @moesaid
for now, cbw sdk assumes that configuration doesn't change after it's set. it defines which wallet host your app will connect to and the callback url your app will get responses.
we do provide a way to check whether the sdk is configured: https://github.com/coinbase/wallet-mobile-sdk/blob/4ff27b7b7559f8a46549b69573c8aa3493344565/ios/CoinbaseWalletSDK/CoinbaseWalletSDK.swift#L23
give the log you shared, it seems you are using flutter. and probably our dart library might not be exposing this variable yet. please take a look at the flutter example code.

btw, our team is working on multi-wallet support and it will ease the restriction a bit. we expect to release the new sdk end of this quarter.

from wallet-mobile-sdk.

bangtoven avatar bangtoven commented on August 14, 2024 1

@moesaid please try the new flutter lib v1.0.5.
it returns flutter exception instead of fatal error.
https://github.com/coinbase/wallet-mobile-sdk/pull/174/files

as i shared above, a long-term solution that we've been working on would be out soon.

from wallet-mobile-sdk.

vishnumad avatar vishnumad commented on August 14, 2024

This is expected behavior, you should only call the configure function once. If called multiple times, we throw an error on debug builds. Release builds should be unaffected.

from wallet-mobile-sdk.

moesaid avatar moesaid commented on August 14, 2024

@vishnumad thanks for letting me know. I am curious to understand the reasoning behind the chosen approach.

Is there a way to verify whether the configuration has been invoked or a connection has been established prior to attempting to establish a new one? I apologize for requesting your expertise as I am relatively new to the SDK and have only recently begun exploring its features.

from wallet-mobile-sdk.

moesaid avatar moesaid commented on August 14, 2024

@bangtoven Thank you for your prompt response. I appreciate it. I am eagerly anticipating the exposure of this flag and the future updates to the CBW SDK.

from wallet-mobile-sdk.

bangtoven avatar bangtoven commented on August 14, 2024

my pleasure! are you interested in trying out beta version of our sdk btw? it's not ready yet (#146), but we could share some early version once it's in good shape and get your feedback.

from wallet-mobile-sdk.

moesaid avatar moesaid commented on August 14, 2024

absolutely! i will take a spin latter today, hopefully play with it over the week!

from wallet-mobile-sdk.

Related Issues (20)

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.