<p>this is the correct way to do it. the way it is currently done means<br>
that if a component is not declared in a module, guice still finds it<br>
but does not use the singleton lifecycle</p>
<p>binding as singleton in the module is meant to be used for classes that<br>
we don't have the sourcecode for (i.e. jdk classes)</p>
<p>also update guice because the current version has some incompatibilites with our asm lib and outputs internal errors when the wiring fails.</p>
<p>this pr only converts the components that were declared in the desktop module. will convert the others later.</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/3058'>https://github.com/bisq-network/bisq/pull/3058</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>bump guice version and start testing desktop guice setup</li>
  <li>don't fail if there is no shutdown hook.</li>
  <li>use singleton annotation instead of binding as singleton.</li>
  <li>update witness file for new guice version</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3058/files#diff-0">build.gradle</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3058/files#diff-1">core/src/main/java/bisq/core/util/BSFormatter.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3058/files#diff-2">core/src/main/java/bisq/core/util/BsqFormatter.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3058/files#diff-3">desktop/src/main/java/bisq/desktop/DesktopModule.java</a>
    (36)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3058/files#diff-4">desktop/src/main/java/bisq/desktop/Navigation.java</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3058/files#diff-5">desktop/src/main/java/bisq/desktop/common/fxml/FxmlViewLoader.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3058/files#diff-6">desktop/src/main/java/bisq/desktop/common/view/CachingViewLoader.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3058/files#diff-7">desktop/src/main/java/bisq/desktop/common/view/guice/InjectorViewFactory.java</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3058/files#diff-8">desktop/src/main/java/bisq/desktop/main/dao/bonding/BondingViewUtils.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3058/files#diff-9">desktop/src/main/java/bisq/desktop/main/funds/transactions/DisplayedTransactionsFactory.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3058/files#diff-10">desktop/src/main/java/bisq/desktop/main/funds/transactions/TradableRepository.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3058/files#diff-11">desktop/src/main/java/bisq/desktop/main/funds/transactions/TransactionAwareTradableFactory.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3058/files#diff-12">desktop/src/main/java/bisq/desktop/main/funds/transactions/TransactionListItemFactory.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3058/files#diff-13">desktop/src/main/java/bisq/desktop/main/offer/offerbook/OfferBook.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3058/files#diff-14">desktop/src/main/java/bisq/desktop/main/overlays/Overlay.java</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3058/files#diff-15">desktop/src/main/java/bisq/desktop/main/overlays/notifications/NotificationCenter.java</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3058/files#diff-16">desktop/src/main/java/bisq/desktop/main/overlays/windows/TorNetworkSettingsWindow.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3058/files#diff-17">desktop/src/main/java/bisq/desktop/main/presentation/DaoPresentation.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3058/files#diff-18">desktop/src/main/java/bisq/desktop/main/presentation/MarketPricePresentation.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3058/files#diff-19">desktop/src/main/java/bisq/desktop/util/Transitions.java</a>
    (2)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3058/files#diff-20">desktop/src/test/java/bisq/desktop/GuiceSetupTest.java</a>
    (73)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/3058/files#diff-21">gradle/witness/gradle-witness.gradle</a>
    (3)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/bisq-network/bisq/pull/3058.patch'>https://github.com/bisq-network/bisq/pull/3058.patch</a></li>
  <li><a href='https://github.com/bisq-network/bisq/pull/3058.diff'>https://github.com/bisq-network/bisq/pull/3058.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/3058?email_source=notifications&email_token=AJFFTNTYFQHVDKCBLBTQBMLQDGMPVA5CNFSM4IJXZL3KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HDVOSKQ">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNXR6A5KFBCC3722K23QDGMPVANCNFSM4IJXZL3A">mute the thread</a>.<img src="https://github.com/notifications/beacon/AJFFTNV2KQVBBG7B2O7QNKDQDGMPVA5CNFSM4IJXZL3KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HDVOSKQ.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/3058?email_source=notifications\u0026email_token=AJFFTNTYFQHVDKCBLBTQBMLQDGMPVA5CNFSM4IJXZL3KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HDVOSKQ",
"url": "https://github.com/bisq-network/bisq/pull/3058?email_source=notifications\u0026email_token=AJFFTNTYFQHVDKCBLBTQBMLQDGMPVA5CNFSM4IJXZL3KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HDVOSKQ",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>