0

I built a webapp working nicely. I have a safe wallet, and I'm able to deposit on my app.

But strangely, when my safe address don't have matic, the Safe application is not triggered when I want to deposit. However signing don't spend matic.

I tried 4/5 times to remove all matic, then getting back some matic on the address. It works when there is matic. The safe don't show transaction when there is no matic.

More exactly, I receive this error:

this.web3.eth
        .sendTransaction({
          from: this.user,
          to: contractAddress,
          data: calldata,
          value,
          gas,
          maxPriorityFeePerGas: null,
          maxFeePerGas: null,
        })

enter image description here

And if I explicitly send the transaction with '0' gas, I would have:

this.web3.eth
        .sendTransaction({
          from: this.user,
          to: contractAddress,
          data: calldata,
          value,
          gas: '0',
          gasPrice,
        })

enter image description here

I have the same result if I use Rabby Wallet in fornt of Safe. Is it expected, and why ? How to solve the problem when the user don't have any Matic or ETH in its wallet ?

1 Answer 1

0

According to your pictures, you are not signing a message, you are attempting to send a real transaction. Signing messages is free, sending transactions is not.

Safe accumulates off-chain confirmation signatures (signed messages) via their own infrastructure. So you would probably first need to craft your signed message and then call some Safe API somewhere to send your signed message to.

2
  • There are other very different competitors (FireBlocks, Metamask institutional...), it's not reasonable to make a complex code for each evolving technology. Safe is supposed to work seamlessly, and I mainly want to "help" him, not rewrite the whole piece for each technology. Commented Sep 26, 2023 at 11:34
  • Well if you want to use Safe off-chain signatures, you (almost) have to use their APIs. Sure, you can distribute the signatures by email if you wish, but combining them and doing all the work by yourself will be difficult. The last one to sign the approval is typically the one who sends a real transaction Commented Sep 26, 2023 at 11:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.