mirror of
https://github.com/haveno-dex/haveno-ts.git
synced 2025-07-22 14:30:51 -04:00
observe deposit txs before recording context after offer taken
This commit is contained in:
parent
6bd9f29063
commit
2f581d87b2
3 changed files with 15 additions and 11 deletions
6
dist/HavenoClient.js
vendored
6
dist/HavenoClient.js
vendored
|
@ -1037,8 +1037,10 @@ class HavenoClient {
|
|||
.setPaymentAccountId(paymentAccountId);
|
||||
if (amount)
|
||||
request.setAmount(amount.toString());
|
||||
HavenoUtils_1.default.log(0, "Taking offer with taker amount: " + amount);
|
||||
return (await this._tradesClient.takeOffer(request, { password: this._password })).getTrade();
|
||||
const resp = await this._tradesClient.takeOffer(request, { password: this._password });
|
||||
if (resp.getTrade())
|
||||
return resp.getTrade();
|
||||
throw new HavenoError_1.default(resp.getFailureReason()?.getDescription(), resp.getFailureReason()?.getAvailabilityResult());
|
||||
}
|
||||
catch (e) {
|
||||
throw new HavenoError_1.default(e.message, e.code);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue