fix: improve purchaseAmount handling for better null checks

This commit is contained in:
lawvs 2025-06-08 03:22:45 +08:00
parent 86b2d083fb
commit 6cb4a3ea48
1 changed files with 4 additions and 1 deletions

View File

@ -98,7 +98,10 @@ class Morph {
feedIds: data.feedIds!,
fee: data.fee!,
subscriptionCount: "subscriptionCount" in data ? data.subscriptionCount : null,
purchaseAmount: "purchaseAmount" in data ? String(data.purchaseAmount) : null,
purchaseAmount:
"purchaseAmount" in data && data.purchaseAmount !== null
? String(data.purchaseAmount)
: null,
}
}