safe-global / safe-wallet-web

Safe{Wallet} – smart account wallet
https://app.safe.global
GNU General Public License v3.0
358 stars 429 forks source link

Disable add to batch for safeApps #4392

Open compojoom opened 1 month ago

compojoom commented 1 month ago

When doing a transaction from a safe App the user is able to sign/execute the tx or "add to batch". When the user signs the tx, we return the txId to the dapp. The Dapp is able to follow on their end what happens with the transaction. That's not the case when a user ads a tx to a batch. If that happens we just close the "transaction sign/execute" flow without retuning any hash to the dapp. The Problem is that we cannot return the hash of the transaction that was added to batch. The safeTX hash we have won't be for the tx that is later going to be executed on chain. The batch execution tx would have a different txId. Because of this I think that it would be good to disable the "add to batch" button for 3rd party dapps.

liliya-soroka commented 3 days ago

Steps:

  1. Open cowswap or tx builder app
  2. create a tx with one action ( wrap in cowswap or send eth/erc20 to another account)
  3. start the tx creation Current result "Add to batch" is available If the tx from the safe app contains a few actions the "add to batch" is disabled