@moneypot/hub 1.9.0-dev.4 → 1.9.0-dev.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -193,7 +193,13 @@ export function MakeOutcomeBetPlugin({ betConfigs }) {
|
|
|
193
193
|
const maxProfitMultiplier = Math.max(...input.outcomes.map((o) => o.profit));
|
|
194
194
|
const maxPayout = input.wager * maxProfitMultiplier;
|
|
195
195
|
if (maxPayout > dbHouseBankroll.amount) {
|
|
196
|
-
throw new GraphQLError(`House cannot cover potential payout (${maxPayout
|
|
196
|
+
throw new GraphQLError(`House cannot cover potential payout (${formatCurrency(maxPayout, {
|
|
197
|
+
displayUnitName: dbCurrency.display_unit_name,
|
|
198
|
+
displayUnitScale: dbCurrency.display_unit_scale,
|
|
199
|
+
})}). Bankroll: ${formatCurrency(dbHouseBankroll.amount, {
|
|
200
|
+
displayUnitName: dbCurrency.display_unit_name,
|
|
201
|
+
displayUnitScale: dbCurrency.display_unit_scale,
|
|
202
|
+
})}`);
|
|
197
203
|
}
|
|
198
204
|
const riskLimitsResult = RiskLimitsSchema.safeParse(betConfig.riskPolicy
|
|
199
205
|
? betConfig.riskPolicy({
|