coinbase / coinbase/onchainkit

Bug: Intermittent errors using TransactionButton with CB Browser Wallet

Open
#1,037 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1k
Forks
520
Avg merge
32m
Merged PRs (30d)
2

Description

I'm seeing intermittent errors when using the `TransactionButton` to initiate a new contract call via Coinbase Browser Wallet at [songbirdz.cc](https://songbirdz.cc/collection). See the 2 screenshots below for the specific errors in my console, but it takes me a few times clicking on the button before I can succesfully get Coinbase Browser Wallet to open up with the new contract call.

You can see the relevant code here: https://github.com/dry-tortuga/songbirdz-collection-frontend/blob/main/src/components/BirdIdentificationModal.js#L135

A contributing factor could be that I need to wait for the result of an async API call before I can fully build the `contracts=[{ ... }]` prop that is passed to `Transaction`, so wondering if that could be causing an issue?

Any better workarounds for this kind of use case?

![Screenshot from 2024-08-12 17-16-09](https://github.com/user-attachments/assets/2c5cb757-498d-4809-9aff-7ab9f3163ad1)

![Screenshot from 2024-08-12 17-15-37](https://github.com/user-attachments/assets/cc1f326f-f633-48bc-8305-8ebc787d67e1)

### What's the expected behavior?

Clicking on the `TransactionButton` should initiate the transaction request in the Coinbase Browser Wallet for final confirmation on the first click attempt.

### What version of the libraries are you using?

- Onchainkit@v0.28.7

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.