Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Handle invalid mods better #1861

Closed
wants to merge 9 commits into from
Closed

Handle invalid mods better #1861

wants to merge 9 commits into from

Conversation

jjeffryes
Copy link
Contributor

This changes the behavior in settings/store so invalid moderators (moderators with models that don't validate) are still shown.

The card will validate the model and show an error if it is invalid, with the specific errors listed in the card.

Sometimes isValid returned true when I manually put in invalid data for the models, which is weird. I wasn't able to figure out the cause, so there's an extra layer of checking in the card template that protects the fee data, and shows the existing currency mismatch message instead of the currency information if the currency code for the fixedFee is unknown or invalid.

return anySupportedByWallet(this.modCurs);
const isFeeFiat = this.fixedFeeCur && isFiatCur(this.fixedFeeCur);
const isFeeCrypto = this.fixedFeeCur && anySupportedByWallet([this.fixedFeeCur]);
const validFeeCur = isFeeFiat || isFeeCrypto;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't see an existing method for checking if a currency code was a known fiat or crypto, if there is one that could be swapped in here.

@jjeffryes jjeffryes requested a review from rmisio January 15, 2020 19:51
@jjeffryes
Copy link
Contributor Author

This is closed in favor of #1864, since non-critical updates should be happening on eth-master instead.

@jjeffryes jjeffryes closed this Jan 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant