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
I've been working with the Safe SDKs for the past weeks, and they're pretty great, but there's a feature I think is missing specifically from the SafeApiKit - to be able to easily tell if an arbitrary Safe transaction was replaced (rejected).
I have implemented a solution for this in our project, which is quite simple, and I'd be happy to open a PR that implements that in the SafeApiKit itself.
Proposed solution
Basically, my solution would be:
Add an isTransactionReplaced or similarly named method to apiKit
It takes a safeAddress and either a safeTxHash or a SafeMultisigTransactionResponse | SafeMultisigTransaction
If a safeTxHash was provided, get the full transaction (apiKit.getTransaction(safeTxHash))
After that, query all transactions with the same nonce
If any is already executed, and has a different safeTxHash than what was provided, return true
Else return false
Alternatives
Maybe there's already a way to get this info easily using apiKit, if there is, feel free to close this issue.
The text was updated successfully, but these errors were encountered:
Context / issue
I've been working with the Safe SDKs for the past weeks, and they're pretty great, but there's a feature I think is missing specifically from the SafeApiKit - to be able to easily tell if an arbitrary Safe transaction was replaced (rejected).
I have implemented a solution for this in our project, which is quite simple, and I'd be happy to open a PR that implements that in the SafeApiKit itself.
Proposed solution
Basically, my solution would be:
isTransactionReplaced
or similarly named method to apiKitsafeAddress
and either asafeTxHash
or aSafeMultisigTransactionResponse | SafeMultisigTransaction
safeTxHash
was provided, get the full transaction (apiKit.getTransaction(safeTxHash)
)nonce
safeTxHash
than what was provided, returntrue
false
Alternatives
Maybe there's already a way to get this info easily using apiKit, if there is, feel free to close this issue.
The text was updated successfully, but these errors were encountered: