Confirm modal before Earn, Borrow and Amplify

PR #2021 head ae813a98d · preview https://confirm1111.strata-markets-preview.pages.dev (demo account, nothing real is sent).
Pressing Confirm in the review sheet opens this modal. Only Yes sends, once. Cancel (default focus), Escape and an overlay click go back to the sheet with nothing sent. Yes ignores presses for 500ms after the modal opens, so a double tap on Confirm cannot send.
Checked per action and size: double tap on Confirm sends nothing, Cancel / Escape / overlay / Enter all cancel, focus returns to Confirm, double click on Yes sends exactly one (Activity 3 to 4), no console errors, no sideways scroll.

Desktop 1440

Earn all checks pass

Modal: Put 100 sACME into Earn · You get 9,975 fACME earn position · Button Yes, earn
Risk: The rate is not fixed. It comes from what amplified holders pay, so it falls if fewer people amplify.
This is a simulation on the demo account. Nothing is sent.

1. Review sheet
2. Confirm pressed: modal, nothing sent
3. Cancel: back to the sheet, nothing sent
4. Yes (demo account, simulated): receipt
checks
{
 "shot": "d1440-earn",
 "errors": [],
 "dbl_confirm_modal_open": true,
 "dbl_confirm_no_receipt": true,
 "title": "Put 100 sACME into Earn",
 "get": "9,975 fACME earn position",
 "risk": "The rate is not fixed. It comes from what amplified holders pay, so it falls if fewer people amplify.",
 "sends": "This is a simulation on the demo account. Nothing is sent.",
 "yes": "Yes, earn",
 "focus_on_cancel": true,
 "overflow": 0,
 "modal_box": [
  500,
  286,
  440,
  328
 ],
 "cancel_modal_gone": true,
 "cancel_sheet_open": true,
 "cancel_no_receipt": true,
 "esc_modal_gone": true,
 "esc_sheet_open": true,
 "overlay_modal_gone": true,
 "overlay_sheet_open": true,
 "no_receipt_end": true,
 "focus_back_on_confirm": true,
 "kbd_modal_open": true,
 "kbd_enter_cancels": true,
 "demo_simulated_entries": 4
}

Amplify all checks pass

Modal: Amplify 100 sACME · You get 9,800 xACME amplified position · Button Yes, amplify
Risk: If the share price falls to $60, this position is worth nothing.
This is a simulation on the demo account. Nothing is sent.

1. Review sheet
2. Confirm pressed: modal, nothing sent
3. Cancel: back to the sheet, nothing sent
4. Yes (demo account, simulated): receipt
checks
{
 "shot": "d1440-amplify",
 "errors": [],
 "dbl_confirm_modal_open": true,
 "dbl_confirm_no_receipt": true,
 "title": "Amplify 100 sACME",
 "get": "9,800 xACME amplified position",
 "risk": "If the share price falls to $60, this position is worth nothing.",
 "sends": "This is a simulation on the demo account. Nothing is sent.",
 "yes": "Yes, amplify",
 "focus_on_cancel": true,
 "overflow": 0,
 "modal_box": [
  500,
  296,
  440,
  309
 ],
 "cancel_modal_gone": true,
 "cancel_sheet_open": true,
 "cancel_no_receipt": true,
 "esc_modal_gone": true,
 "esc_sheet_open": true,
 "overlay_modal_gone": true,
 "overlay_sheet_open": true,
 "no_receipt_end": true,
 "focus_back_on_confirm": true,
 "kbd_modal_open": true,
 "kbd_enter_cancels": true,
 "demo_simulated_entries": 4
}

Borrow all checks pass

Modal: Pledge 200 sACME and borrow $3,400 Test USDC · You get $3,400 Test USDC · Button Yes, borrow
Risk: If the share price falls to $50.00 (50% lower), your pledged sACME can be sold to repay the loan.
This is a simulation on the demo account. Nothing is sent.

1. Review sheet
2. Confirm pressed: modal, nothing sent
3. Cancel: back to the sheet, nothing sent
4. Yes (demo account, simulated): receipt
checks
{
 "shot": "d1440-borrow",
 "errors": [],
 "dbl_confirm_modal_open": true,
 "dbl_confirm_no_receipt": true,
 "title": "Pledge 200 sACME and borrow $3,400 Test USDC",
 "get": "$3,400 Test USDC",
 "risk": "If the share price falls to $50.00 (50% lower), your pledged sACME can be sold to repay the loan.",
 "sends": "This is a simulation on the demo account. Nothing is sent.",
 "yes": "Yes, borrow",
 "focus_on_cancel": true,
 "overflow": 0,
 "modal_box": [
  500,
  272,
  440,
  356
 ],
 "cancel_modal_gone": true,
 "cancel_sheet_open": true,
 "cancel_no_receipt": true,
 "esc_modal_gone": true,
 "esc_sheet_open": true,
 "overlay_modal_gone": true,
 "overlay_sheet_open": true,
 "no_receipt_end": true,
 "focus_back_on_confirm": true,
 "kbd_modal_open": true,
 "kbd_enter_cancels": true,
 "demo_simulated_entries": 4
}

Mobile 390

Earn all checks pass

Modal: Put 100 sACME into Earn · You get 9,975 fACME earn position · Button Yes, earn
Risk: The rate is not fixed. It comes from what amplified holders pay, so it falls if fewer people amplify.
This is a simulation on the demo account. Nothing is sent.

1. Review sheet
2. Confirm pressed: modal, nothing sent
3. Cancel: back to the sheet, nothing sent
checks
{
 "shot": "m390-earn",
 "errors": [],
 "dbl_confirm_modal_open": true,
 "dbl_confirm_no_receipt": true,
 "title": "Put 100 sACME into Earn",
 "get": "9,975 fACME earn position",
 "risk": "The rate is not fixed. It comes from what amplified holders pay, so it falls if fewer people amplify.",
 "sends": "This is a simulation on the demo account. Nothing is sent.",
 "yes": "Yes, earn",
 "focus_on_cancel": true,
 "overflow": 0,
 "modal_box": [
  0,
  520,
  390,
  324
 ],
 "cancel_modal_gone": true,
 "cancel_sheet_open": true,
 "cancel_no_receipt": true,
 "esc_modal_gone": true,
 "esc_sheet_open": true,
 "overlay_modal_gone": true,
 "overlay_sheet_open": true,
 "no_receipt_end": true,
 "focus_back_on_confirm": true,
 "kbd_modal_open": true,
 "kbd_enter_cancels": true,
 "m390_simulated_entries": 3
}

Amplify all checks pass

Modal: Amplify 100 sACME · You get 9,800 xACME amplified position · Button Yes, amplify
Risk: If the share price falls to $60, this position is worth nothing.
This is a simulation on the demo account. Nothing is sent.

1. Review sheet
2. Confirm pressed: modal, nothing sent
3. Cancel: back to the sheet, nothing sent
checks
{
 "shot": "m390-amplify",
 "errors": [],
 "dbl_confirm_modal_open": true,
 "dbl_confirm_no_receipt": true,
 "title": "Amplify 100 sACME",
 "get": "9,800 xACME amplified position",
 "risk": "If the share price falls to $60, this position is worth nothing.",
 "sends": "This is a simulation on the demo account. Nothing is sent.",
 "yes": "Yes, amplify",
 "focus_on_cancel": true,
 "overflow": 0,
 "modal_box": [
  0,
  520,
  390,
  324
 ],
 "cancel_modal_gone": true,
 "cancel_sheet_open": true,
 "cancel_no_receipt": true,
 "esc_modal_gone": true,
 "esc_sheet_open": true,
 "overlay_modal_gone": true,
 "overlay_sheet_open": true,
 "no_receipt_end": true,
 "focus_back_on_confirm": true,
 "kbd_modal_open": true,
 "kbd_enter_cancels": true,
 "m390_simulated_entries": 3
}

Borrow all checks pass

Modal: Pledge 200 sACME and borrow $3,400 Test USDC · You get $3,400 Test USDC · Button Yes, borrow
Risk: If the share price falls to $50.00 (50% lower), your pledged sACME can be sold to repay the loan.
This is a simulation on the demo account. Nothing is sent.

1. Review sheet
2. Confirm pressed: modal, nothing sent
3. Cancel: back to the sheet, nothing sent
checks
{
 "shot": "m390-borrow",
 "errors": [],
 "dbl_confirm_modal_open": true,
 "dbl_confirm_no_receipt": true,
 "title": "Pledge 200 sACME and borrow $3,400 Test USDC",
 "get": "$3,400 Test USDC",
 "risk": "If the share price falls to $50.00 (50% lower), your pledged sACME can be sold to repay the loan.",
 "sends": "This is a simulation on the demo account. Nothing is sent.",
 "yes": "Yes, borrow",
 "focus_on_cancel": true,
 "overflow": 0,
 "modal_box": [
  0,
  492,
  390,
  352
 ],
 "cancel_modal_gone": true,
 "cancel_sheet_open": true,
 "cancel_no_receipt": true,
 "esc_modal_gone": true,
 "esc_sheet_open": true,
 "overlay_modal_gone": true,
 "overlay_sheet_open": true,
 "no_receipt_end": true,
 "focus_back_on_confirm": true,
 "kbd_modal_open": true,
 "kbd_enter_cancels": true,
 "m390_simulated_entries": 3
}