diff --git a/client/webserver/api.go b/client/webserver/api.go index 4e04159fba..f807228889 100644 --- a/client/webserver/api.go +++ b/client/webserver/api.go @@ -425,24 +425,23 @@ func (s *WebServer) apiPostBond(w http.ResponseWriter, r *http.Request) { } defer zero(pass) - feeBuffer, err := s.bondsFeeBuffer(assetID) // could also put it in postBondForm, with some work on the frontend - if err != nil { - s.writeAPIError(w, err) - return - } - - _, err = s.core.PostBond(&core.PostBondForm{ - Addr: post.Addr, - Cert: []byte(post.Cert), - AppPass: pass, - Bond: post.Bond, - Asset: &assetID, - LockTime: post.LockTime, - FeeBuffer: feeBuffer, + bondForm := &core.PostBondForm{ + Addr: post.Addr, + Cert: []byte(post.Cert), + AppPass: pass, + Bond: post.Bond, + Asset: &assetID, + LockTime: post.LockTime, // Options valid only when creating an account with bond: MaintainTier: post.Maintain, MaxBondedAmt: post.MaxBondedAmt, - }) + } + + if post.FeeBuffer != nil { + bondForm.FeeBuffer = *post.FeeBuffer + } + + _, err = s.core.PostBond(bondForm) if err != nil { s.writeAPIError(w, fmt.Errorf("add bond error: %w", err)) return diff --git a/client/webserver/locales/en-us.go b/client/webserver/locales/en-us.go index 6081996e8b..d5bb493377 100644 --- a/client/webserver/locales/en-us.go +++ b/client/webserver/locales/en-us.go @@ -31,6 +31,7 @@ var EnUS = map[string]string{ "reg_confirm_submit": `When you submit this form, funds will be spent from your wallet to post a fidelity bond, which is redeemable by you in the future.`, "bond_strength": "Bond Strength", "update_bond_options": "Update Bond Options", + "bond_options": "Bond Options", "bond_options_update_success": "Bond Options have been updated successfully", "target_tier": "Target Tier", "target_tier_tooltip": "This is the target account tier you wish to maintain. Set to zero if you wish to disable tier maintenance (do not post new bonds).", @@ -419,4 +420,13 @@ var EnUS = map[string]string{ "market_making_running": "Market making is running", "cannot_manually_trade": "You cannot manually place orders while market making is running", "back": "Back", + "bond_details": "Bond Details", + "current_tier": "Current Tier", + "current_tier_tooltip": "Number of active bonds that have not yet reached the expiry threshold as reported by the DEX server. Increase your target tier to raise your account tier, boost your trading limits, and offset penalties, if any.", + "current_target_tier_tooltip": "This is the target account tier you wish to maintain. If zero, bond maintenance will be disabled and new bonds will not be posted.", + "current_target_tier": "Current Target Tier", + "bond_cost": "Bond Cost", + "bond_cost_tooltip": "Cost of a single bond without fees and bond maintenance fund reservation.", + "bond_reservations": "Bond Reservation", + "bond_reservations_tooltip": "Total funds that will be locked when you post a bond to cover fees and bond maintenance costs.", } diff --git a/client/webserver/site/src/css/forms.scss b/client/webserver/site/src/css/forms.scss index ad4322fe02..8f8411b14c 100644 --- a/client/webserver/site/src/css/forms.scss +++ b/client/webserver/site/src/css/forms.scss @@ -323,8 +323,7 @@ button.form-button { #dexAddrForm, #verifyForm, #appPWForm, -#deleteArchivedRecordsForm, -#updateBondOptionsForm { +#deleteArchivedRecordsForm { width: 325px; } @@ -332,7 +331,8 @@ button.form-button { #vSendForm, #exportSeedAuth, #cancelForm, -#quickConfigForm { +#quickConfigForm, +#bondDetailsForm { width: 375px; } diff --git a/client/webserver/site/src/html/dexsettings.tmpl b/client/webserver/site/src/html/dexsettings.tmpl index 37d329b46d..f3cc526853 100644 --- a/client/webserver/site/src/html/dexsettings.tmpl +++ b/client/webserver/site/src/html/dexsettings.tmpl @@ -17,8 +17,8 @@