From 7616c4988066f6aad5ab2cb92e7e9a809a8ccf18 Mon Sep 17 00:00:00 2001 From: martonp Date: Mon, 21 Oct 2024 18:10:10 +0200 Subject: [PATCH] Update UI --- client/mm/exchange_adaptor_test.go | 8 +- client/webserver/locales/en-us.go | 6 ++ .../webserver/site/src/html/mmsettings.tmpl | 28 +++++++ client/webserver/site/src/js/mm.ts | 30 ++++++-- client/webserver/site/src/js/mmsettings.ts | 73 +++++++++++++++++-- client/webserver/site/src/js/registry.ts | 4 + 6 files changed, 133 insertions(+), 16 deletions(-) diff --git a/client/mm/exchange_adaptor_test.go b/client/mm/exchange_adaptor_test.go index 9f892e8bfe..0ec2eb76cc 100644 --- a/client/mm/exchange_adaptor_test.go +++ b/client/mm/exchange_adaptor_test.go @@ -1203,7 +1203,7 @@ func testFeeAssetTopUp(t *testing.T, baseID, quoteID uint32) { fiatRates := map[uint32]float64{baseID: 1, quoteID: 1} u.fiatRates.Store(fiatRates) - u.buyFees = &orderFees{ + u.buyFees = &OrderFees{ LotFeeRange: &LotFeeRange{ Max: maxBuyFees, Estimated: &LotFees{ @@ -1212,9 +1212,9 @@ func testFeeAssetTopUp(t *testing.T, baseID, quoteID uint32) { Refund: buyRefundFees, }, }, - bookingFeesPerLot: buyBookingFees, + BookingFeesPerLot: buyBookingFees, } - u.sellFees = &orderFees{ + u.sellFees = &OrderFees{ LotFeeRange: &LotFeeRange{ Max: maxSellFees, Estimated: &LotFees{ @@ -1222,7 +1222,7 @@ func testFeeAssetTopUp(t *testing.T, baseID, quoteID uint32) { Redeem: sellRedeemFees, }, }, - bookingFeesPerLot: sellBookingFees, + BookingFeesPerLot: sellBookingFees, } setFeeBal := func(base bool, amt int64) { diff --git a/client/webserver/locales/en-us.go b/client/webserver/locales/en-us.go index 2db4ce7c0a..372795ae6b 100644 --- a/client/webserver/locales/en-us.go +++ b/client/webserver/locales/en-us.go @@ -678,4 +678,10 @@ var EnUS = map[string]*intl.Translation{ "Priority": {T: "Priority"}, "Wallet Balances": {T: "Wallet Balances"}, "Placements": {T: "Placements"}, + "Top up fee reserves": {T: "Top up fee reserves"}, + "top_up_fee_reserves_tooltip": {T: "When enabled, if the bot's fee reserves run too low, it will be allocated additional available funds from the wallet to be able to cover all configured placements. This is only applicable when the fee asset is neither the base nor quote asset."}, + "Allow external transfers": {T: "Allow external transfers"}, + "external_transfers_tooltip": {T: "When enabled, the bot will be able to transfer funds between the DEX and the CEX."}, + "Internal transfers only": {T: "Internal transfers only"}, + "internal_only_tooltip": {T: "When enabled, the bot will be able to use any available funds in the wallet to simulate a transfer between the DEX and the CEX, (i.e. increase the bot's DEX balance and decrease the bot's CEX balance when a withdrawal needs to be made) but no actual transfers will be made."}, } diff --git a/client/webserver/site/src/html/mmsettings.tmpl b/client/webserver/site/src/html/mmsettings.tmpl index 2402fef851..7f18f3797f 100644 --- a/client/webserver/site/src/html/mmsettings.tmpl +++ b/client/webserver/site/src/html/mmsettings.tmpl @@ -659,6 +659,16 @@ Knobs + + {{- /* TOP UP FEE RESERVES */ -}} + + {{- /* CEX REBALANCE CHECKBOX */ -}}