Skip to content

Commit 8481b8d

Browse files
committed
Fix moonpay
1 parent 7f3fec8 commit 8481b8d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/partners/moonpay.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const asMoonpayTx = asObject({
3232
baseCurrency: asMoonpayCurrency,
3333
baseCurrencyAmount: asNumber,
3434
baseCurrencyId: asString,
35-
cardType: asOptional(asValue('apple_pay', 'google_pay')),
35+
cardType: asOptional(asValue('apple_pay', 'google_pay', 'card')),
3636
country: asString,
3737
createdAt: asDate,
3838
cryptoTransactionId: asString,
@@ -199,7 +199,13 @@ export const moonpay: PartnerPlugin = {
199199
}
200200

201201
export function processMoonpayTx(rawTx: unknown): StandardTx {
202-
const tx: MoonpayTx = asMoonpayTx(rawTx)
202+
let tx: MoonpayTx
203+
try {
204+
tx = asMoonpayTx(rawTx)
205+
} catch (e) {
206+
console.log(e)
207+
throw e
208+
}
203209
const isoDate = tx.createdAt.toISOString()
204210
const timestamp = tx.createdAt.getTime()
205211

0 commit comments

Comments
 (0)