Compare commits
2
Commits
45f71cbecf
...
dece6999f0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dece6999f0 | ||
|
|
9d4e7a36a7 |
@@ -163,6 +163,24 @@ export function resolveFirmAssignments(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fallback while the throttled report fetch hasn't produced fund
|
||||||
|
// transactions yet: an account that has never traded still sits at
|
||||||
|
// exactly its opening balance, and balances arrive with the first
|
||||||
|
// sync. Only a cent-exact match counts — a traded account's balance
|
||||||
|
// won't equal any type size, so it falls through and waits for the
|
||||||
|
// reports as before. The matched size is persisted below, so the
|
||||||
|
// assignment survives once the balance starts moving.
|
||||||
|
if (!matched.type) {
|
||||||
|
const balance = client.accountCashBalances[account.id]?.amount;
|
||||||
|
if (typeof balance === 'number') {
|
||||||
|
const attempt = matchAccountType(account.name, balance, types);
|
||||||
|
if (attempt.type) {
|
||||||
|
matched = attempt;
|
||||||
|
matchedSize = balance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (matched.type) {
|
if (matched.type) {
|
||||||
|
|||||||
+14
-1
@@ -298,8 +298,21 @@ export const FIRMS: Firm[] = [
|
|||||||
// makes the two clicks self-sequence — the first tick checks
|
// makes the two clicks self-sequence — the first tick checks
|
||||||
// box one, so the second click resolves to box two — and
|
// box one, so the second click resolves to box two — and
|
||||||
// re-clicking never un-ticks a box already checked.
|
// re-clicking never un-ticks a box already checked.
|
||||||
|
//
|
||||||
|
// WooCommerce only stamps validate-required on its own
|
||||||
|
// required rows; the second agreement box here is theme
|
||||||
|
// markup without that class, so the second click also
|
||||||
|
// sweeps the whole checkout form for unchecked boxes —
|
||||||
|
// minus the ones that must never be ticked (different
|
||||||
|
// shipping address expands extra fields, mailing-list
|
||||||
|
// opt-ins). No skipIfNotFound: silently skipping the
|
||||||
|
// second agreement just moves the failure to the
|
||||||
|
// modal-close gate below with a misleading timeout.
|
||||||
{ action: 'click', selector: '.validate-required input[type="checkbox"]:not(:checked)', frame: '#woocommerceModal iframe', label: 'Agree to terms' },
|
{ action: 'click', selector: '.validate-required input[type="checkbox"]:not(:checked)', frame: '#woocommerceModal iframe', label: 'Agree to terms' },
|
||||||
{ action: 'click', selector: '.validate-required input[type="checkbox"]:not(:checked)', frame: '#woocommerceModal iframe', skipIfNotFound: true, label: 'Agree to terms 2' },
|
// Ticking box one can re-render the checkout (update_checkout);
|
||||||
|
// give it a beat so the second locate sees the settled DOM.
|
||||||
|
{ action: 'wait', seconds: 1 },
|
||||||
|
{ action: 'click', selector: '.validate-required input[type="checkbox"]:not(:checked), form.checkout input[type="checkbox"]:not(:checked):not(#ship-to-different-address-checkbox):not([name*="subscribe"]):not([name*="newsletter"]):not([id*="newsletter"]):not([id*="mailchimp"]):not([id*="mc4wp"])', frame: '#woocommerceModal iframe', label: 'Agree to terms 2' },
|
||||||
|
|
||||||
{ action: 'waitFor', selector: '#woocommerceModal', absent: true, hidden: true, timeoutSeconds: 30, label: 'Wait for the modal to close' },
|
{ action: 'waitFor', selector: '#woocommerceModal', absent: true, hidden: true, timeoutSeconds: 30, label: 'Wait for the modal to close' },
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user