<p>Edit 2019-02-08: It has now become apparent that this problem was due to file system corruption and a bug in Electrum. The bug manifests when you create more than one wallet one after the other in a single session. Electrum mistakenly writes the addresses generated from the seed of your first wallet and the seed and xpub from your last wallet to the same wallet file. If you sent money to any of the addresses in the wallet the only way to recover access to those funds is by restoring from the seed of the older wallet you created. More information <a href="https://github.com/spesmilo/electrum/issues/5082" rel="nofollow noreferrer">here</a>.</p>

CC BY-SA 4.0
2018-09-01T10:20:05.380Z
Thank you for your input. It is a mistake from my side, should be 3.2.2. With the same wallet file, I can use on other computer with latest Electrum from electrum.org, it can be decrypted and it shows there is balance left, just cannot be sent due to that error.
Hexcolyte
CC BY-SA 4.0
2018-09-01T10:23:34.763Z
try exporting and importing some other address' private key. does it result in a different address when you import it?
Abdussamad
CC BY-SA 4.0
2018-09-01T10:26:03.733Z
It is different.
Hexcolyte
CC BY-SA 4.0
2018-09-01T10:39:08.207Z
@Hexcolyte the original wallet was created with malware then. Why haven't you checked the browser history like I told you to?
Abdussamad
CC BY-SA 4.0
2018-09-01T10:42:23.947Z
@Hexcolyte wait you are seeing the same master public key when restoring the wallet from seed? have you tried increasing the gap limit? See 1c [here](https://bitcoinelectrum.com/frequently-asked-questions/#why-does-restoring-my-wallet-from-seed-lead-to-a-different-wallet)
Abdussamad
CC BY-SA 4.0
2018-09-01T10:47:06.360Z
Haven't try that, but I do search for my history and it seems like I am downloading from electrum.org
Hexcolyte
CC BY-SA 4.0
2018-09-01T10:51:15.993Z
@Hexcolyte try increasing the gap limit on the restored wallet like i said above.
Abdussamad
CC BY-SA 4.0
2018-09-01T10:54:15.493Z
According to the article you linked, if I adjusted the gap limit before then that might work, but I have never adjusted that before. I have tried to adjust it to 50, and it's still the same.
Hexcolyte
CC BY-SA 4.0
2018-09-01T11:22:20.257Z
@Hexcolyte what color circle icon are you seeing in the bottom right of the electrum window?
Abdussamad
CC BY-SA 4.0
2018-09-01T11:27:43.143Z
It's green, btw I have also tried with version 2.8, but the issue is still not resolved.
Hexcolyte
CC BY-SA 4.0
2018-09-01T11:38:50.700Z
@Hexcolyte don't use older versions. always use the latest version. try increasing the gap limit to 200. if that doesn't do it then it's a malware problem like i said.
Abdussamad
CC BY-SA 4.0
2018-09-01T11:45:49.363Z
Tried increasing it to 250, no luck, still cannot find the address with balance.
Hexcolyte
CC BY-SA 4.0
2018-09-01T15:05:11.440Z
@Hexcolyte are there any matching addresses in the original wallet and the restored wallet? You can view all the addresses by going to view menu > show addresses and switching to the addresses tab. You can search for an address on the addresses tab by pressing ctrl+f and typing in the first few characters of the address.
Abdussamad
CC BY-SA 4.0
2018-09-01T15:07:50.227Z
Tried that, but so far none of the addresses match. They are two different set of addresses.
Hexcolyte
CC BY-SA 4.0
2019-02-06T22:31:13.903Z
@Hexcolyte you should read [this](https://github.com/spesmilo/electrum/issues/5082).
Abdussamad
CC BY-SA 4.0
2019-02-07T05:06:30.043Z
Seems like this is not an individual issue. I still have no clue what might be the cause. Thanks!
Hexcolyte
CC BY-SA 4.0
2018-09-01T10:03:48.643Z
2019-02-09T03:46:53.357Z
2019-02-09T03:46:53.357Z
Abdussamad
<p>The problem is properly that you have a different account number because you said that you are using addresses starts with 1 (standard) so <code>Purpose path</code> is 44 and it's Bitcoins so <code>coin path</code> is correct (0)</p>

<p>You have to check that you are using the same account index while you importing the seed.</p>

<p>On your seed path try to increase account number by one and import your seed until you get your coins.</p>

<pre><code>m/44'/0'/0'/0
m/44'/0'/1'/0
</code></pre>

CC BY-SA 4.0
2018-09-01T07:32:15.083Z
I am not quite understanding about seed path, using Electrum, I can choose BIP35 option which allow me to input the seed path, it gives me m/44'/0'/0' as default, and so I should increment the number by m/44'/0'/1' m/44'/0'/2' m/44'/0'/3' and so on?
Hexcolyte
CC BY-SA 4.0
2018-09-03T00:35:25.530Z
Yes, I think that is the only option if your seed is correct.
Tailer
CC BY-SA 4.0
2018-09-01T07:18:21.897Z
2018-09-01T07:18:21.897Z
Tailer
<p>I am using Electrum 3.2.2, I have the wallet file generated from Electrum and a password to decrypt the file. There is an error whenever I am trying to send Bitcoin out of that wallet, so I decide to create a new wallet with the same seed.</p>

<p>But with the same seed and same Electrum client version, the Bitcoin addresses in both wallets are completely different, and there is no balance in the newly create wallet.</p>

<p>I have tried to directly import the private key instead of seed to a new wallet, but I am getting a different Bitcoin address as well.</p>

<p>In case there is a solution for the error I mentioned before, here is the message I get:</p>

<blockquote>
  <p>error: {'message': 'the transaction was rejected by network
  rules.\n\n16: mandatory-script-verify-flag-failed (Script failed an
  OP_EQUALVERIFY
  operation)\n[010000000299e8fae8016f8a522bae07139c8a25e7aba82f363c3ef67481686f72f796b90d060000006a4730440220474f74cddda1f944b71f73d919ad78752176ca3335ecc5fc081ca531e5a69f9b022079efdc804841f96ccd2e80625d0c88e04ce1c4f2edf720448c0d84b4bf6a25d00121028fe4be5e66fa6ec8701a372d91d94fb5a07e133e4c91c57d1af07678dc29a228fdffffff04bd4f7d392e23482b650cf8824fa147fe0dc286177c5a2d3e1d5c32a33cfb21010000006a473044022023fcd70a5a4ee29c57a63884337ff3a5482537610d43aabf1d87093b19f7dde3022077245d5409e01eb7045e9b436c2a7455de9eed9e03296f9bea5290af85a1a8b90121028fe4be5e66fa6ec8701a372d91d94fb5a07e133e4c91c57d1af07678dc29a228fdffffff02b6040100000000001976a9140bdc1d5780d7c5544fec545a29e306f19115662588aca037a0000000000017a914882dd5029d788855b32e3656c1aa96ba4c3488e787403b0800]',
  'code': 1}</p>
</blockquote>

<p>Edit: I have tried to validate the private key I get from Electrum on bitaddress.org, apparently the private key does not match my previous wallet address, there might be some issue with my old wallet file.</p>

<p>Edit2:</p>

<ul>
<li><p>I have tried to sign message with the address, but failed to verify with the same wallet file under same Electrum client.</p></li>
<li><p>After exporting the seed, and using the seed on a newly created wallet, both the old wallet and new wallet show the same master public key, but with entirely different addresses list.</p></li>
<li>Moving the wallet file to another computer, using the latest Electrum and decrypt the file shows the same old addresses, but the transaction error persist.</li>
</ul>

<p>The issue might be with the wallet file. I was using Electrum 3.1.3 to generate the wallet several months ago. I might have used an infected client to generate the wallet file.</p>

<p>Edit3: Forget to mention that I am using portable version of Electrum all this time, and it seems to be vulnerable to attack. </p>

<p>At the time of me generating the wallet, my computer is only one month old, not a laptop, and the windows os is directly downloaded from Microsoft and is still unactivated. No anti-virus installed, no suspicious programs or files ever downloaded, and has never noticed any weird activity happening in my computer. So, the chance of being infected is very low. </p>

<p>I believe I am using the official portable Electrum from electrum.org, the wallet file might be modified at the time I generate it.</p>

CC BY-SA 4.0
2018-09-01T05:50:23.247Z
It depends, the address you had coins before and the address it shows now, does it start with a 1 or a 3. 1 means legacy and when restoring choose legacy in the derivation path and 3 means segwit, so when restoring, choose segwit in the derivation path
Sam
CC BY-SA 4.0
2018-09-01T06:04:04.193Z
It starts with 1, I chose standard wallet when I am creating a new wallet in Electrum.
Hexcolyte
<private-key><electrum><script><seed><private-key-import>
Same seed from Electrum but generate different Bitcoin addresses
Hexcolyte
# Same seed from Electrum but generate different Bitcoin addresses

(Asked by: username_0 on 2018-09-01)

I am using Electrum 3.2.2, I have the wallet file generated from Electrum and a password to decrypt the file. There is an error whenever I am trying to send Bitcoin out of that wallet, so I decide to create a new wallet with the same seed.

But with the same seed and same Electrum client version, the Bitcoin addresses in both wallets are completely different, and there is no balance in the newly create wallet.

I have tried to directly import the private key instead of seed to a new wallet, but I am getting a different Bitcoin address as well.

In case there is a solution for the error I mentioned before, here is the message I get:

> error: {'message': 'the transaction was rejected by network
> rules.\n\n16: mandatory-script-verify-flag-failed (Script failed an
> OP\_EQUALVERIFY
> operation)\n[010000000299e8fae8016f8a522bae07139c8a25e7aba82f363c3ef67481686f72f796b90d060000006a4730440220474f74cddda1f944b71f73d919ad78752176ca3335ecc5fc081ca531e5a69f9b022079efdc804841f96ccd2e80625d0c88e04ce1c4f2edf720448c0d84b4bf6a25d00121028fe4be5e66fa6ec8701a372d91d94fb5a07e133e4c91c57d1af07678dc29a228fdffffff04bd4f7d392e23482b650cf8824fa147fe0dc286177c5a2d3e1d5c32a33cfb21010000006a473044022023fcd70a5a4ee29c57a63884337ff3a5482537610d43aabf1d87093b19f7dde3022077245d5409e01eb7045e9b436c2a7455de9eed9e03296f9bea5290af85a1a8b90121028fe4be5e66fa6ec8701a372d91d94fb5a07e133e4c91c57d1af07678dc29a228fdffffff02b6040100000000001976a9140bdc1d5780d7c5544fec545a29e306f19115662588aca037a0000000000017a914882dd5029d788855b32e3656c1aa96ba4c3488e787403b0800]',
> 'code': 1}

Edit: I have tried to validate the private key I get from Electrum on bitaddress.org, apparently the private key does not match my previous wallet address, there might be some issue with my old wallet file.

Edit2:

* I have tried to sign message with the address, but failed to verify with the same wallet file under same Electrum client.
* After exporting the seed, and using the seed on a newly created wallet, both the old wallet and new wallet show the same master public key, but with entirely different addresses list.
* Moving the wallet file to another computer, using the latest Electrum and decrypt the file shows the same old addresses, but the transaction error persist.

The issue might be with the wallet file. I was using Electrum 3.1.3 to generate the wallet several months ago. I might have used an infected client to generate the wallet file.

Edit3: Forget to mention that I am using portable version of Electrum all this time, and it seems to be vulnerable to attack.

At the time of me generating the wallet, my computer is only one month old, not a laptop, and the windows os is directly downloaded from Microsoft and is still unactivated. No anti-virus installed, no suspicious programs or files ever downloaded, and has never noticed any weird activity happening in my computer. So, the chance of being infected is very low.

I believe I am using the official portable Electrum from electrum.org, the wallet file might be modified at the time I generate it.

**Tags:** private-key, electrum, script, seed, private-key-import

> **Comments:**
> **username_1**: It depends, the address you had coins before and the address it shows now, does it start with a 1 or a 3. 1 means legacy and when restoring choose legacy in the derivation path and 3 means segwit, so when restoring, choose segwit in the derivation path  
> **username_0**: It starts with 1, I chose standard wallet when I am creating a new wallet in Electrum.  

---

## 2 answers

### Answer by username_2 on 2018-09-01. Score: 0 | Accepted answer

Edit 2019-02-08: It has now become apparent that this problem was due to file system corruption and a bug in Electrum. The bug manifests when you create more than one wallet one after the other in a single session. Electrum mistakenly writes the addresses generated from the seed of your first wallet and the seed and xpub from your last wallet to the same wallet file. If you sent money to any of the addresses in the wallet the only way to recover access to those funds is by restoring from the seed of the older wallet you created. More information [here](https://github.com/spesmilo/electrum/issues/5082).

> **Comments:**
> **username_0**: Thank you for your input. It is a mistake from my side, should be 3.2.2. With the same wallet file, I can use on other computer with latest Electrum from electrum.org, it can be decrypted and it shows there is balance left, just cannot be sent due to that error.  
> **username_2**: try exporting and importing some other address' private key. does it result in a different address when you import it?  
> **username_0**: It is different.  
> **username_2**: @username_0 the original wallet was created with malware then. Why haven't you checked the browser history like I told you to?  
> **username_2**: @username_0 wait you are seeing the same master public key when restoring the wallet from seed? have you tried increasing the gap limit? See 1c [here](https://bitcoinelectrum.com/frequently-asked-questions/#why-does-restoring-my-wallet-from-seed-lead-to-a-different-wallet)  
> **username_0**: Haven't try that, but I do search for my history and it seems like I am downloading from electrum.org  
> **username_2**: @username_0 try increasing the gap limit on the restored wallet like i said above.  
> **username_0**: According to the article you linked, if I adjusted the gap limit before then that might work, but I have never adjusted that before. I have tried to adjust it to 50, and it's still the same.  
> **username_2**: @username_0 what color circle icon are you seeing in the bottom right of the electrum window?  
> **username_0**: It's green, btw I have also tried with version 2.8, but the issue is still not resolved.  
> **username_2**: @username_0 don't use older versions. always use the latest version. try increasing the gap limit to 200. if that doesn't do it then it's a malware problem like i said.  
> **username_0**: Tried increasing it to 250, no luck, still cannot find the address with balance.  
> **username_2**: @username_0 are there any matching addresses in the original wallet and the restored wallet? You can view all the addresses by going to view menu > show addresses and switching to the addresses tab. You can search for an address on the addresses tab by pressing ctrl+f and typing in the first few characters of the address.  
> **username_0**: Tried that, but so far none of the addresses match. They are two different set of addresses.  
> **username_2**: @username_0 you should read [this](https://github.com/spesmilo/electrum/issues/5082).  
> **username_0**: Seems like this is not an individual issue. I still have no clue what might be the cause. Thanks!  

---

### Answer by username_3 on 2018-09-01. Score: 1

The problem is properly that you have a different account number because you said that you are using addresses starts with 1 (standard) so `Purpose path` is 44 and it's Bitcoins so `coin path` is correct (0)

You have to check that you are using the same account index while you importing the seed.

On your seed path try to increase account number by one and import your seed until you get your coins.

```
m/44'/0'/0'/0
m/44'/0'/1'/0

```

> **Comments:**
> **username_0**: I am not quite understanding about seed path, using Electrum, I can choose BIP35 option which allow me to input the seed path, it gives me m/44'/0'/0' as default, and so I should increment the number by m/44'/0'/1' m/44'/0'/2' m/44'/0'/3' and so on?  
> **username_3**: Yes, I think that is the only option if your seed is correct.  

---

