# Error in signature check wallet

**URL:** https://collective.flashbots.net/t/error-in-signature-check-wallet/2646
**Category:** Searchers
**Tags:** question
**Created:** [November 15, 2023, 6:24pm UTC](https://collective.flashbots.net/t/error-in-signature-check-wallet/2646 "2023-11-15T18:24:32Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![cguth](https://collective.flashbots.net/letter_avatar_proxy/v4/letter/c/8e7dd6/32.png) [@cguth](https://collective.flashbots.net/u/cguth)
#### Post date: [November 15, 2023, 6:24pm UTC](https://collective.flashbots.net/t/error-in-signature-check-wallet/2646/1 "2023-11-15T18:24:32Z")

</div>

Hello Flashbots community. Im trying to send my first bundle to flashbots relay. Im getting this error message here when trying to send it.

> error in signature check (my wallet address)

I guess something is wrong with how Ive set up the signature. I would appreciate any help! Here is my code

> async function sendAsyncTransaction() {  
> try {  
> const pending = await provider.getTransactionCount(signer.address, “pending”);
> 
> ```
> const exampleTx = {
> to: "0x0C7172c8c5C000F39E2A11b04c52805aF29d945b",
> value: 1,
> gasLimit: "21000",
> maxFeePerGas: 50000000000,
> nonce: pending,
> type: 2,
> chainId: 1,
> };
> 
> // sign tx
> const txs = await signer.signTransaction(exampleTx);
> 
> // get current block
> const blockNumber = '0x' + (await provider.getBlockNumber() + 1).toString(16);
> 
> const data = {
> jsonrpc: '2.0',
> id: '1',
> method: 'eth_sendBundle',
> params: [{txs, blockNumber}],
> };
> 
> const signature = signer.address + ":" + await signer.signMessage(utils.id(data));
> 
> const config = {
> headers: {
> 'Content-Type': 'application/json',
> 'X-Flashbots-Signature': `${signature}`, // Add your Flashbots signature here
> },
> };
> 
> axios.post('https://relay.flashbots.net', data, config)
> .then((response: { data: any; }) => {
> console.log(response.data);
> })
> .catch((error: any) => {
> console.error(error);
> });
> 
> } catch (error) {
> console.error(error);
> }
> 
> ```
> 
> }

Thanks in advance!

---

<div class="post-metadata">

### Author: ![cguth](https://collective.flashbots.net/letter_avatar_proxy/v4/letter/c/8e7dd6/32.png) [@cguth](https://collective.flashbots.net/u/cguth)
#### Post date: [November 18, 2023, 11:02am UTC](https://collective.flashbots.net/t/error-in-signature-check-wallet/2646/2 "2023-11-18T11:02:06Z")

</div>

Issue solved!

---

<div class="post-metadata">

### Author: ![Fred](https://collective.flashbots.net/user_avatar/collective.flashbots.net/fred/32/1288_2.png) [@Fred](https://collective.flashbots.net/u/Fred)
#### Post date: [November 22, 2023, 9:28pm UTC](https://collective.flashbots.net/t/error-in-signature-check-wallet/2646/3 "2023-11-22T21:28:58Z")

</div>

How did you solve it?🙂

---

<div class="post-metadata">

### Author: ![MEVC](https://collective.flashbots.net/letter_avatar_proxy/v4/letter/m/b38774/32.png) [@MEVC](https://collective.flashbots.net/u/MEVC)
#### Post date: [December 4, 2023, 6:52pm UTC](https://collective.flashbots.net/t/error-in-signature-check-wallet/2646/4 "2023-12-04T18:52:54Z")

</div>

Hi @cguth, would you mind to share how you solved it? I am also having the same issue. Thanks!

---

<div class="post-metadata">

### Author: ![matrix](https://collective.flashbots.net/letter_avatar_proxy/v4/letter/m/dec6dc/32.png) [@matrix](https://collective.flashbots.net/u/matrix)
#### Post date: [December 19, 2023, 5:05pm UTC](https://collective.flashbots.net/t/error-in-signature-check-wallet/2646/5 "2023-12-19T17:05:10Z")

</div>

Hey @cguth, Please share the solution. I have been trying this for a long time. Not getting the fix. Please

Thanks in Advance

---

<div class="post-metadata">

### Author: ![matrix](https://collective.flashbots.net/letter_avatar_proxy/v4/letter/m/dec6dc/32.png) [@matrix](https://collective.flashbots.net/u/matrix)
#### Post date: [December 20, 2023, 6:56am UTC](https://collective.flashbots.net/t/error-in-signature-check-wallet/2646/6 "2023-12-20T06:56:21Z")

</div>

Hey, I got fix for it!!  
Below is my script:

```js
  const api_url = 'https://relay.flashbots.net'
  const hexBlockNumberToSend = '0x' + targetBlock.toString(16);

  const requestData = {
    jsonrpc: '2.0',
    id: 1,
    method: 'eth_sendBundle',
    params: [{
        txs: transactions,
        blockNumber: hexBlockNumberToSend,
      }]
  };
  const provider = new ethers.providers.JsonRpcProvider(RPC_URL);
  const wallet = new ethers.Wallet(PRIVATE_KEY, provider);

  const bodyText = JSON.stringify(requestData);
  const messageSignature = await wallet.signMessage(ethers.utils.id(bodyText));
  const signature = `${wallet.address}:${messageSignature}`;

  try {
    const response = await axios.post(api_url, requestData, {
      headers: {
        'Content-Type': 'application/json',
        'X-Flashbots-Signature': `${signature}`, // Add your Flashbots signature here
          },
    });

```

---

<div class="post-metadata">

### Author: ![aman9723](https://collective.flashbots.net/letter_avatar_proxy/v4/letter/a/ea5d25/32.png) [@aman9723](https://collective.flashbots.net/u/aman9723)
#### Post date: [April 3, 2024, 5:00am UTC](https://collective.flashbots.net/t/error-in-signature-check-wallet/2646/7 "2024-04-03T05:00:11Z")

</div>

Getting incorrect request error. Please help.

```auto
let resolvePromise: (value: SnipeResponse) => void, rejectPromise: (reason?: any) => void
		const promise = new Promise<SnipeResponse>(async (resolve, reject) => {
			resolvePromise = resolve
			rejectPromise = reject
		})
		const builders = ['flashbots', 'f1b.io', 'rsync', 'beaverbuild.org', 'builder0x69', 'Titan', 'EigenPhi', 'boba-builder', 'Gambit Labs', 'payload', 'Loki', 'BuildAI', 'JetBuilder', 'tbuilder', 'penguinbuild', 'bobthebuilder']

		const wallet = new Wallet(buyWalletPrivateKey[0], this.provider)
		const router = new Contract(this.ROUTER_ADDRESS, routerAbi, wallet)
		const txRequest = await router.swapETHForExactTokens.populateTransaction(amountOut, [this.WETH, tokenAddress], wallet.address, Date.now() + 1000 * 60 * 10, ethToCoinBase, {
			value: amountInMax[0] + ethToCoinBase,
			maxPriorityFeePerGas: parseUnits(extraPriorityFee, 'gwei'),
			maxFeePerGas: parseUnits('100', 'gwei'),
		})
		const tx = await wallet.signTransaction(txRequest)

		// send request on event
		this.provider.once('block', async blockNumber => {
			try {
				console.log('New block:', blockNumber)
				const maxBlockNumber = '0x' + (blockNumber + 2).toString(16)

				const requestData = {
					jsonrpc: '2.0',
					id: 1,
					method: 'eth_sendPrivateTransaction',
					params: [
						{
							tx: tx,
							maxBlockNumber: maxBlockNumber,
							preferences: {
								fast: true,
								privacy: {
									hints: ['transaction_hash'],
									builders: builders,
								},
								validity: {
									refund: [{ address: wallet.address, percent: 0 }],
								},
							},
						},
					],
				}

				const bodyText = JSON.stringify(requestData)
				const messageSignature = await wallet.signMessage(id(bodyText))
				const signature = `${wallet.address}:${messageSignature}`

				const response = await axios.post(this.RELAY, requestData, {
					headers: {
						'Content-Type': 'application/json',
						'X-Flashbots-Signature': `${signature}`, // Add your Flashbots signature here
					},
				})
				resolvePromise({ message: 'Transaction sent', data: response.data })
			} catch (error) {
				console.log((error as any).message)
				rejectPromise(error)
			}
		})

		return promise

```
