delete default offer
This commit is contained in:
parent
e3793e905c
commit
4b87a13632
1 changed files with 5 additions and 0 deletions
|
|
@ -199,6 +199,11 @@ export class OfferManager {
|
||||||
if (!userOffer) {
|
if (!userOffer) {
|
||||||
return this.HandleDefaultUserOffer(offerReq, appId, remote)
|
return this.HandleDefaultUserOffer(offerReq, appId, remote)
|
||||||
}
|
}
|
||||||
|
if (userOffer.app_user_id === userOffer.offer_id) {
|
||||||
|
this.logger("default user offer has db entry, deleting")
|
||||||
|
await this.storage.offerStorage.DeleteUserOffer(userOffer.app_user_id, userOffer.offer_id)
|
||||||
|
return this.HandleDefaultUserOffer(offerReq, appId, remote)
|
||||||
|
}
|
||||||
let amt = userOffer.price_sats
|
let amt = userOffer.price_sats
|
||||||
if (userOffer.price_sats === 0) {
|
if (userOffer.price_sats === 0) {
|
||||||
if (!amount || isNaN(amount) || amount < 10 || amount > remote) {
|
if (!amount || isNaN(amount) || amount < 10 || amount > remote) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue