openbazaar-go
openbazaar-go copied to clipboard
Server does not clear out unneeded moderatorInfo fields based on the fee type
Here's my profile:
https://pastebin.com/b5jvEQJW
I send a PATCH with the following payload:
{
"moderator": true,
"moderatorInfo": {
"fee": {
"feeType": "PERCENTAGE",
"percentage": 10
},
"description": "Describe the scribe.",
"termsAndConditions": "The terms are germs.",
"languages": [
"en-US"
]
}
}
It errors with:
invalid profile: percentage moderator fee should not include a fixed fee or should use (FIXED_PLUS_PERCENTAGE) feeType
Expectation: The server will infer which fields moderatorInfo fields in the profile are needed based off of the provided feeType and clear out / reset unneeded ones.
Didn’t we already have an issue for this?
Maybe? If we do let me know and I could clean up one of them.
I'm not sure we ever had a specific issue for this behavior. It's possible we just hashed it out in Slack and MG fixed it (or thought he did).