Skip to content

Commit 0621210

Browse files
committed
fixup! Add Xgram swap support
1 parent 6c8e120 commit 0621210

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/swap/central/xgram.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
asMaybe,
77
asNumber,
88
asObject,
9+
asOptional,
910
asString,
1011
asValue
1112
} from 'cleaners'
@@ -349,12 +350,12 @@ const asXgramError = asObject({
349350
)
350351
})
351352
const asXgramQuote = asObject({
352-
ccyAmountToExpected: asNumber,
353+
ccyAmountToExpected: asEither(asNumber, asString),
353354
depositAddress: asString,
354355
depositTag: asOptionalBlank(asString),
355356
id: asString,
356357
result: asBoolean,
357-
expiresAt: asDate,
358+
expiresAt: asOptional(asDate),
358359
ccyAmountFrom: asString
359360
})
360361
const asXgramQuoteReply = asEither(asXgramQuote, asXgramError)

0 commit comments

Comments
 (0)