Resolve "Fix(Paypro): Paypro produces invalid declaration file"

This commit is contained in:
2025-10-31 04:45:02 +00:00
committed by Emergent Reasons
parent 457dd04469
commit 159a1fbcbe
4 changed files with 160 additions and 92 deletions
+1 -1
View File
@@ -38,7 +38,7 @@
"@bitauth/libauth": "^3.0.0",
"@electrum-cash/network": "^4.1.1",
"@electrum-cash/protocol": "2.1.0-development.8075178089",
"@generalprotocols/oracle-client": "^0.0.1",
"@generalprotocols/oracle-client": "^0.0.1-development.11878773826",
"@xocash/primitives": "*",
"async-mutex": "^0.5.0",
"better-sqlite3": "^11.8.1",
+2 -2
View File
@@ -199,8 +199,8 @@ export class PayPro {
// Expiry timestamp
e: z.coerce.number().optional(),
})
// Allow any unspecified keys to be parsed as a string.
.catchall(z.string())
// Allow any unspecified keys to be parsed. This allows us to handle the unknown keys below.
.loose()
// Validate that any unknown keys are optional (prefixed with x-).
.check(({ value }) => {
const keys = Object.values(PayPro.ENCODING_KEYS);