You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue: When using Safe Wallet, the initial transaction hash returned is a safeTxHash which differs from the final on-chain transaction hash. This is because Safe uses a multi-signature approach where:
The initial safeTxHash is generated when a transaction is proposed
This transaction needs to be confirmed by the required number of owners (based on the threshold)
Only after sufficient confirmations and execution will there be an actual on-chain transaction with a different hash
This creates challenges when tracking transaction status using standard wagmi hooks, as they look for the initial safeTxHash on-chain which doesn't exist.
wagmi doesn't account for safe's safeTxHash
The temporary solution I created is the wagmi-adapter-safe-wallet library.
It provides a wrapper around waitForTransactionReceipt, called waitForTransactionConfirmationReceipt, which checks whether the provided hash is an on-chain transaction hash or a Safe{Wallet} API transaction hash.
Is there a built-in solution for this in Wagmi or Viem, or does it fall outside the scope of these libraries?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
The issue: When using Safe Wallet, the initial transaction hash returned is a
safeTxHashwhich differs from the final on-chain transaction hash. This is because Safe uses a multi-signature approach where:safeTxHashis generated when a transaction is proposedThis creates challenges when tracking transaction status using standard wagmi hooks, as they look for the initial
safeTxHashon-chain which doesn't exist.wagmi doesn't account for safe's safeTxHash
The temporary solution I created is the
wagmi-adapter-safe-walletlibrary.It provides a wrapper around
waitForTransactionReceipt, calledwaitForTransactionConfirmationReceipt, which checks whether the provided hash is an on-chain transaction hash or a Safe{Wallet} API transaction hash.Is there a built-in solution for this in Wagmi or Viem, or does it fall outside the scope of these libraries?
Beta Was this translation helpful? Give feedback.
All reactions