Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trouble with providing a nonce for a Gnosis Safe transaction #4029

Closed
1 task done
Pasha8914 opened this issue Jun 10, 2024 · 4 comments
Closed
1 task done

trouble with providing a nonce for a Gnosis Safe transaction #4029

Pasha8914 opened this issue Jun 10, 2024 · 4 comments

Comments

@Pasha8914
Copy link

Pasha8914 commented Jun 10, 2024

Check existing issues

Describe the bug

I need to send multiple transactions to Gnosis Safe, but Gnosis Safe does not automatically increment the nonce immediately after signing a transaction. Therefore, I need to provide the nonce manually, but Gnosis Safe ignores this argument.

However, their code specifies that the arguments should be considered: Gnosis Safe code.

Link to Minimal Reproducible Example

code: https://github.com/Pasha8914/wagmi-safe-bug
preview: https://pasha8914.github.io/wagmi-safe-bug

Steps to Reproduce the Issue

  1. Start the demo project from this repository.
  2. Open Safe Global.
  3. Navigate to the Apps section.
  4. Select My Custom Apps.
  5. Paste your local app URL.
  6. Click Send 2 txs.

OR

  1. Open Safe Global.
  2. Navigate to the Apps section.
  3. Select My Custom Apps.
  4. Paste https://pasha8914.github.io/wagmi-safe-bug
  5. Click Send 2 txs.

You will observe that the first and second transactions have the same nonce, although different nonces were provided.

What Wagmi package(s) are you using?

wagmi, @wagmi/connectors, @wagmi/core, create-wagmi

Wagmi Version

wagmi-2.9.10

Viem Version

2.13.7

TypeScript Version

5.2.2

Anything else?

Screen.Recording.2024-06-11.at.00.mp4
@tmm
Copy link
Member

tmm commented Jun 10, 2024

However, their code specifies that the arguments should be considered: Gnosis Safe code.

FYI Wagmi doesn't use @safe-global/protocol-kit so this logic does not apply to Wagmi.

@Pasha8914
Copy link
Author

However, their code specifies that the arguments should be considered: Gnosis Safe code.

FYI Wagmi doesn't use @safe-global/protocol-kit so this logic does not apply to Wagmi.

I am convinced that connectors should work explicitly, with no ifs and no buts. In this case, the behavior is unclear and incorrect.

The Safe Connector was created to interact with the Gnosis Safe Wallet. Currently, the Safe Connector does not fulfill its intended purpose and limits functionality (optional parameters are ignored).

I believe it's time for Wagmi to update the safe connector and use Safe{Core} SDK because Safe Connector references a package that hasn't been updated for 5 months, and it has outdated libraries in its dependencies.

image

Previously, the Gnosis Safe documentation contained information about safe-apps-sdk, but now it is gone (exist only in the Glossary) and the safe-apps-sdk docs link redirects to the repository.

@tmm
Copy link
Member

tmm commented Jun 11, 2024

Let's track in the upstream issue you created. Can reach out to the Safe team to see what they recommend for packages moving forward.

@tmm tmm closed this as not planned Won't fix, can't repro, duplicate, stale Jun 11, 2024
Copy link
Contributor

This issue has been locked since it has been closed for more than 14 days.

If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Wagmi version. If you have any questions or comments you can create a new discussion thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants