Fixed incorrect stripe disconnect UI on memberships setting
no refs When disconnecting Stripe via the stripe connect modal, we were not resetting the `stripeConnectIntegrationToken` which is used by backend to calculate properties of `stripe_connect_*` settings. This resulted in `stripe_connect_*` properties being retained in settings even after Stripe is disconnected as we keep passing the old integration token to settings API which overrides all connect settings. This change resets the stripe integration token to empty again so as its not using the old value even after modal is closed or disconnected.
This commit is contained in:
parent
c56be7cd2a
commit
9000317acd
@ -1,4 +1,4 @@
|
||||
<header class="modal-header" data-test-modal="webhook-form">
|
||||
<header class="modal-header" data-test-modal="webhook-form" {{will-destroy this.reset}}>
|
||||
<h1 data-test-text="title">Connect with Stripe</h1>
|
||||
</header>
|
||||
<button class="close" href title="Close" {{action "closeModal"}} {{action (optional this.noop) on="mouseDown"}}>
|
||||
|
@ -13,6 +13,13 @@ export default class ModalStripeConnect extends ModalBase {
|
||||
this.settings.set('stripeConnectIntegrationToken', stripeConnectIntegrationToken);
|
||||
}
|
||||
|
||||
@action
|
||||
reset() {
|
||||
// stripeConnectIntegrationToken is not a persisted value so we don't want
|
||||
// to keep it around across transitions
|
||||
this.settings.set('stripeConnectIntegrationToken', undefined);
|
||||
}
|
||||
|
||||
@action
|
||||
updateSuccessModifier() {
|
||||
if (this.settings.get('stripeConnectAccountId')) {
|
||||
|
Loading…
Reference in New Issue
Block a user