<p></p>
<blockquote>
<p>I just recognized when creating a new offer in the response the enabled state is displayed wrong:</p>
</blockquote>
<p>Some async tasks (fully preparing and publishing a new offer) do not finish in time to be included in the server's response to the CLI.  The <code>OpenOffer.State {AVAILABLE, ... DEACTIVATED)</code> is one bit of information the CLI does not get from the server in the <code>createoffer</code> response because the new <code>OpenOffer</code> instance has not yet been added to the <code>OpenOfferManager</code>.</p>
<p>I didn't want to lie about the true <code>Enabled</code> state in the <code>createoffer</code> response, that's why you see <code>NO</code>.<br>
But as you see,  calling <code>getmyoffer</code> right after <code>createoffer</code> shows the correct <code>Enabled</code> state <code>YES</code>.</p>
<blockquote>
<p>It says NO, but it is visible to the other peer already. When requesting the state of the specific offer it does display the correct value.</p>
</blockquote>
<p>The CLI is session-less, it only knows that at the instance of offer creation, no <code>OpenOffer.STATE</code> is ready to be passed to the CLI.  By the time you become annoyed at seeing <code>Enabled</code>=<code>NO</code>, the <code>OpenOffer</code> has been added to the <code>OpenOfferManager</code> and is published to other peers.  About 1-3 seconds after you successfully call <code>createoffer</code>, the correct <code>Enabled</code> value shows up in your <code>getmyoffer</code> console output.</p>
<p>Not great.  Would you prefer that the CLI block on <code>createoffer</code> until the <code>OpenOfferManager</code> has the new <code>OpenOffer</code> object?  That did not seem like a good idea before now, and still doesn't... what do you think?</p>

<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/5577#issuecomment-880747188">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNVZ36ZCPS3WBQVRYJDTX3W5XANCNFSM467GN7PA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNSH24WQV6DN7PQTLXDTX3W5XA5CNFSM467GN7PKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGR7SFNA.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/5577#issuecomment-880747188",
"url": "https://github.com/bisq-network/bisq/pull/5577#issuecomment-880747188",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>