Skip to content

Commit ff11fea

Browse files
🤖 dprint fmt
1 parent 65fe74e commit ff11fea

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

types/node-apple-receipt-verify/node-apple-receipt-verify-tests.ts

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,23 @@ appleReceiptVerify.config({
44
secret: "test-secret",
55
});
66

7-
appleReceiptVerify.validate({ receipt: "test-receipt" }, (err: appleReceiptVerify.ValidationError, products: appleReceiptVerify.PurchasedProducts[]) => {
8-
if (err) {
9-
console.error(err.appleStatus);
10-
console.error(err.isRetryable);
11-
return;
12-
}
13-
console.log(products.map((p) => p.bundleId));
14-
});
7+
appleReceiptVerify.validate(
8+
{ receipt: "test-receipt" },
9+
(err: appleReceiptVerify.ValidationError, products: appleReceiptVerify.PurchasedProducts[]) => {
10+
if (err) {
11+
console.error(err.appleStatus);
12+
console.error(err.isRetryable);
13+
return;
14+
}
15+
console.log(products.map((p) => p.bundleId));
16+
},
17+
);
1518

1619
appleReceiptVerify
1720
.validate({ receipt: "test-receipt" })
1821
.then((products: appleReceiptVerify.PurchasedProducts[]) => {
1922
products.forEach((p) => {
20-
const {
23+
const {
2124
bundleId,
2225
transactionId,
2326
productId,
@@ -30,9 +33,9 @@ appleReceiptVerify
3033
originalPurchaseDate,
3134
applicationVersion,
3235
originalApplicationVersion,
33-
originalTransactionId
34-
} = p
35-
36+
originalTransactionId,
37+
} = p;
38+
3639
console.log({
3740
bundleId,
3841
transactionId,
@@ -46,11 +49,10 @@ appleReceiptVerify
4649
originalPurchaseDate,
4750
applicationVersion,
4851
originalApplicationVersion,
49-
originalTransactionId
50-
})
51-
})}
52-
)
52+
originalTransactionId,
53+
});
54+
});
55+
})
5356
.catch((err: appleReceiptVerify.ValidationError) => {
5457
console.error(err);
5558
});
56-

0 commit comments

Comments
 (0)