fix CheckPaymentPaidResponse schema
This commit is contained in:
parent
7008de598d
commit
e259d109ef
@ -82,7 +82,7 @@ export const codecForCheckPaymentPaidResponse = (): Codec<
|
||||
CheckPaymentPaidResponse
|
||||
> =>
|
||||
buildCodecForObject<CheckPaymentPaidResponse>()
|
||||
.property("order_status_url", codecForConstString("paid"))
|
||||
.property("order_status_url", codecForString())
|
||||
.property("order_status", codecForConstString("paid"))
|
||||
.property("refunded", codecForBoolean())
|
||||
.property("wired", codecForBoolean())
|
||||
|
@ -341,10 +341,17 @@ export function codecForConstString<V extends string>(s: V): Codec<V> {
|
||||
if (x === s) {
|
||||
return x;
|
||||
}
|
||||
if (typeof x !== "string") {
|
||||
throw new DecodingError(
|
||||
`expected string constant "${s}" at ${renderContext(
|
||||
c,
|
||||
)} but got ${typeof x}`,
|
||||
);
|
||||
}
|
||||
throw new DecodingError(
|
||||
`expected string constant "${s}" at ${renderContext(
|
||||
c,
|
||||
)} but got ${typeof x}`,
|
||||
)} but got string value "${x}"`,
|
||||
);
|
||||
},
|
||||
};
|
||||
|
@ -233,7 +233,7 @@ importers:
|
||||
taler-wallet-core: 'workspace:*'
|
||||
tslib: ^2.0.1
|
||||
typescript: ^3.9.7
|
||||
lockfileVersion: 5.1
|
||||
lockfileVersion: 5.2
|
||||
packages:
|
||||
/@ava/typescript/1.1.1:
|
||||
dependencies:
|
||||
|
Loading…
Reference in New Issue
Block a user