diff --git a/signers/signer-evm/src/signer.ts b/signers/signer-evm/src/signer.ts index 2df5cc05f9..a8e4becf64 100644 --- a/signers/signer-evm/src/signer.ts +++ b/signers/signer-evm/src/signer.ts @@ -63,15 +63,19 @@ export class DefaultEvmSigner implements GenericSigner { static buildTx(evmTx: EvmTransaction, disableV2 = false): TransactionRequest { const TO_STRING_BASE = 16; let tx: TransactionRequest = {}; + /* + * it's better to pass 0x instead of undefined, otherwise some wallets could face issue + * https://github.com/WalletConnect/web3modal/issues/1082#issuecomment-1637793242 + */ + tx = { + data: evmTx.data || '0x', + }; if (evmTx.from) { tx = { ...tx, from: evmTx.from }; } if (evmTx.to) { tx = { ...tx, to: evmTx.to }; } - if (evmTx.data) { - tx = { ...tx, data: evmTx.data }; - } if (evmTx.value) { tx = { ...tx, value: evmTx.value }; }