<p><span class="issue-keyword tooltipped tooltipped-se" aria-label="This pull request closes issue #4499.">Fixes</span> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="695314847" data-permission-text="Title is private" data-url="https://github.com/bisq-network/bisq/issues/4499" data-hovercard-type="issue" data-hovercard-url="/bisq-network/bisq/issues/4499/hovercard" href="https://github.com/bisq-network/bisq/issues/4499">#4499</a></p>
<p>When restoring from same seeds and the user had open offers the reserved balance was not updated as the addressEntry list got created newly. It is not the normal use case that a user applies the same seed to a data directory containing open offers but we should handle such cases correctly as well.</p>
<p>We also check now for open offers and enforce that those get removed at restore from seeds.</p>
<p>There have been potential bugs as well in the addressEntryList class which are hopefully eliminated by that PR. Some might have been responsible for out-of-sync addressList with wallet data issues. Those cases are hard to reproduce and mostly happen at rather un-usual situations.</p>
<p>Lots of refactoring as well...</p>
<p>I tested quite a bit but it will require good testing before deployment.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/bisq-network/bisq/pull/4507'>https://github.com/bisq-network/bisq/pull/4507</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Use a hash set instead of a list to avoid duplicates</li>
  <li>- Change entrySet to CopyOnWriteArraySet to avoid potential ConcurrentModificationExceptions</li>
  <li>Refactoring</li>
  <li>Instead of renaming the AddressEntryList to a backup file we keep it</li>
  <li>Improve toString method</li>
  <li>Remove unused method</li>
  <li>Fix bug with wallet restore with same seed and when there was</li>
  <li>Add check for open offers and remove them if present at restore from seed</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4507/files#diff-e318ae50078741f40a134b64f5bb08d7">common/src/main/java/bisq/common/storage/FileUtil.java</a>
    (21)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4507/files#diff-ee8e948b99c04b8a0c68d47af2b7667e">core/src/main/java/bisq/core/btc/model/AddressEntry.java</a>
    (11)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4507/files#diff-d0a6fa46710a2fe6bb6c4855d5064dc1">core/src/main/java/bisq/core/btc/model/AddressEntryList.java</a>
    (176)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4507/files#diff-2aef55dfcdfabcdf98c19ede9971e3bd">core/src/main/java/bisq/core/btc/setup/WalletsSetup.java</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4507/files#diff-175a000b168b07796b0a44c8979b3be3">core/src/main/java/bisq/core/btc/wallet/BtcWalletService.java</a>
    (59)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4507/files#diff-2b16c2ca0e92ce28cd7268b07a143647">core/src/main/resources/i18n/displayStrings.properties</a>
    (2)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4507/files#diff-f0b2622ac24a200abd3b460d4bac1d72">desktop/src/main/java/bisq/desktop/main/SharedPresentation.java</a>
    (87)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4507/files#diff-d8c55dbeb1fd217fc040ef988f1a2b43">desktop/src/main/java/bisq/desktop/main/account/content/seedwords/SeedWordsView.java</a>
    (24)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4507/files#diff-86bd51ba97db6738c0f3b8874992a63f">desktop/src/main/java/bisq/desktop/main/overlays/windows/WalletPasswordWindow.java</a>
    (9)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4507/files#diff-99f9124929ef2a0358af2aa1d2d07a2e">desktop/src/main/java/bisq/desktop/util/GUIUtil.java</a>
    (23)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/bisq-network/bisq/pull/4507.patch'>https://github.com/bisq-network/bisq/pull/4507.patch</a></li>
  <li><a href='https://github.com/bisq-network/bisq/pull/4507.diff'>https://github.com/bisq-network/bisq/pull/4507.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/4507">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNVG73ZHUX4FRWCDMCTSE7ILHANCNFSM4RDB2WCA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNUCPCEMF4FUMMVLZH3SE7ILHA5CNFSM4RDB2WCKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4KMMV3KQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/4507",
"url": "https://github.com/bisq-network/bisq/pull/4507",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>