From 367527ce9c4a739d379bb677e5f2e5a17a0a751c Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 22 Jan 2022 15:00:12 +0100 Subject: [PATCH] Allow stake-amount when forcebuying --- src/components/ftbot/ForceBuyForm.vue | 22 ++++++++++++++++++++++ src/types/types.ts | 1 + 2 files changed, 23 insertions(+) diff --git a/src/components/ftbot/ForceBuyForm.vue b/src/components/ftbot/ForceBuyForm.vue index 5187992a..be32ad63 100644 --- a/src/components/ftbot/ForceBuyForm.vue +++ b/src/components/ftbot/ForceBuyForm.vue @@ -30,6 +30,20 @@ @keydown.enter.native="handleBuy" > + + + Promise; @@ -103,6 +121,7 @@ export default class ForceBuyForm extends Vue { console.log('resetForm'); this.pair = ''; this.price = null; + this.stakeAmount = null; if (this.botApiVersion > 1.1) { this.ordertype = this.botState?.order_types?.forcebuy || this.botState?.order_types?.buy; } @@ -121,6 +140,9 @@ export default class ForceBuyForm extends Vue { if (this.ordertype) { payload.ordertype = this.ordertype; } + if (this.stakeAmount) { + payload.stakeamount = this.stakeAmount; + } this.forcebuy(payload); this.$nextTick(() => { this.$bvModal.hide('forcebuy-modal'); diff --git a/src/types/types.ts b/src/types/types.ts index f3a6b271..22ab820b 100644 --- a/src/types/types.ts +++ b/src/types/types.ts @@ -2,6 +2,7 @@ export interface ForcebuyPayload { pair: string; price?: number; ordertype?: string; + stakeamount?: number; } export interface ForceSellPayload {