Skip to content

Commit

Permalink
fix: change partial type for configureCheckout
Browse files Browse the repository at this point in the history
  • Loading branch information
David Hernandez committed Jan 16, 2025
1 parent 5b107d8 commit befdf90
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tonder.io/ionic-lite-sdk",
"version": "0.0.50",
"version": "0.0.51",
"description": "Tonder ionic lite SDK",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/classes/BaseInlineCheckout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ export class BaseInlineCheckout {
#setCheckoutData(data: IConfigureCheckout | IProcessPaymentRequest){
if(!data || (data && Object.keys(data).length === 0)) return;
this.#handleCustomer(data.customer);
this._setCartTotal(data.cart?.total);
this.#setCartItems(data.cart?.items);
this._setCartTotal(data.cart?.total || 0);
this.#setCartItems(data.cart?.items || []);
this.#handleMetadata(data);
this.#handleCurrency(data);
this.#handleCard(data);
Expand Down
2 changes: 1 addition & 1 deletion src/types/commons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export type APM = {
label: string;
};

export interface IConfigureCheckout extends IProcessPaymentRequest{
export interface IConfigureCheckout extends Partial<IProcessPaymentRequest>{
customer: ICustomer | { email: string };
secureToken: string
}
Expand Down

0 comments on commit befdf90

Please sign in to comment.