diff --git a/src/constants.ts b/src/constants.ts index 0fa89c3..cecbed1 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -35,7 +35,9 @@ export const defaultAppRules = (appName: string): { [type: string]: { ref: strin ref: `${Path.app(appName).depositOfUser("$userAddress")}/$transferKey`, value: { ".rule": { - write: "data === null && util.isNumber(newData) && getValue(`/transfer/` + $userAddress + `/` + getValue(`/apps/" + `${appName}` + "/billingConfig/depositAddress`) + `/` + $transferKey + `/value`) === newData" + write: + "data === null && util.isNumber(newData) && " + + "getValue(`/transfer/` + $userAddress + `/` + getValue(`/apps/" + `${appName}` + "/billingConfig/depositAddress`) + `/` + $transferKey + `/value`) === newData" }, }, }, @@ -51,7 +53,10 @@ export const defaultAppRules = (appName: string): { [type: string]: { ref: strin ref: `${rootRef}/balance/$userAddress/history/$timestamp`, value: { ".rule": { - write: "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && util.isDict(newData) && util.isNumber(newData.amount) && (newData.type === 'DEPOSIT' || newData.type === 'USAGE')" + write: + "util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true && " + + "util.isDict(newData) && util.isNumber(newData.amount) && " + + "(newData.type === 'DEPOSIT' || newData.type === 'USAGE')", }, }, },