openbazaar-go icon indicating copy to clipboard operation
openbazaar-go copied to clipboard

Server does not clear out unneeded moderatorInfo fields based on the fee type

Open rmisio opened this issue 5 years ago • 2 comments

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.

rmisio avatar Dec 20 '19 21:12 rmisio

Didn’t we already have an issue for this?

hoffmabc avatar Dec 20 '19 21:12 hoffmabc

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).

rmisio avatar Dec 20 '19 21:12 rmisio