Confirms the currently mounted and resolves both
completion shapes (§4a) into one PayResult. Never throws — failures come
back as { status: "failed", error }. While a confirmation is in flight,
calling pay() again returns the SAME in-flight promise: the confirm runs
once and every caller resolves to the identical result. Identity is
stable across renders — safe to list as an effect dependency.
paying
paying:boolean
True while a confirmation is in flight — drive spinners/disabled state.
Confirms the currently mounted and resolves both
completion shapes (§4a) into one PayResult. Never throws — failures come
back as { status: "failed", error }. While a confirmation is in flight,
calling pay() again returns the SAME in-flight promise: the confirm runs
once and every caller resolves to the identical result. Identity is
stable across renders — safe to list as an effect dependency.