Compare commits
No commits in common. "f5ebd573d692cd339c6e47681d1b78e59647b5a5" and "7aa0d8f43058276b3bf61a22ec394e134c967fb2" have entirely different histories.
f5ebd573d6
...
7aa0d8f430
@ -260,7 +260,7 @@ export default {
|
|||||||
|
|
||||||
const { name } = data
|
const { name } = data
|
||||||
|
|
||||||
await ssValidate(territorySchema, data, { models, me })
|
await ssValidate(territorySchema, data, { models, me, sub: { name } })
|
||||||
|
|
||||||
const oldSub = await models.sub.findUnique({ where: { name } })
|
const oldSub = await models.sub.findUnique({ where: { name } })
|
||||||
if (!oldSub) {
|
if (!oldSub) {
|
||||||
|
@ -125,8 +125,7 @@ function extractConfig (fields, config, client) {
|
|||||||
const field = fields.find(({ name }) => name === key)
|
const field = fields.find(({ name }) => name === key)
|
||||||
|
|
||||||
// filter server config which isn't specified as wallet fields
|
// filter server config which isn't specified as wallet fields
|
||||||
// (we allow autowithdraw members to pass validation)
|
if (client && (key.startsWith('autoWithdraw') || key === 'id')) return acc
|
||||||
if (client && key === 'id') return acc
|
|
||||||
|
|
||||||
// field might not exist because config.enabled doesn't map to a wallet field
|
// field might not exist because config.enabled doesn't map to a wallet field
|
||||||
if (!field || (client ? isClientField(field) : isServerField(field))) {
|
if (!field || (client ? isClientField(field) : isServerField(field))) {
|
||||||
@ -199,9 +198,6 @@ function useConfig (wallet) {
|
|||||||
if (transformedConfig) {
|
if (transformedConfig) {
|
||||||
newClientConfig = Object.assign(newClientConfig, transformedConfig)
|
newClientConfig = Object.assign(newClientConfig, transformedConfig)
|
||||||
}
|
}
|
||||||
// these are stored on the server
|
|
||||||
delete newClientConfig.autoWithdrawMaxFeePercent
|
|
||||||
delete newClientConfig.autoWithdrawMaxFeeTotal
|
|
||||||
} catch {
|
} catch {
|
||||||
valid = false
|
valid = false
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user