Coder Social home page Coder Social logo

mobilewalletprotocol / wallet-mobile-sdk Goto Github PK

View Code? Open in Web Editor NEW
286.0 286.0 107.0 7.81 MB

An open protocol for mobile web3 apps to interact with wallets

Home Page: https://mobilewalletprotocol.github.io/wallet-mobile-sdk/

License: Other

Ruby 2.58% Swift 30.17% Kotlin 38.95% Java 1.24% TypeScript 16.15% Objective-C 0.40% Dart 9.75% JavaScript 0.75%
android coinbase dapp flutter ios mobile sdk wallet web3

wallet-mobile-sdk's People

Contributors

ahollenbach avatar amitgoelny avatar axeldelafosse avatar bangtoven avatar dependabot[bot] avatar github-actions[bot] avatar hishboy avatar llbartekll avatar taycaldwell avatar vishnumad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wallet-mobile-sdk's Issues

support macos

Is your feature request related to a problem? Please describe.

[!] The platform of the target Wallet macOS (macOS 12.0) is not compatible with CoinbaseWalletSDK (1.0.3), which does not support macOS.

Describe the solution you'd like

support macos via cocoapods

Describe alternatives you've considered

No response

Additional context

No response

Unreviewed commit on master!

Unreviewed commit(s) COMPARE was merged to master by bangtoven.

Comment with appropriate number of πŸ‘ to approve.


Reviewed requirements satisfied? No
Ancestors reviewed? Yes

Unreviewed commit on master!

Unreviewed commit(s) COMPARE was merged to master by bangtoven.

Comment with appropriate number of πŸ‘ to approve.


Reviewed requirements satisfied? No
Ancestors reviewed? Yes

test test test

Is your feature request related to a problem? Please describe.

No response

Describe the solution you'd like

submitting a new issue files a jira automatically 😏

Describe alternatives you've considered

No response

Additional context

No response

Qestion: What is the meaning of "wsegue"?

Describe the bug

I found a lot of "wsegue" in the sdk, including the hostURL and the mandatory suffix "callbackURL" in the source code, what is this for? Because this character will be displayed in the coinbase wallet connection screen.

Steps

  1. Take the RN project as an example, use "eth_requestAccounts" to start the connection

  2. The coinbase app will pop up the connection screen, and the dapp package name will be followed by "wsegue"

image

Expected behavior

nothing

Version

No response

Additional info

No response

Desktop

No response

Smartphone

No response

Bug: SDK still requires minSdkVersion = 23

Describe the bug

The SDK is asking me to use minSdkVersion = 23 even though it has 21 defined in its gradle file

Steps

  1. Create a RN app with minSdkVersion = 21
  2. Add the package: @coinbase/wallet-mobile-sdk@^1.0.5
  3. Run yarn android

Expected behavior

The app should work with minSdkVersion = 21 after this change if I'm not mistaken:

https://github.com/coinbase/wallet-mobile-sdk/pull/200/files#diff-00d8f1b43cac65c2c500b5e018dad9a17330112b8140378e3c4223e5505f232aR6.

Instead I get this error:

android/app/src/debug/AndroidManifest.xml Error:
	uses-sdk:minSdkVersion 21 cannot be smaller than version 23 declared in library [com.coinbase:coinbase-wallet-sdk:1.0.4] transformed/jetified-coinbase-wallet-sdk-1.0.4/AndroidManifest.xml as the library might be using APIs not available in 21
	Suggestion: use a compatible library with a minSdk of at most 21,
		or increase this project's minSdk version to at least 23,

Version

1.0.5

Additional info

No response

Desktop

  • React native: 0.71.4
  • Coinbase npm package version: 1.0.5

Smartphone

No response

Bug: SendTransaction does not work with other chain other than ethereum in using android sdk

Describe the bug

When I try to do send transaction by changing the chain to 80001 (Polygon Mumbai), the wallet shows the error as "Something went wrong". I tried it with SwitchChain also.

Steps

  1. Go to ActionsManager in android sdk.
  2. Chain chainId to 80001 in getSendTransaction and switchEthereumChain
  3. Build and run the app and try"Make Request" in the example app
  4. It will show "Something went wrong" in the coinbase app

Expected behavior

The expected behavior is that it shows the prompt to show send a transaction as it does with the Ethereum chain but it does not

Version

No response

Additional info

No response

Desktop

No response

Smartphone

No response

Java 17 compatibility

I have a project using spring boot 3 and java 17, I'm trying to download the last version of coinbase wallet sdk:

implementation "com.coinbase:coinbase-wallet-sdk:1.0.4"

I always receive the error

app:test: Could not resolve com.coinbase:coinbase-wallet-sdk:1.0.4.
Required by:
    project :

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

After various reimports sometime the error does not show up, but if I run gradlew dependencies I see the following output
com.coinbase:coinbase-wallet-sdk:1.0.4 FAILED

I guess is for the java version

Bug: java.lang.RuntimeException

Describe the bug

java.lang.RuntimeException

Steps

  1. Flutter app use https://pub.dev/packages/coinbase_wallet_sdk
  2. app connect coinbase wallet and request personal_sign
  3. Exception java.lang.RuntimeException:
    at android.app.ActivityThread.deliverResults (ActivityThread.java:5568)
    at android.app.ActivityThread.handleSendResult (ActivityThread.java:5607)
    at android.app.servertransaction.ActivityResultItem.execute (ActivityResultItem.java:54)
    at android.app.servertransaction.ActivityTransactionItem.execute (ActivityTransactionItem.java:45)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:135)
    at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:95)
    at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2374)
    at android.os.Handler.dispatchMessage (Handler.java:106)
    at android.os.Looper.loopOnce (Looper.java:233)
    at android.os.Looper.loop (Looper.java:344)
    at android.app.ActivityThread.main (ActivityThread.java:8249)
    at java.lang.reflect.Method.invoke
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:589)
    at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1071)
    Caused by javax.crypto.AEADBadTagException: error:1e000065:Cipher functions:OPENSSL_internal:BAD_DECRYPT
    at java.lang.reflect.Constructor.newInstance0
    at java.lang.reflect.Constructor.newInstance (Constructor.java:343)
    at com.android.org.conscrypt.OpenSSLAeadCipher.throwAEADBadTagExceptionIfAvailable (OpenSSLAeadCipher.java:320)
    at com.android.org.conscrypt.OpenSSLAeadCipher.doFinalInternal (OpenSSLAeadCipher.java:371)
    at com.android.org.conscrypt.OpenSSLCipher.engineDoFinal (OpenSSLCipher.java:374)
    at javax.crypto.Cipher.doFinal (Cipher.java:2114)
    at com.google.crypto.tink.subtle.AesGcmJce.decrypt (AesGcmJce.java)
    at com.coinbase.android.nativesdk.message.Cipher.decrypt (Cipher.java)
    at com.coinbase.android.nativesdk.message.response.ResponseSerializer.deserialize (ResponseSerializer.java)
    at com.coinbase.android.nativesdk.message.response.ResponseSerializer.deserialize (ResponseSerializer.java)
    at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic (Polymorphic.kt)
    at kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.decodeSerializableValue (AbstractJsonTreeDecoder.java)
    at kotlinx.serialization.json.internal.TreeJsonDecoderKt.readJson (TreeJsonDecoder.kt)
    at kotlinx.serialization.json.Json.decodeFromJsonElement (Json.java)
    at com.coinbase.android.nativesdk.message.MessageSerializer.deserialize (MessageSerializer.java)
    at com.coinbase.android.nativesdk.message.MessageSerializer.deserialize (MessageSerializer.java)
    at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic (Polymorphic.kt)
    at kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.decodeSerializableValue (AbstractJsonTreeDecoder.java)
    at kotlinx.serialization.json.internal.TreeJsonDecoderKt.readJson (TreeJsonDecoder.kt)
    at kotlinx.serialization.json.Json.decodeFromJsonElement (Json.java)
    at com.coinbase.android.nativesdk.message.MessageConverter.decodeResponse (MessageConverter.java)
    at com.coinbase.android.nativesdk.CoinbaseWalletSDK.handleResponse (CoinbaseWalletSDK.java)
    at com.coinbase.flutter.wallet_sdk.CoinbaseWalletSdkFlutterPlugin.onActivityResult (CoinbaseWalletSdkFlutterPlugin.java)
    at io.flutter.embedding.engine.FlutterEngineConnectionRegistry$FlutterEngineActivityPluginBinding.onActivityResult (FlutterEngineConnectionRegistry.java)
    at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.onActivityResult (FlutterEngineConnectionRegistry.java)
    at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onActivityResult (FlutterActivityAndFragmentDelegate.java)
    at io.flutter.embedding.android.FlutterFragment.onActivityResult (FlutterFragment.java)
    at io.flutter.embedding.android.FlutterFragmentActivity.onActivityResult (FlutterFragmentActivity.java)
    at android.app.Activity.dispatchActivityResult (Activity.java:8472)
    at android.app.ActivityThread.deliverResults (ActivityThread.java:5561)

Expected behavior

Not Exception

Version

1.0.6

Additional info

No response

Desktop

No response

Smartphone

No response

Feature Request: Connect with Coinbase App

Is your feature request related to a problem? Please describe.

Do you have any plans of adding support for connecting with the Coinbase App?

Describe the solution you'd like

We have a website where, when used on mobile, the user is redirected to https://www.coinbase.com/connect-dapp and can choose how to connect. To keep it 1:1 it would be nice to have this feature on the React Native App as well.

Describe alternatives you've considered

No response

Additional context

No response

Unreviewed commit on master!

Unreviewed commit(s) COMPARE was merged to master by bangtoven.

Comment with appropriate number of πŸ‘ to approve.


Reviewed requirements satisfied? No
Ancestors reviewed? Yes

Bug: CoinbaseWalletSDK .launch(intent) ActivityNotFoundException {org.toshi/org.toshi.MainActivity}

Describe the bug

On some devices launching the intent (dat=cbwallet://wsegue/... pkg=org.toshi cmp=org.toshi/.MainActivity) obtained from CoinbaseWalletSDK.openIntent causes ActivityNotFoundException

Steps

  1. follow com.coinbase:coinbase-wallet-sdk:1.0.4 setup and ensure is added to queries in manifest
  2. initialize client CoinbaseWalletSDK
  3. when client is not connected call client.initiateHandshake
  4. this init will trigger openIntent callback on the CoinbaseWalletSDK client
  5. use compose activity launcher rememberLauncherForActivityResult and launch the given intent: coinbaseConnectLauncher.launch(intent)
  6. On some devices step 5 cause app failure with: android.content.ActivityNotFoundException: Unable to find explicit activity class {org.toshi/org.toshi.MainActivity}

Expected behavior

Since we are following CoinbaseWalletSDK setup https://github.com/coinbase/wallet-mobile-sdk/tree/master/android#setup there has to be 100% of devices starting the coinbase wallet app. But now for some reason some devices are failing to call it.

Failing devices:

  • Google Pixel 6 Pro, Android 13, Coinbase Wallet App 28.60.0
  • Samsung Galaxy A52s 5G - Android 13, One UI 5.1 - Coinbase Wallet App 28.60.0

Devices without any issue:*
Google Pixel 6 - Android 13 - Coinbase 28.60.0
Google Pixel 3 - Android 12 - Coinbase 28.59.0 (28.60.0)
Samsung A3 - Android 8 - Coinbase 28.60.0

Version

com.coinbase:coinbase-wallet-sdk:1.0.4

Additional info

android.content.ActivityNotFoundException: Unable to find explicit activity class {org.toshi/org.toshi.MainActivity}; have you declared this activity in your AndroidManifest.xml, or does your intent not match its declared <intent-filter>? at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2171) at android.app.Instrumentation.execStartActivity(Instrumentation.java:1805) at android.app.Activity.startActivityForResult(Activity.java:5596) at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:753) at androidx.core.app.ActivityCompat$Api16Impl.startActivityForResult(ActivityCompat.java:809) at androidx.core.app.ActivityCompat.startActivityForResult(ActivityCompat.java:246) at androidx.activity.ComponentActivity$2.onLaunch(ComponentActivity.java:258) at androidx.activity.result.ActivityResultRegistry$3.launch(ActivityResultRegistry.java:246) at androidx.activity.compose.ActivityResultLauncherHolder.launch(ActivityResultRegistry.kt:154) at androidx.activity.compose.ManagedActivityResultLauncher.launch(ActivityResultRegistry.kt:143) at androidx.activity.result.ActivityResultLauncher.launch(ActivityResultLauncher.java:47)

Desktop

No response

Smartphone

Failing devices:

  • Google Pixel 6, Android 13, Coinbase Wallet App 28.60.0
  • Samsung Galaxy A52s 5G - Android 13, One UI 5.1 - Coinbase Wallet App 28.60.0

Devices without any issue:*
Google Pixel 6 - Android 13 - Coinbase 28.60.0
Google Pixel 3 - Android 12 - Coinbase 28.59.0 (28.60.0)
Samsung A3 - Android 8 - Coinbase 28.60.0

Bug: MMKV Module could not be found

Describe the bug

The react-native-mmkv native module is not being installed with auto-linking on Bare RN Project

Steps

  1. Follow the steps described here
  2. Add this to your project const cbProvider = new WalletMobileSDKEVMProvider();
  3. Run the project on any Device (iOS or Android)
  4. Get the following error:
    Screenshot_20230307_161906_Bitrefill

I'm running on RN 0.71.3. And I do not use MMKV on my project.

Two side notes.

  1. The github version of the code is not published on npm so the WalletMobileSDKEVMProvider is not exported on @coinbase/wallet-mobile-sdk(need to import it from its file.
  2. This part of the build.gradle file can be problematic if the project runs versions below 1.6.20
ext.getKotlinVersion = {
    if (ext.has("kotlinVersion")) {
      ext.kotlinVersion()
    } else {
      ext.safeExtGet("kotlinVersion", "1.6.10")
    }
  }

Thanks!

Expected behavior

The project should run as per docs

Version

1.0.4

Additional info

No response

Desktop

No response

Smartphone

No response

> I have a project using spring boot 3 and java 17, I'm trying to download the last version of coinbase wallet sdk:

          > I have a project using spring boot 3 and java 17, I'm trying to download the last version of coinbase wallet sdk:

implementation "com.coinbase:coinbase-wallet-sdk:1.0.4"

I always receive the error

app:test: Could not resolve co

Screenshot_Ϋ²Ϋ°Ϋ²Ϋ΄-Ϋ°Ϋ²-Ϋ°Ϋ΄-Ϋ±ΫΉ-Ϋ΄Ϋ±-Ϋ²Ϋ·-Ϋ³Ϋ±Ϋ΄_org telegram messenger
m.coinbase:coinbase-wallet-sdk:1.0.4.

Required by:
project :

Possible solution:


After various reimports sometime the error does not show up, but if I run `gradlew dependencies` I see the following output `com.coinbase:coinbase-wallet-sdk:1.0.4 FAILED`

I guess is for the java version

Originally posted by @Khorshidgardan in #216 (comment)

Bug: Expo Go is not supported

Describe the bug

Using expo-modules breaks Expo Go support

Steps

  1. yarn create expo-app AwesomeProject
  2. cd AwesomeProject
  3. npx install-expo-modules@latest

Error:

Uncaught Error [Error: ENOENT: no such file or directory, open '/AwesomeProject/android/build.gradle'] {

Expected behavior

I'd like for this new package to work with Expo Go or at least to have a guide on how to make it work with expo prebuild.

Version

1.0.4

Additional info

No response

Desktop

No response

Smartphone

No response

Feature Request: Flutter -- custom request - smart contract interaction

Is your feature request related to a problem? Please describe.

any plan for a exposing a method for custom request?
by passing method name exist or custom custom prams

is theres a way to interact with published smart contracts / diff assets other than the main currency of the network?

Describe the solution you'd like

developing a smart contract can result of having a custom functions that need to be invoked ,
or dealing with an existing smart contract e.g DAI on ethereum network

if that's something we currently can do , is there's a write up i can take a look at?

Describe alternatives you've considered

No response

Additional context

No response

Bug: "message" must be a nonempty string

Describe the bug

"message" must be a nonempty string

Steps

1.build android apk
2.run apk on my phone
3.click button and request "eth_requestAccounts"
4.The coinbase wallet app is opened and a connection message pops up, click connect.
5.Back to my app, catch the error '"message" must be a nonempty string'

Expected behavior

wallet should return address

Version

^1.0.4

Additional info

Strangely enough, I was able to connect the real machine in the android development environment and it worked fine, only to find the error after packaging. So it was very difficult to debug.

The only special thing is that I replaced the mmkv used by the "WalletMobileSDKEVMProvider" with my own implementation of storage, as this dependency was not working properly due to various error reports and version inconsistencies.

image

Desktop

No response

Smartphone

No response

Bug: Android example app does not trigger connection request in Coinbase Wallet

Describe the bug

No message signing request is displayed in Coinbase Wallet

Steps

  1. Execute latest version of example app (commit #159) using Android Studio.
  2. Click "Connect Wallet"
  3. Select "Coinbase Wallet"
  4. Navigates to Coinbase Wallet app

Expected behavior

Show a message signing request to proceed with the handshake

Version

1.0.4 / commit #159

Additional info

The same flow on the example app was working for me before the holidays. Seems like the last update on Coinbase Wallet app was on Dec 25.

I have already tried reinstalling Coinbase Wallet, restarting Pixel, restarting Android Studio.

Desktop

No response

Smartphone

Device: Pixel 6 Pro
OS: Android 13

Bug: Wallet.coinbaseRetail.isInstalled returns false

Describe the bug

Coinbase iOS app is installed, but Wallet.coinbaseRetail.isInstalled still returns false

Steps

  1. Install Coinbase iOS App from the AppStore – https://apps.apple.com/app/id886427730
  2. Add CoinbaseWalletSDK via SPM and configure the package according to the documentation
  3. Add <string>coinbase+mwp</string> to <key>LSApplicationQueriesSchemes</key>
  4. Check Wallet.coinbaseRetail.isInstalled value

Expected behavior

Wallet.coinbaseRetail returns true

Version

1.0.4

Additional info

No response

Desktop

No response

Smartphone

  • Device: iPhone 12 Pro Max
  • iOS: 16.5.1
  • Coinbase iOS app version: 11.29.7

Bug: CoinbaseWalletSDK/CoinbaseWalletSDK.swift:32: Fatal error: `CoinbaseWalletSDK.configure` should be called only once.

Describe the bug

app crashes on second attempt to run configuration

Steps

  1. configure once behave as it supposed to be
  2. on a second configuration return platform fatal error and crash the app

Expected behavior

  • away to check if already configured

Version

1.0.4

Additional info

flutter: <asynchronous suspension>
2
CoinbaseWalletSDK/CoinbaseWalletSDK.swift:32: Fatal error: `CoinbaseWalletSDK.configure` should be called only once.
* thread #1, queue = 'com.apple.main-thread', stop reason = Fatal error: `CoinbaseWalletSDK.configure` should be called only once.
    frame #0: 0x00000001875e00f8 libswiftCore.dylib`_swift_runtime_on_report
libswiftCore.dylib`:
->  0x1875e00f8 <+0>: ret
libswiftCore.dylib`:
    0x1875e00fc <+0>: b      0x1875e00f8               ; _swift_runtime_on_report
libswiftCore.dylib`:
    0x1875e0100 <+0>: adrp   x8, 366305
    0x1875e0104 <+4>: ldrb   w0, [x8, #0xabc]
Target 0: (Runner) stopped.
Lost connection to device.

Bug: eth_watchAsset doesn't work

Describe the bug

I'm trying to make eth_watchAsset method and unfortunately always get an error inside Coinbase Wallet iOS App

Steps

  1. Install last version (now it's 28.55) of Coinbase Wallet iOS App and sign in to account
  2. Install CoinbaseWalletSDK 1.0.4 via SPM
  3. Configure MWPClient
  4. Get an instance of MWPClient calling MWPClient.getInstance(to: Wallet.coinbaseWallet)
  5. Initiate handshake like this:
mwpClient.initiateHandshake(
                    initialActions: [
                        Action(jsonRpc: .eth_requestAccounts)
                    ]
                ) { [weak owner] result, account in
                    switch result {
                        case .success(let response):
                            debugPrint(response.content)
                            
                            guard let account else { return }
                            debugPrint(account)
                            
                        case .failure(let error):
                            debugPrint(error.localizedDescription)
                        }
                }
  1. Make eth_watchAsset for Tether(USDT) request like this:
mwpClient.makeRequest(
                    Request(actions: [
                        Action(
                            jsonRpc: .wallet_watchAsset(
                                type: "ERC20",
                                options: WatchAssetOptions(
                                    address: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
                                    symbol: "USDT",
                                    decimals: 6,
                                    image: "https://etherscan.io/token/images/tethernew_32.png"
                                )
                            )
                        )
                    ])
                ) { result in
                    debugPrint(result)
                    // ...
                }
  1. Dapp redirects to Coinbase Wallet iOS App, then Coinbase Wallet throws an "Something went wrong" error (See Additional Info please)

Expected behavior

Coinbase Wallet doesn't throw an error and I can watch any asset

Version

1.0.4

Additional info

Coinbase Wallet "Something went wrong error"

Also I pressed "Try again" button and nothing happens. When I return to dapp nothing happens in makeRequest completion block, it just doesn't execute.

I've tried with different tokens (top 10 tokens from etherscan.io) and I've tried to send a batch request with a couple of eth_watchAsset actions and it still doesn't work.

And also I've a question: why SDK redirects me to the Coinbase Wallet if I just want to track asset? How can I get a list of assets by my wallet's address?

Desktop

No response

Smartphone

  • Device: Any device (iPhone 12 Pro Max, iPhone 13 Pro, iPhone 14 Pro)
  • Device: Any iOS, for example 16.5.1

Bug: CoinbaseWalletSDK.configure should be called only once on Flutter iOS

Describe the bug

oinbaseWalletSDK.configure` should be called only once., null, null)

Steps

Describe the bug
After reloading the app using the Hot Restart button.

Steps
Run the app once on iOS
Use the Hot Restart button

Expected behavior

The SDK should handle this problem, or expose a variable for us to check if the SDK is already configured.

Version

1.0.6 on flutter

Additional info

Problem is same as this one

#218

Desktop

No response

Smartphone

IOS Iphone 14

Bug: JavaScriptError - The operation couldn’t be completed. (CoinbaseWalletSDK.CoinbaseWalletSDK.Error error 0.)

Describe the bug

We get the error when using the request function

Steps

Using the latest version of the React Native SDK.

Unfortunately, we are seeing this on some production iOS devices, but we were unable to reproduce it. The end user tries to connect to the Coinbase Wallet and immediately gets the error. Two users are from Italy, so I'm not sure if this has something to do with it.

Thanks.

image

Expected behavior

The Coinbase Wallet opens and offers to connect with the app.

Version

1.0.13

Additional info

No response

Desktop

  • iOS only

Smartphone

  • iPhone only

Flutter Bug: optional parameters are required

Describe the bug

optional parameters are required

Steps

most of the exposed function have option and required prams but the optional prams still to be required, which defeats the purpose of having the optionality.

e.g

 SendTransaction SendTransaction({
  required String fromAddress,
  required String? toAddress,
  required BigInt weiValue,
  required String data,
  required int? nonce,
  required BigInt? gasPriceInWei,
  required BigInt? maxFeePerGas,
  required BigInt? maxPriorityFeePerGas,
  required BigInt? gasLimit,
  required String chainId,
})

Expected behavior

optional parameters need to be optional.

 SendTransaction SendTransaction({
  required String fromAddress,
  String? toAddress,
  required BigInt weiValue,
  required String data,
  int? nonce,
  BigInt? gasPriceInWei,
  BigInt? maxFeePerGas,
  BigInt? maxPriorityFeePerGas,
  BigInt? gasLimit,
  required String chainId,
})

Version

1.0.5

Additional info

No response

Desktop

No response

Smartphone

No response

Unreviewed commit on master!

Unreviewed commit(s) COMPARE was merged to master by bangtoven.

Comment with appropriate number of πŸ‘ to approve.


Reviewed requirements satisfied? No
Ancestors reviewed? Yes

Bug: Flutter Android Dapp can not be authenticated

Describe the bug

Android Dapp can not be authenticated

Steps

1: add app link in flutter Android
2: try to connect to Coinbase Wallet

Expected behavior

there shouldn't be Warning text

Version

1.0.6 on flutter

Additional info

code for configuration

await CoinbaseWalletSDK.shared.configure(
        Configuration(
          ios: IOSConfiguration(
            host: Uri.parse('cbwallet://wsegue'),
            callback: Uri.parse(Constants.dynamicLink),
          ),
          android: AndroidConfiguration(
            domain: Uri.parse('https://sendcrypto.com'),
          ),
        ),
      );

I has this warning text and I did research I found I have to add app link in my android app and I did it
I have hosted file on domain.com/.well-known/.....json too

I still have this issue after adding app link in my app

I have tested in Release APK and debug both doesn't work, in hosted file I have provided release Sha256

someone has same issue and the issue was solved after hosting file for ios but in my case I am not seeing warning on IOS it's happening only on Android

https://forums.coinbasecloud.dev/t/this-mobile-dapp-can-not-be-authenticated/1762

Screenshot_2023-09-12-14-57-48-199_org toshi

Desktop

Android

Smartphone

Xiaomi 13 Lite

com.coinbase.android.nativesdk.CoinbaseWalletSDKError$OpenWalletFailed: Could not open wallet

Describe the bug

I am trying to open my Coinbase wallet. I follow offical documentation of coinbase. First create an object for CoinBaseSDK and Passed requirement parameters but i still faced same issue is that " could not open wallet". Here is my Code. Please solve my issue

Steps

Dependency i used in gradle:

implementation "com.coinbase:coinbase-wallet-sdk:1.0.3"

also add a query parameter according to documentation
I passed required parameters including my Applink as a Uri:

lateinit var client : CoinbaseWalletSDK

client = CoinbaseWalletSDK(
           appContext = requireContext(),
           domain = Uri.parse("https://elmonx.page.link"),
            openIntent = { intent -> launcher.launch(intent) }

        )

Initiate the SDK using initiateHandShake of CoinBaseSDK:

    val requestAccount = Web3JsonRPC.RequestAccounts().action()
    val handShakeActions = listOf(requestAccount)


    client.initiateHandshake(
        initialActions = handShakeActions
    ) { result: Result<List<ActionResult>>, account: Account? ->
        result.onSuccess { actionResults: List<ActionResult> ->
            Log.d("CheckResult", "onViewCreated: ")
        }
        result.onFailure { err ->
            Log.d("CheckResult", "onViewCreated:  Fail")
        }
    }

Expected behavior

Please any one have knowledge about that kindly share your answer

Version

1.0.3

Additional info

No response

Desktop

Android OS

Smartphone

All Android Devices

Bug: Latest version on IOS can't be connected

Describe the bug

After updating Coinbase wallet on IOS to latest version it's not showing connect popup

Steps

  1. update Coinbase wallet app on IOS
  2. try to connect

Expected behavior

should show connect screen

Version

1.0.6 on Flutter

Additional info

No response

Desktop

IOS

Smartphone

IOS

Unreviewed commit on master!

Unreviewed commit(s) COMPARE was merged to master by bangtoven.

Comment with appropriate number of πŸ‘ to approve.


Reviewed requirements satisfied? No
Ancestors reviewed? Yes

Bug: dapp crash when back from coinbase wallet app

Describe the bug

dapp crash when back from coinbase wallet app

Steps

  1. CoinbaseWalletSDK.shared.configure
  2. CoinbaseWalletSDK.shared.initiateHandshake
  3. click "allow" to connect dapp
  4. crash when return

Expected behavior

do not crash, like demo

Version

flutter coinbase wallet 1.0.6, android 1.0.4

Additional info

[        ] E/AndroidRuntime( 9952): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=0,  javax.crypto.AEADBadTagException: error:1e000065:Cipher functions:OPENSSL_internal:BAD_DECRYPT
[        ] E/AndroidRuntime( 9952): 	at android.app.ActivityThread.deliverResults(ActivityThread.java:5677)
[        ] E/AndroidRuntime( 9952): 	at android.app.ActivityThread.handleSendResult(ActivityThread.java:5716)
[        ] E/AndroidRuntime( 9952): 	at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:67)
[        ] E/AndroidRuntime( 9952): 	at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
[        ] E/AndroidRuntime( 9952): 	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
[        ] E/AndroidRuntime( 9952): 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
[        ] E/AndroidRuntime( 9952): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2474)
[        ] E/AndroidRuntime( 9952): 	at android.os.Handler.dispatchMessage(Handler.java:106)
[        ] E/AndroidRuntime( 9952): 	at android.os.Looper.loopOnce(Looper.java:240)
[        ] E/AndroidRuntime( 9952): 	at android.os.Looper.loop(Looper.java:351)
[        ] E/AndroidRuntime( 9952): 	at android.app.ActivityThread.main(ActivityThread.java:8416)
[        ] E/AndroidRuntime( 9952): 	at java.lang.reflect.Method.invoke(Native Method)
[        ] E/AndroidRuntime( 9952): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
[        ] E/AndroidRuntime( 9952): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)
[        ] E/AndroidRuntime( 9952): Caused by: javax.crypto.AEADBadTagException: error:1e000065:Cipher functions:OPENSSL_internal:BAD_DECRYPT
[        ] E/AndroidRuntime( 9952): 	at java.lang.reflect.Constructor.newInstance0(Native Method)
[        ] E/AndroidRuntime( 9952): 	at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
[        ] E/AndroidRuntime( 9952): 	at com.android.org.conscrypt.OpenSSLAeadCipher.throwAEADBadTagExceptionIfAvailable(OpenSSLAeadCipher.java:320)
[        ] E/AndroidRuntime( 9952): 	at com.android.org.conscrypt.OpenSSLAeadCipher.doFinalInternal(OpenSSLAeadCipher.java:371)
[        ] E/AndroidRuntime( 9952): 	at com.android.org.conscrypt.OpenSSLCipher.engineDoFinal(OpenSSLCipher.java:374)
[        ] E/AndroidRuntime( 9952): 	at javax.crypto.Cipher.doFinal(Cipher.java:2114)
[        ] E/AndroidRuntime( 9952): 	at com.google.crypto.tink.aead.internal.InsecureNonceAesGcmJce.decrypt(InsecureNonceAesGcmJce.java:142)
[        ] E/AndroidRuntime( 9952): 	at com.google.crypto.tink.subtle.AesGcmJce.decrypt(AesGcmJce.java:63)
[        ] E/AndroidRuntime( 9952): 	at com.coinbase.android.nativesdk.message.Cipher.decrypt(Cipher.kt:16)
[        ] E/AndroidRuntime( 9952): 	at com.coinbase.android.nativesdk.message.response.ResponseSerializer.deserialize(ResponseSerializer.kt:65)
[        ] E/AndroidRuntime( 9952): 	at com.coinbase.android.nativesdk.message.response.ResponseSerializer.deserialize(ResponseSerializer.kt:19)
[        ] E/AndroidRuntime( 9952): 	at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:59)
[        ] E/AndroidRuntime( 9952): 	at kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.decodeSerializableValue(TreeJsonDecoder.kt:51)
[        ] E/AndroidRuntime( 9952): 	at kotlinx.serialization.json.internal.TreeJsonDecoderKt.readJson(TreeJsonDecoder.kt:24)
[        ] E/AndroidRuntime( 9952): 	at kotlinx.serialization.json.Json.decodeFromJsonElement(Json.kt:119)
[        ] E/AndroidRuntime( 9952): 	at com.coinbase.android.nativesdk.message.MessageSerializer.deserialize(Message.kt:60)
[        ] E/AndroidRuntime( 9952): 	at com.coinbase.android.nativesdk.message.MessageSerializer.deserialize(Message.kt:32)
[        ] E/AndroidRuntime( 9952): 	at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:59)
[        ] E/AndroidRuntime( 9952): 	at kotlinx.serialization.json.internal.AbstractJsonTreeDecoder.decodeSerializableValue(TreeJsonDecoder.kt:51)
[        ] E/AndroidRuntime( 9952): 	at kotlinx.serialization.json.internal.TreeJsonDecoderKt.readJson(TreeJsonDecoder.kt:24)
[        ] E/AndroidRuntime( 9952): 	at kotlinx.serialization.json.Json.decodeFromJsonElement(Json.kt:119)
[        ] E/AndroidRuntime( 9952): 	at com.coinbase.android.nativesdk.message.MessageConverter.decodeResponse(MessageConverter.kt:78)
[        ] E/AndroidRuntime( 9952): 	at com.coinbase.android.nativesdk.CoinbaseWalletSDK.handleResponse(CoinbaseWalletSDK.kt:184)
[        ] E/AndroidRuntime( 9952): 	at com.coinbase.flutter.wallet_sdk.CoinbaseWalletSdkFlutterPlugin.onActivityResult(CoinbaseWalletSdkFlutterPlugin.kt:193)
[        ] E/AndroidRuntime( 9952): 	at io.flutter.embedding.engine.FlutterEngineConnectionRegistry$FlutterEngineActivityPluginBinding.onActivityResult(FlutterEngineConnectionRegistry.java:809)
[        ] E/AndroidRuntime( 9952): 	at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.onActivityResult(FlutterEngineConnectionRegistry.java:432)
[        ] E/AndroidRuntime( 9952): 	at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onActivityResult(FlutterActivityAndFragmentDelegate.java:872)
[        ] E/AndroidRuntime( 9952): 	at io.flutter.embedding.android.FlutterFragment.onActivityResult(FlutterFragment.java:1221)
[        ] E/AndroidRuntime( 9952): 	at io.flutter.embedding.android.FlutterFragmentActivity.onActivityResult(FlutterFragmentActivity.java:691)
[        ] E/AndroidRuntime( 9952): 	at android.app.Activity.dispatchActivityResult(Activity.java:8756)
[        ] E/AndroidRuntime( 9952): 	at android.app.ActivityThread.deliverResults(ActivityThread.java:5670)

Desktop

No response

Smartphone

  • Device: OnePlus 11
  • Android: 13

Unreviewed commit on master!

Unreviewed commit(s) COMPARE was merged to master by bangtoven.

Comment with appropriate number of πŸ‘ to approve.


Reviewed requirements satisfied? No
Ancestors reviewed? Yes

Don't require UniversalLinks for ReactNative iOS to communicate back to the mobile app

Is your feature request related to a problem? Please describe.

Other wallets (e.g MetaMask, Rainbow) just redirect back to the app that opened the wallet without requiring to set up UniversalLinks. Setting up UniversalLinks is yet another friction point for developers who want to build mobile apps

Describe the solution you'd like

I'd like for the wallet to redirect back to the app that triggered it without setting up Universal Links

Describe alternatives you've considered

No response

Additional context

No response

Bug: can't build app for Android using Kotlin 1.8.0

Describe the bug

The build phase fails with error The Android extensions ('kotlin-android-extensions') compiler plugin is no longer supported

Steps

  1. Add the SDK to a react-native app
  2. Try to build the app using Kotlin 1.8.0 (kotlinVersion = "1.8.0" in build.gradle)
  3. See the following error:
[RUN_GRADLEW] > Task :coinbase-wallet-mobile-sdk:compileDebugKotlin FAILED
[RUN_GRADLEW] e: The Android extensions ('kotlin-android-extensions') compiler plugin is no longer supported. Please use kotlin parcelize and view binding. More information: https://goo.gle/kotlin-android-extensions-deprecation

  1. Try it with Kotlin 1.7.0, it works!

Expected behavior

It should work also with Kotlin 1.8.0. From the error it seems that Coinbase should move away from kotlin-android-extensions?

Version

1.0.4

Additional info

No response

Desktop

No response

Smartphone

No response

Bug: React Native iOS stuck after calling provider.request

Describe the bug

After accepting connection in the wallet the call to provider.request doesn't resolve

Steps

  1. Create a React Native app for iOS
  2. Setup Universal Links (it was such a pain to set this up, it would be nice if you could add a setup guide in your docs since you only point to the Apple docs but there's so much more to it to make Linking.addEventListener work :( )
  3. Call:
await provider.request({
        method: "eth_requestAccounts",
        params: [],
      })
  1. The wallet app opens up and shows the connection modal
  2. Press Allow
  3. The app re-opens up, the listener is triggered and handleResponse(new URL(url)); is called but the call await provider.request is not resolved

Expected behavior

The app re-opens after pressing on Allow and the call to await provider.request resolves with the connected account

Version

1.0.5

Additional info

No response

Desktop

No response

Smartphone

No response

Bug: Passing hostURL as defined in the coinbase guide makes the wallet freeze

Describe the bug

Wallet freeze when setting the hostURL in iOS

Steps

  1. Set the hostURL to: hostURL: new URL("https://wallet.coinbase.com/wsegue"), as defined here: https://coinbase.github.io/wallet-mobile-sdk/docs/client-sdk/rn-setup#configuration
  2. Call connect
  3. The wallet opens and freezes, can't do anything with the app

More than this bug is the question: if the hostURL is "The Universal Link used by the Mobile SDK to open the wallet application.", why can devs change it if it will break the integration with the wallet? Should it be hidden from devs?

Expected behavior

The wallet should work with the value specified in the documentation

Version

1.0.5

Additional info

No response

Desktop

No response

Smartphone

No response

Bug: SendTransaction does not work with other chain other than ethereum in using android sdk

Describe the bug

When I try to do send transaction by changing the chain to 80001 (Polygon Mumbai), the wallet shows the error as "Something went wrong". I tried it with SwitchChain also. I raised this issue earlier but it was closed saying I need to use SwitchChain action first. I have tried that and it'smention in the description. It doesn't work with that as well.

Steps

  1. Go to ActionsManager in android sdk.
  2. Chain chainId to 80001 in switchEthereumChain and getSendTransaction
  3. Build and run the app and try"Make Request" in the example app
  4. It will show "Something went wrong" in the coinbase wallet app

Expected behavior

The expected behavior is that it shows the prompt to show send a transaction as it does with the Ethereum chain but it does not

Version

No response

Additional info

No response

Desktop

No response

Smartphone

No response

Bug: handleResponse with deeplink crashes the app on iOS

Describe the bug

When using the handleResponse function from @coinbase/wallet-mobile-sdk inside a React Native component with a Linking url listener in a useEffect hook, the app crashes upon opening a deeplink (e.g., app://email?domain=domain&token=very-long-token).

Steps

  1. Create a React Native component with a Linking url listener in a useEffect hook.
  2. Add the handleResponse function from @coinbase/wallet-mobile-sdk as the listener.
  3. Open the app's deeplink (e.g., app://email?domain=domain&token=very-long-token).
  4. Notice that the app crashes.

Expected behavior

The app should not crash when handling the deeplink with the handleResponse function.

Version

1.0.6

Additional info

Screenshot 2023-06-15 at 18 32 40
import { Linking } from 'react-native'
import { handleResponse } from '@coinbase/wallet-mobile-sdk'
import { useEffect } from 'react'

function App() {
  useEffect(() => {
    const sub = Linking.addEventListener('url', ({ url }) => {
      handleResponse(url)
    })
    return () => sub?.remove()
  }, [])

  return <></>
}

const WrapperApp = App

export default WrapperApp

Desktop

No response

Smartphone

No response

Bug: [ReactNative/Android] Calling `eth_requestAccounts` returns a `User rejected the request` error

Describe the bug

Calling eth_requestAccounts returns an automatic User rejected the request

Steps

  1. Create a bare RN app
  2. Follow install steps here: https://coinbase.github.io/wallet-mobile-sdk/docs/client-sdk/rn-install
  3. Follow setup steps here: https://coinbase.github.io/wallet-mobile-sdk/docs/client-sdk/rn-setup
  4. Try to establish a connection: https://coinbase.github.io/wallet-mobile-sdk/docs/client-sdk/rn-establishing-a-connection

Automatically returns User rejected the request error.

I also tested the react-native/client/example in your repo.

Expected behavior

The coinbase wallet app opens and shows the connection dialog

Version

"@coinbase/wallet-mobile-sdk": "^1.0.7",

Additional info

"expo": "^48.0.0",
"react": "18.2.0",
"react-native": "0.71.8",

Everything works as expected on iOS which is using an older version 28.57.10

Desktop

  • Android
  • Coinbase Wallet version: 28.60.0

Smartphone

  • Samsung Galaxy S21 with Android 13

Question: Packaged react native project apk size too large problem

Describe the bug

android apk size too big

Steps

1.react native app using coinbase expo library like:
https://coinbase.github.io/wallet-mobile-sdk/docs/client-sdk/rn-install

2.build android apk
The size of the apk has increased by at least 80m compared to the previous one

Expected behavior

The react native component of coinbase seems to use the expo packaging method, is there some way to reduce the packaging size?

Version

No response

Additional info

No response

Desktop

No response

Smartphone

No response

Bug: SPM configuration issue with ExampleTest.swift

Describe the bug

I'm getting 'CoinbaseWalletSDK' is only available in iOS 13.0 or newer error in ExampleTest

Steps

I just added the swift package to Test App with the target set to 15.5. and I'm getting that error in ExampleTest file. Maybe it is related to the package setting where I can see platforms: [.iOS(.v12)]

Expected behavior

I'm expecting just build the app with the library.

Version

1.0.3

Additional info

No response

Desktop

No response

Smartphone

No response

Bug: React Native Example App iOS Fails to build

Describe the bug

Trying to build the iOS example app in react-native failes

Steps

yarn install
cd ./react-native
yarn install
cd ./example
yarn install
cd ./ios
pod install
cd ..
yarn ios

Build fails with:

Node found at: /Users/farukparhat/.nvm/versions/node/v16.13.2/bin/node


2022-09-11 23:34:25.725 xcodebuild[28404:427100] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-09-11 23:34:25.725 xcodebuild[28404:427100] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **


The following build commands failed:
        CompileSwift normal arm64 /Users/farukparhat/Workspace/dynamic/sandbox/wallet-mobile-sdk/react-native/example/node_modules/@coinbase/wallet-mobile-sdk/ios/CoinbaseWalletSDKModule.swift (in target 'CoinbaseWalletSDKExpo' from project 'Pods')
        CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'CoinbaseWalletSDKExpo' from project 'Pods')
(2 failures)

Using node16

Expected behavior

  • iOS build should pass and run on simulator.
  • Trying to build on xCode result sin the below error when using xCode 14
    image

Version

No response

Additional info

No response

Desktop

No response

Smartphone

No response

Bug: Cancelling the connection flow in React Native Android crashes the app

Describe the bug

Crash when cancelling the connection

Steps

  1. Try to connect to the coinbase wallet from a React Native Android app
  2. Instead of selecting Allow, select Cancel
  3. The RN app crashes.

It seems the sdk is trying to look for the app in the Google Play Store?

SemWifiTransportLayerUtils: getApplicationCategory - IOException com.test15
03-28 23:16:13.891  1441  3294 W System.err: java.io.FileNotFoundException: https://play.google.com/store/apps/details?id=com.test15&hl=en
03-28 23:16:14.003 22497 22497 F DEBUG   : Cmdline: com.test15
03-28 23:16:14.003 22497 22497 F DEBUG   : pid: 22037, tid: 22120, name: mqt_js  >>> com.test15 <<<

Expected behavior

I should be able to cancel the connection without having to publish my app to the app store first

Version

1.0.5

Additional info

No response

Desktop

No response

Smartphone

No response

Bug: requesting `eth_sendTransaction` failed with `4200: Unable to complete action`

Describe the bug

I'm using SampleClient to initiate a transaction. After confirming the request in the Coinbase Wallet app and redirecting back to SampleClient, the log shows that the action has failed with error 4200: Unable to complete action.

Steps

  1. Select Coinbase Wallet in the SampleClient app.
  2. Click Initiate handshake and confirm in Coinbase Wallet.
  3. Click Make request and confirm in Coinbase Wallet.

I've made the following changes to makeRequest to send an eth_sendTransaction request:

mwpClient.makeRequest(
-  Request(actions: [
-    Action(jsonRpc: .personal_sign(address: address, message: "message")),
-    Action(jsonRpc: .eth_signTypedData_v3(
-      address: address,
-      typedDataJson: JSONString(encode: typedData)!
-    ))
-  ])
+  Request(actions: [
+    Action(jsonRpc: .eth_sendTransaction(
+      fromAddress: address,
+      toAddress: "0x000000000000000000000000000000000000dEaD",
+      weiValue: "10000000000000",
+      data: "0x",
+      nonce: 1,
+      gasPriceInWei: "30000000000",
+      maxFeePerGas: "60000000000",
+      maxPriorityFeePerGas: "2500000000",
+      gasLimit: "1000",
+      chainId: "1"
+    ))
+  ])
) { result in

Expected behavior

Successfully sent transaction

Version

1.0.4

Additional info

No response

Desktop

No response

Smartphone

  • iOS 16.6
  • Coinbase Wallet 28.44.0

Bug: error: `CoinbaseWalletSDK.configure` should be called only once on iOS

Describe the bug

After reloading the app using the React Native Developer Menu, the app freezes or crashes with the mentioned error.

Steps

  1. Run the app once on iOS
  2. Use the React Native developer menu and press Reload
  3. If you are using XCode, the app freezes here:

image

4. If not, the app crashes

Here's a repo, if you need, but just the basic usage should cause this.
https://github.com/felipecamposfabel/coinbase

Expected behavior

The SDK should handle this problem, or expose a variable for us to check if the SDK is already configured.

Version

No response

Additional info

No response

Desktop

No response

Smartphone

No response

Bug: Can't enumerate over MWPError as the struct is not public

Describe the bug

We can't access MWPError as it's not public

Steps

Using the following code it's impossible to parse over the different type of MWPErrors to show different error messages to the user.

     MWPClient.getInstance(to: .coinbaseWallet)?.initiateHandshake(initialActions: [
                Action(jsonRpc: .personal_sign(address: "", message: "Please sign this message to verify your wallet"))
        ], onResponse: { [weak self] result, account in
            switch result {
            case .success(let response):
                // success

            case .failure(let error):
                switch error {
                case CoinbaseWalletSDK.MWPError.walletReturnedError(let returnedError):
                    switch returnedError {
                    case "User denied request":
                        // show specific error message to user

                    default:
                        // handle failure
                    }

                default:
                    // handle failure
                }
            }
        })

Expected behavior

Ideally we have public access to MWPError so that we can smartly parse the errors and show specific error messages depending on the specific issue.

Version

1.0.3

Additional info

No response

Desktop

  • OS: iOS 17

Smartphone

No response

Bug: React Native sendTransaction something went wrong error

Describe the bug

When using sendTransaction for networks such as Polygon Mumbai, something went wrong error occurs

Steps

Use new react native project.
Follow the guide.
Everything works as expected such as request accounts, switch chains.
Proceed to use sendTransaction / signTransaction on Polygon Mumbai / Polygon network.

Get message in Coinbase Wallet app -> something went wrong... sign out etc.

Below is how the request is being made for eth_sendTransaction

const result = await provider.request({ method: 'eth_sendTransaction', params: [{ from: 'my polygon address', to: 'my polygon address', value: '50000', }], });

For value I have used hex value and integer as well with no changes.

What I do before running this request is successfully switch the polygon network on the app via request. I then proceed to do the above request.

Expected behavior

A message should appear to sign or send Transaction in the Coinbase app.

Version

1.0.7

Additional info

No response

Desktop

No response

Smartphone

Testing on physical device iPhone 16.5.1c.

Bug: 'SymmetricKey' is only available in iOS 13.0 or newer

Describe the bug

'SymmetricKey' is only available in iOS 13.0 or newer

Steps

Just buid the porject depended on swift-web3model.

Expected behavior

Build success

Version

1.1.0

Additional info

Please update the Package.switf and modify the row describing platform.
platforms: [.iOS(.v12)], -> platforms: [.iOS(.v13)],

Desktop

iOS

Smartphone

No response

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.