Compare commits
5 Commits
7aa0d8f430
...
f5ebd573d6
Author | SHA1 | Date |
---|---|---|
Keyan | f5ebd573d6 | |
Keyan | 5d5bc22e3d | |
ekzyis | 50e153df7c | |
ekzyis | 1f9ab08228 | |
ekzyis | 69c80e3d5c |
|
@ -260,7 +260,7 @@ export default {
|
|||
|
||||
const { name } = data
|
||||
|
||||
await ssValidate(territorySchema, data, { models, me, sub: { name } })
|
||||
await ssValidate(territorySchema, data, { models, me })
|
||||
|
||||
const oldSub = await models.sub.findUnique({ where: { name } })
|
||||
if (!oldSub) {
|
||||
|
|
|
@ -125,7 +125,8 @@ function extractConfig (fields, config, client) {
|
|||
const field = fields.find(({ name }) => name === key)
|
||||
|
||||
// filter server config which isn't specified as wallet fields
|
||||
if (client && (key.startsWith('autoWithdraw') || key === 'id')) return acc
|
||||
// (we allow autowithdraw members to pass validation)
|
||||
if (client && key === 'id') return acc
|
||||
|
||||
// field might not exist because config.enabled doesn't map to a wallet field
|
||||
if (!field || (client ? isClientField(field) : isServerField(field))) {
|
||||
|
@ -198,6 +199,9 @@ function useConfig (wallet) {
|
|||
if (transformedConfig) {
|
||||
newClientConfig = Object.assign(newClientConfig, transformedConfig)
|
||||
}
|
||||
// these are stored on the server
|
||||
delete newClientConfig.autoWithdrawMaxFeePercent
|
||||
delete newClientConfig.autoWithdrawMaxFeeTotal
|
||||
} catch {
|
||||
valid = false
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue