Skip to content

Commit 6208b05

Browse files
authored
Merge pull request #20880 from mozilla/subplat_fix-341-stage
fix(payments-ui): use @fxa/payments/cart alias in assertCartOwnership
2 parents 1e827f7 + dc7accf commit 6208b05

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

libs/payments/cart/src/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ export * from './lib/cart.factories';
66
export * from './lib/cart.manager';
77
export * from './lib/cart.service';
88
export * from './lib/cart.utils';
9-
export { CartInvalidStateForActionError } from './lib/cart.error';
9+
export {
10+
CartInvalidStateForActionError,
11+
CartUidMismatchError,
12+
} from './lib/cart.error';
1013
export * from './lib/checkout.service';
1114
export * from './lib/checkout.error';
1215
export * from './lib/checkout.types';

libs/payments/ui/src/lib/nestapp/assertCartOwnership.decorator.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,14 @@
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44

55
import { getSessionUid } from '@fxa/payments/ui-auth';
6-
import { CartUidMismatchError } from 'libs/payments/cart/src/lib/cart.error';
6+
import { CartUidMismatchError } from '@fxa/payments/cart';
77

88
/**
99
* Throws CartUidMismatchError before the decorated method runs when the cart has
1010
* a uid and it does not match the current session uid.
1111
*/
1212
export function AssertCartOwnership() {
13-
return function (
14-
_target: any,
15-
_key: string,
16-
descriptor: PropertyDescriptor
17-
) {
13+
return function (_target: any, _key: string, descriptor: PropertyDescriptor) {
1814
const originalMethod = descriptor.value;
1915

2016
descriptor.value = async function (this: any, args: any) {

0 commit comments

Comments
 (0)