diff --git a/src/constants.ts b/src/constants.ts index fcaeaab..8c56959 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -69,7 +69,7 @@ export const defaultAppRules = (appName: string): { [type: string]: { ref: strin ".rule": { write: "auth.addr === $userAddress && getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) !== null && " + - "(!util.isEmpty(getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`))) && (getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`))" + "(getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`))" }, }, }, @@ -86,8 +86,8 @@ export const defaultAppRules = (appName: string): { [type: string]: { ref: strin value: { ".rule": { write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isString(newData.depositAddress) && " + - "util.isDict(newData.service) && util.isDict(newData.service.default) && util.isNumber(newData.service.default.costPerToken) && util.isNumber(newData.service.default.minCost) && " + - "util.isEmpty(newData.service.default.maxCost) || (util.isNumber(newData.service.default.maxCost) && newData.service.default.maxCost >= newData.service.default.minCost)", + "util.isDict(newData) && util.isNumber(newData.costPerToken) && util.isNumber(newData.minCost) && " + + "util.isEmpty(newData.maxCost) || (util.isNumber(newData.maxCost) && newData.maxCost >= newData.minCost)", }, }, },